This is an archive of the discontinued LLVM Phabricator instance.

[SLP] Pass in correct alignment when query memory access cost
ClosedPublic

Authored by Carrot on May 27 2016, 2:47 PM.

Details

Reviewers
hfinkel
Summary

This patch fixes bug https://llvm.org/bugs/show_bug.cgi?id=27897.

When query memory access cost, current SLP always passes in alignment value of 1 (unaligned), so it gets a very high cost of scalar memory access, and wrongly vectorize memory loads in the test case.

It can be fixed by simply giving correct alignment.

Diff Detail

Event Timeline

Carrot updated this revision to Diff 58843.May 27 2016, 2:47 PM
Carrot retitled this revision from to [SLP] Pass in correct alignment when query memory access cost.
Carrot updated this object.
Carrot added a subscriber: llvm-commits.
hfinkel accepted this revision.May 27 2016, 2:53 PM
hfinkel added a reviewer: hfinkel.
hfinkel added a subscriber: hfinkel.

LGTM

This revision is now accepted and ready to land.May 27 2016, 2:53 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in r271333.