This is an archive of the discontinued LLVM Phabricator instance.

[LoopVectorizer] Fix in getScalarizationOverhead()
ClosedPublic

Authored by jonpa on Sep 21 2018, 4:53 AM.

Details

Reviewers
hfinkel
uweigand
Summary

If target returns false in TTI.prefersVectorizedAddressing(), it means the address registers will not need to be extracted. Therefore, there should be no operands scalarization overhead for a load instruction.

Test for SystemZ.

Diff Detail

Event Timeline

jonpa created this revision.Sep 21 2018, 4:53 AM
This revision is now accepted and ready to land.Sep 21 2018, 10:09 AM
jonpa updated this revision to Diff 167303.Sep 27 2018, 6:28 AM
jonpa added a reviewer: uweigand.
jonpa removed a subscriber: uweigand.

Thanks for review.

Updated just the test to make it more clear that the address computation is in fact scalar (the multiply).

LGTM as well.

jonpa added a comment.Oct 26 2018, 6:53 AM

Thanks for review. I am waiting with committing this until https://reviews.llvm.org/D52417 is approved, which is a simple fix I found necessary after applying this patch.

jonpa closed this revision.Oct 30 2018, 7:39 AM

Committed in r345603.