[PATCH] D28907: [SLP] Fix for PR30787: Failure to beneficially vectorize 'copyable' elements in integer binary ops.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 5 14:27:23 PST 2018


spatel added inline comments.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1625
+  }
+  llvm_unreachable("unknown binop for default constant value");
+}
----------------
RKSimon wrote:
> @spatel @dtemirbulatov Can we use getBinOpIdentity yet ?
Yes - if anyone has suggestions for making that 'AllowRHSConstant' param clearer, let me know. 

The only problem that I see is that this code is returning +0.0 as the default constant for an fadd (because the caller guarantees 'nsz'?).
I worked around something like that here:
rL346143

I can't tell if SLP would want to do something like that.


https://reviews.llvm.org/D28907





More information about the llvm-commits mailing list