This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeIntegerTypes][RISCV] Teach PromoteSetCCOperands to check sign bits of unsigned compares.
ClosedPublic

Authored by craig.topper on Jan 4 2022, 12:03 PM.

Details

Summary

Unsigned compares work with either zero extended or sign extended
inputs just like equality comparisons. I didn't allow this when
I refactored the code in D116421 due to lack of tests. But I've
since found a simple C test case that demonstrates when this can be
useful.

Diff Detail

Event Timeline

craig.topper created this revision.Jan 4 2022, 12:03 PM
craig.topper requested review of this revision.Jan 4 2022, 12:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2022, 12:03 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
This revision is now accepted and ready to land.Jan 4 2022, 12:19 PM
This revision was landed with ongoing or failed builds.Jan 4 2022, 12:39 PM
This revision was automatically updated to reflect the committed changes.