This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner][TLI] SimplifySetCC(): `(X&1) != 0`-->`extortrunc(X&1)` (PR51312)
AbandonedPublic

Authored by lebedev.ri on Aug 3 2021, 4:20 PM.

Details

Summary

If we take and produce non-i1 type, and the input has only the 0'th bit,
and we are only checking whether the input is not empty,
then just use the casted operand, iff the boolean type does not require sign-extension.

Diff Detail

Event Timeline

lebedev.ri created this revision.Aug 3 2021, 4:20 PM
lebedev.ri requested review of this revision.Aug 3 2021, 4:20 PM
lebedev.ri abandoned this revision.Aug 3 2021, 4:49 PM

Actually, let's not.