This is an archive of the discontinued LLVM Phabricator instance.

[X86] Teach X86DAGToDAGISel::foldLoadStoreIntoMemOperand to handle loads in operand 1 of commutable operations.
ClosedPublic

Authored by craig.topper on Sep 6 2018, 8:11 PM.

Details

Summary

Previously we only handled loads in operand 0, but nothing guarantees the load will be operand 0 for commutable operations.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Sep 6 2018, 8:11 PM
chandlerc accepted this revision.Sep 7 2018, 2:08 AM

LGTM, nice!

This revision is now accepted and ready to land.Sep 7 2018, 2:08 AM
This revision was automatically updated to reflect the committed changes.