This is an archive of the discontinued LLVM Phabricator instance.

[DAG] allow store merging before and after legalization (PR34217)
ClosedPublic

Authored by spatel on Sep 18 2017, 11:25 AM.

Details

Summary

rL310710 allowed store merging to occur after legalization to catch stores that are created late, but this exposes a logic hole seen in PR34217:
https://bugs.llvm.org/show_bug.cgi?id=34217

We will miss merging stores if the target lowers vector extracts into target-specific operations. This patch allows store merging to occur both before and after legalization if the target chooses to get maximum merging.

I don't think the potential regressions in the other tests are relevant. The tests are for correctness of weird IR constructs rather than perf tests, and I think those are still correct.

Diff Detail

Repository
rL LLVM

Event Timeline

spatel created this revision.Sep 18 2017, 11:25 AM
niravd accepted this revision.Sep 18 2017, 1:26 PM

LGTM. It would be nice if we could defer ISel lowering parts occuring during legalization so we can remove the pre-legalization step,

This revision is now accepted and ready to land.Sep 18 2017, 1:26 PM
This revision was automatically updated to reflect the committed changes.