[PATCH] Make DAGCombiner work on vector bitshifts with constant splat vectors.

Matt Arsenault Matthew.Arsenault at amd.com
Fri Mar 7 10:35:03 PST 2014

Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3983-3984
@@ +3982,4 @@
+        return DAG.getConstant(0, VT);
+      return DAG.getNode(ISD::SHL, SDLoc(N), VT, N0.getOperand(0),
+                         DAG.getConstant(c1 + c2, N1.getValueType()));
+    }
Matt Arsenault wrote:
> Tim Northover wrote:
> > Here, for example: there's no BUILD_VECTOR so if VT is a vector type why don't we end up with (shl x, CONSTANT)?
> getConstant is implemented to produce a BUILD_VECTOR of constants if the type is a vector. See SelectionDAG.cpp:1098
Err 1089


More information about the llvm-commits mailing list