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.
Differential D125654
[TypePromotion] Refine fix sext/zext for promoted constant from D125294. craig.topper on May 15 2022, 6:31 PM. Authored by
Details 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 TimelineComment 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. |
clang-format not found in user’s local PATH; not linting file.