[PATCH] D21703: Scalarizer: Support scalarizing intrinsics

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 13:02:24 PDT 2016


arsenm added inline comments.

================
Comment at: lib/Transforms/Scalar/Scalarizer.cpp:439
@@ +438,3 @@
+      ScalarOperands[I] = CI.getOperand(I);
+    else {
+      Scattered[I] = scatter(&CI, CI.getOperand(I));
----------------
arsenm wrote:
> mehdi_amini wrote:
> > Why using this `hasVectorInstrinsicScalarOpd()`? 
> > I'm not even sure to understand its implementation by the way, it says `Identifies if the intrinsic has a scalar operand` but only check the intrinsic id for a specific list. That sounds quite fragile? The type seems much more likely to be "the source of truth".
> It also checks the operand index. This is just the existing mechanism, I guess it would also work to check the type
The use below needs it because it doesn't check the actual value, it only knows the index when picking between the vector and scalar args


https://reviews.llvm.org/D21703





More information about the llvm-commits mailing list