This is an archive of the discontinued LLVM Phabricator instance.

[lanai] Manually match 0/-1 with R0/R1.
ClosedPublic

Authored by jpienaar on Nov 28 2016, 11:38 AM.

Details

Summary

Previously 0 and -1 was matched via tablegen rules. But this could cause problems where a physical register was being used where a virtual register was expected (seen in optimizeSelect and TwoAddressInstructionPass). Instead follow AArch64 and match in DAGToDAGISel.

Event Timeline

jpienaar updated this revision to Diff 79429.Nov 28 2016, 11:38 AM
jpienaar retitled this revision from to [lanai] Manually match 0/-1 with R0/R1..
jpienaar updated this object.
jpienaar added reviewers: eliben, majnemer.
jpienaar updated this revision to Diff 79614.Nov 29 2016, 11:43 AM

Updated to test the type before matching R0 and R1.

majnemer accepted this revision.Nov 29 2016, 12:45 PM
majnemer edited edge metadata.

LGTM

This revision is now accepted and ready to land.Nov 29 2016, 12:45 PM
jpienaar closed this revision.Nov 29 2016, 3:11 PM