[PATCH] D26605: [DAGCombiner] Fix infinite loop in vector mul/shl combining
John Brawn via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 07:06:19 PST 2016
john.brawn added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:3476
+ continue;
+ }
ConstantSDNode *V1 = dyn_cast<ConstantSDNode>(BV1->getOperand(I));
----------------
RKSimon wrote:
> I don't think this is safe (e.g. OR(C1, UNDEF) --> at least C1).
Hmm, I'd thought that FoldConstantVectorArithmetic folds any undef input element into an undef output element, but looking more closely it calls getNode on each element pair and it's only for some operations that results in undef. I'll try making FoldConstantArithmetic do the same.
Repository:
rL LLVM
https://reviews.llvm.org/D26605
More information about the llvm-commits
mailing list