[PATCH] D25691: [DAGCombiner] Add vector demanded elements support to computeKnownBits
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 18 11:24:27 PDT 2016
efriedma added inline comments.
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2555
+ unsigned Idx = ConstEltNo->getZExtValue();
+ assert(Idx < NumSrcElts && "Out of range vector element index");
+ APInt DemandedElt = APInt::getOneBitSet(NumSrcElts, Idx);
Are your sure it isn't possible to trigger this assertion? I think DAGCombine will delete an extractelement with an out-of-range index, but you can't depend on that happening before this code runs.
More information about the llvm-commits