[PATCH] D23049: [LV, X86] Be more optimistic about vectorizing shifts.

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 1 23:46:07 PDT 2016


mkuper added inline comments.

================
Comment at: lib/Analysis/CostModel.cpp:126
@@ +125,3 @@
+// true only for the obviously uniform cases (argument, globalvariable)
+static bool isBroadcastOfUniform(Value *V) {
+  ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(V);
----------------
delena wrote:
> You can use llvm::getSplatValue() here, it does what you need.
Right, I remembered there had to be a helper for this, but couldn't remember where it was or what it's called. Thanks!


https://reviews.llvm.org/D23049





More information about the llvm-commits mailing list