[PATCH] [SLPVectorization] Enhance Ability to Vectorize Horizontal Reductions from Consecutive Loads

Michael Zolotukhin mzolotukhin at apple.com
Sun Dec 21 18:44:23 PST 2014


Hi Suyog,

Thanks for the explanation, it actually matches my understanding.

But yes, I was a bit confused with what we actually load in a vector - `Left[i]` and `Left[i+1]`, or `Left[i]` and `Right[i]`. Now it's clear, and your approach looks right.

One more question though: what if `Left[i+1]` and `Right[i+1]` are consecutive, but `Left[i]` and `Right[i]` are not (i.e. `(p1[0] + p2[0]) + (a[0] + a[1])`)? Does it make sense to swap `p2[0]` (`Right[i]`) and `a[0]` (`Left[i+1]`) ? In this case we will get at least one pair of consecutive loads - in the right operands.


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