This is an archive of the discontinued LLVM Phabricator instance.

[X86] Form MUL_IMM for multiplies with 3/5/9 to block load folding.
ClosedPublic

Authored by craig.topper on Apr 24 2018, 8:51 PM.

Details

Summary

Previously we only formed MUL_IMM when we split a constant. This blocked load folding on those cases. We should also form MUL_IMM for 3/5/9 to favor LEA over load folding.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Apr 24 2018, 8:51 PM
RKSimon accepted this revision.Apr 25 2018, 6:31 AM

LGTM - thanks.

This revision is now accepted and ready to land.Apr 25 2018, 6:31 AM
This revision was automatically updated to reflect the committed changes.