This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Remove the (not (sext)) case from foldBoolSextMaskToSelect and inline the remaining code to match visitOr
ClosedPublic

Authored by craig.topper on Aug 2 2017, 1:56 PM.

Details

Summary

The (not (sext)) case is really (xor (sext), -1) which should have been simplified to (sext (xor, 1)) before we got here. So we shouldn't need to handle it.

With that taken care of we only need to two cases so don't need the swap anymore. This makes us in sync with the equivalent code in visitOr so inline this to match.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Aug 2 2017, 1:56 PM
spatel accepted this revision.Aug 4 2017, 7:46 AM

LGTM.

This revision is now accepted and ready to land.Aug 4 2017, 7:46 AM
This revision was automatically updated to reflect the committed changes.