This is an archive of the discontinued LLVM Phabricator instance.

check for fastness before merging in DAGCombiner::MergeConsecutiveStores()
ClosedPublic

Authored by spatel on Sep 2 2015, 1:42 PM.

Details

Summary

This is another step on the long road to fixing the last part of PR21711:
https://llvm.org/bugs/show_bug.cgi?id=21711

This change was mentioned in:
http://reviews.llvm.org/D10662 and
http://reviews.llvm.org/D10905

The change in DAGCombiner is simple: use and check the 'IsFast' optional parameter to TLI.allowsMemoryAccess() any time we have a merged access candidate.

But I think that change exposes a bug in the AMD/SI implementation of allowsMisalignedMemoryAccesses(). A test failure shows up in test/CodeGen/AMDGPU/merge-stores.ll. Matt, can you confirm/deny that that part of the patch is what you expect?

Diff Detail

Repository
rL LLVM

Event Timeline

spatel updated this revision to Diff 33855.Sep 2 2015, 1:42 PM
spatel retitled this revision from to check for fastness before merging in DAGCombiner::MergeConsecutiveStores() .
spatel updated this object.
spatel added reviewers: arsenm, jyknight, qcolombet.

Forgot to add llvm-commits.

arsenm added inline comments.Sep 2 2015, 1:50 PM
lib/Target/AMDGPU/SIISelLowering.cpp
412–415 ↗(On Diff #33855)

This looks fine to me

jyknight accepted this revision.Sep 2 2015, 3:31 PM
jyknight edited edge metadata.
This revision is now accepted and ready to land.Sep 2 2015, 3:31 PM
This revision was automatically updated to reflect the committed changes.