Reviewing the code again, I believe the sext is needed on the LHS
or RHS for ICmp and only on the RHS for Add/Sub.
Add an opcode check before checking the operand number.
Paths
| Differential D125654
[TypePromotion] Refine fix sext/zext for promoted constant from D125294. ClosedPublic Authored by craig.topper on May 15 2022, 6:31 PM.
Details Summary Reviewing the code again, I believe the sext is needed on the LHS Add an opcode check before checking the operand number.
Diff Detail
Event TimelineThis revision was landed with ongoing or failed builds. Closed by commit rG4638766794b0: [TypePromotion] Refine fix sext/zext for promoted constant from D125294. (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions I went ahead and pushed this to close out PR55627 which @regehr found. If we need to we can address any comments with a followup patch.
Revision Contents
Diff 429588 llvm/lib/CodeGen/TypePromotion.cpp
llvm/test/Transforms/TypePromotion/ARM/icmps.ll
|
clang-format not found in user’s local PATH; not linting file.