Separate the handling of AND/AND8 out from PHI/OR/ISEL checking. The reasoning is the others need all their operands to be sign/zero extended for their output to also be sign/zero extended. This is true for AND and sign-extension, but for zero-extension we only need at least one of the input operands to be sign extended for the result to also be zero extended.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM.
I think this code may be off by default at this time due to issues on some external benchmarks. If that's the case, it should be fine to commit this, but you'll probably need the flag in the test case to enable the transformation that uses this.
lib/Target/PowerPC/PPCInstrInfo.cpp | ||
---|---|---|
2336 ↗ | (On Diff #119540) | Please turn this into an assert. If we have non-register input operands to a reg+reg instruction, it's an error and we shouldn't just continue. |
Comment Actions
I am submitting a patch that may conflict with this change. I expect that it is trivial to resolve the conflict.
https://reviews.llvm.org/D40554