[PATCH] D11121: Optimization for Gather/Scatter with uniform base

hfinkel at anl.gov hfinkel at anl.gov
Sat Jul 25 17:31:30 PDT 2015

hfinkel added a subscriber: hfinkel.
hfinkel accepted this revision.
hfinkel added a reviewer: hfinkel.
hfinkel added a comment.
This revision is now accepted and ready to land.

This LGTM, but let's get getSplatValue figured out, commit that, and then commit this patch using getSplatValue.

Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:3122
@@ +3121,3 @@
+    ShuffleVectorInst *ShuffleInst = dyn_cast<ShuffleVectorInst>(GepBasePtr);
+    if (!ShuffleInst || !ShuffleInst->getMask()->isNullValue() ||
+        !isa<InsertElementInst>(ShuffleInst->getOperand(0)))
I suppose you'll replace this logic with getSplatValue when that lands.


More information about the llvm-commits mailing list