[PATCH] D25691: [DAGCombiner] Add vector demanded elements support to computeKnownBits

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 18 15:54:18 PDT 2016

RKSimon 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);
efriedma wrote:
> 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.
OK thanks - I misunderstood your request for a check - I'll fix it.



More information about the llvm-commits mailing list