This is an archive of the discontinued LLVM Phabricator instance.

[X86] Teach combineTruncatedArithmetic to handle some cases of ISD::SUB
ClosedPublic

Authored by craig.topper on Aug 16 2018, 5:39 PM.

Details

Summary

We can safely avoid interfering with the subus combine if both inputs are freely truncatable. Either both extends, or an extend and a constant vector.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Aug 16 2018, 5:39 PM
RKSimon accepted this revision.Aug 17 2018, 5:55 AM

LGTM thanks! If possible, please pre-commit the test to show the codegen change.

This revision is now accepted and ready to land.Aug 17 2018, 5:55 AM
This revision was automatically updated to reflect the committed changes.