This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Bugfix in isFusableLoadOpStorePattern().
ClosedPublic

Authored by jonpa on Apr 4 2019, 1:25 AM.

Details

Reviewers
uweigand
Summary

This function is responsible for checking the legality of fusing an instance of load -> op -> store into a single operation. In the SystemZ backend the check was incomplete and a test case emerged with a cycle in the DAG as a result.

Instead of using the NodeIds to determine node relationships, hasPredecessorHelper() now is used just like in the X86 backend. This handled the failing tests and as well gave a few additional transformations on benchmarks.

The SystemZ isFusableLoadOpStorePattern() is a a very near copy of the X86 function, and it seems this could be made a utility function in common code instead.

Diff Detail

Event Timeline

jonpa created this revision.Apr 4 2019, 1:25 AM
uweigand accepted this revision.Apr 4 2019, 4:38 AM

LGTM, thanks!

This revision is now accepted and ready to land.Apr 4 2019, 4:38 AM
jonpa closed this revision.Apr 4 2019, 5:13 AM

r357688