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 {
2460
2460
/// the whole vector (it is mixed with constants or loop invariant values).
2461
2461
/// Note: This modifies the 'IsUsed' flag, so a cleanUsed() must follow.
2462
2462
bool shouldBroadcast(Value *Op, unsigned OpIdx, unsigned Lane) {
2463
+ assert(Op == getValue(OpIdx, Lane) &&
2464
+ "Op is expected to be getValue(OpIdx, Lane).");
2463
2465
// Small number of loads - try load matching.
2464
2466
if (isa<LoadInst>(Op) && getNumLanes() == 2 && getNumOperands() == 2)
2465
2467
return false;
@@ -2517,6 +2519,8 @@ class BoUpSLP {
2517
2519
/// Checks if there is at least single compatible operand in lanes other
2518
2520
/// than \p Lane, compatible with the operand \p Op.
2519
2521
bool canBeVectorized(Instruction *Op, unsigned OpIdx, unsigned Lane) const {
2522
+ assert(Op == getValue(OpIdx, Lane) &&
2523
+ "Op is expected to be getValue(OpIdx, Lane).");
2520
2524
bool OpAPO = getData(OpIdx, Lane).APO;
2521
2525
for (unsigned Ln = 0, Lns = getNumLanes(); Ln != Lns; ++Ln) {
2522
2526
if (Ln == Lane)
You can’t perform that action at this time.
0 commit comments