File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -2460,6 +2460,8 @@ class BoUpSLP {
24602460 /// the whole vector (it is mixed with constants or loop invariant values).
24612461 /// Note: This modifies the 'IsUsed' flag, so a cleanUsed() must follow.
24622462 bool shouldBroadcast(Value *Op, unsigned OpIdx, unsigned Lane) {
2463+ assert(Op == getValue(OpIdx, Lane) &&
2464+ "Op is expected to be getValue(OpIdx, Lane).");
24632465 // Small number of loads - try load matching.
24642466 if (isa<LoadInst>(Op) && getNumLanes() == 2 && getNumOperands() == 2)
24652467 return false;
@@ -2517,6 +2519,8 @@ class BoUpSLP {
25172519 /// Checks if there is at least single compatible operand in lanes other
25182520 /// than \p Lane, compatible with the operand \p Op.
25192521 bool canBeVectorized(Instruction *Op, unsigned OpIdx, unsigned Lane) const {
2522+ assert(Op == getValue(OpIdx, Lane) &&
2523+ "Op is expected to be getValue(OpIdx, Lane).");
25202524 bool OpAPO = getData(OpIdx, Lane).APO;
25212525 for (unsigned Ln = 0, Lns = getNumLanes(); Ln != Lns; ++Ln) {
25222526 if (Ln == Lane)
You can’t perform that action at this time.
0 commit comments