The issues was found during D40524.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 14252 Build 14252: arc lint + arc unit
Event Timeline
lib/Target/X86/X86FixupBWInsts.cpp | ||
---|---|---|
256 | Wouldn't TRI->isSuperOrSubRegisterEq() have the same effect as TRI->checkRegistersAlias()? It isn't clear to me why the new function is needed. Also, a comment here saying more verbosely what this is meant to be looking for would be helpful. I'm thinking something like this: // If MO is a use of any part of the destination register but is not equal to OrigDestReg // or one of its subregisters, we cannot use SuperDestReg. For example, if OrigDestReg // is %al then an implicit use of %ah, %ax, %eax, or %rax will prevent us from using // the %eax register. |
Indeed, on X86 checkRegistersAlias is just isSuperOrSubRegisterEq (although the former would be the right choice if that was not so :)).
Comment was added - thanks for the exact text!
Use regsOverlap instead of isSuperOrSubRegisterEq.
test/CodeGen/X86/fixup-bw-inst.mir | ||
---|---|---|
204–246 | Thanks for the pointer. However, the whole file would benefit from this so I'd like to do the change in a subsequent commit. It should not require a review and can be directly committed, right? |
test/CodeGen/X86/fixup-bw-inst.mir | ||
---|---|---|
204–246 | Yes a change simplifying .mir like this is so obvious that it can be directly committed (aka post-commit review). |
Wouldn't TRI->isSuperOrSubRegisterEq() have the same effect as TRI->checkRegistersAlias()? It isn't clear to me why the new function is needed.
Also, a comment here saying more verbosely what this is meant to be looking for would be helpful. I'm thinking something like this: