@@ -1978,8 +1978,7 @@ struct VPCSEDenseMapInfo : public DenseMapInfo<VPSingleDefRecipe *> {
1978
1978
return TypeSwitch<const VPSingleDefRecipe *,
1979
1979
std::optional<std::pair<bool , unsigned >>>(R)
1980
1980
.Case <VPInstruction, VPWidenRecipe, VPWidenCastRecipe,
1981
- VPWidenSelectRecipe, VPWidenGEPRecipe, VPReplicateRecipe,
1982
- VPVectorPointerRecipe>(
1981
+ VPWidenSelectRecipe, VPWidenGEPRecipe, VPReplicateRecipe>(
1983
1982
[](auto *I) { return std::make_pair (false , I->getOpcode ()); })
1984
1983
.Case <VPWidenIntrinsicRecipe>([](auto *I) {
1985
1984
return std::make_pair (true , I->getVectorIntrinsicID ());
@@ -1991,8 +1990,11 @@ struct VPCSEDenseMapInfo : public DenseMapInfo<VPSingleDefRecipe *> {
1991
1990
static bool canHandle (const VPSingleDefRecipe *Def) {
1992
1991
// We can extend the list of handled recipes in the future,
1993
1992
// provided we account for the data embedded in them while checking for
1994
- // equality or hashing.
1995
- auto C = getOpcodeOrIntrinsicID (Def);
1993
+ // equality or hashing. We assign VPVectorEndPointerRecipe the GEP opcode,
1994
+ // as it is essentially a GEP with different semantics.
1995
+ auto C = isa<VPVectorPointerRecipe>(Def)
1996
+ ? std::make_pair (false , Instruction::GetElementPtr)
1997
+ : getOpcodeOrIntrinsicID (Def);
1996
1998
1997
1999
// The issue with (Insert|Extract)Value is that the index of the
1998
2000
// insert/extract is not a proper operand in LLVM IR, and hence also not in
0 commit comments