[PATCH] D12697: [DAGCombine] Truncate BUILD_VECTOR operators if necessary when constant folding vectors
James Molloy via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 05:38:44 PDT 2015
jmolloy added a subscriber: jmolloy.
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13354
@@ +13353,3 @@
+ if (ST != VT)
+ FoldOp = DAG.getNode(ISD::ZERO_EXTEND, SDLoc(LHS), ST, FoldOp);
I'd prefer to see this as ANY_EXTEND, as that more precisely describes that the upper bits are known to be undefined.
But shouldn't this only happen if we're in the post-legalize stage?
More information about the llvm-commits