Skip to content

Commit 9d50d33

Browse files
committed
[VPlan] Fix assert-related thinko
1 parent 6d3a3e3 commit 9d50d33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,11 +1832,11 @@ struct VPCSEDenseMapInfo : public DenseMapInfo<VPSingleDefRecipe *> {
18321832
TypeInfo.inferScalarType(L) == TypeInfo.inferScalarType(R) &&
18331833
vputils::isSingleScalar(L) == vputils::isSingleScalar(R) &&
18341834
equal(L->operands(), R->operands());
1835+
if (Result && isa<VPReplicateRecipe>(L))
1836+
Result = L->getUnderlyingInstr() == R->getUnderlyingInstr();
18351837
assert((!Result || getHashValue(L) == getHashValue(R)) &&
18361838
"Divergent hashes of equal values");
1837-
return Result && isa<VPReplicateRecipe>(L)
1838-
? L->getUnderlyingInstr() == R->getUnderlyingInstr()
1839-
: Result;
1839+
return Result;
18401840
}
18411841
};
18421842
} // end anonymous namespace

0 commit comments

Comments
 (0)