[PATCH] [SLPVectorization] Enhance Ability to Vectorize Horizontal Reductions from Consecutive Loads
Michael Zolotukhin
mzolotukhin at apple.com
Mon Dec 22 13:12:56 PST 2014
Hi Suyog,
I see what you mean, but the loop doesn't look like behaving as you describe. In case Left.size() equals 2, the loop performs only one iteration. That means that we don't try to make Right operands consecutive (yep, they might become consecutive in some situations though, like your original example).
Could we actually check **all** operands before making any swaps? I.e. if we have `(a[0]+b[0])+(b[1]+a[1])`, then the current algorithm will not handle it, right? In this case we have two pairs of consecutive loads, but to find them we need to look through all loads first. It's purely theoretical case though, I don't know how often it occurs in real life.
By the way, have you measured performance with your change? Do you expect any gains on SPECs or other benchmarks?
REPOSITORY
rL LLVM
http://reviews.llvm.org/D6675
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list