[llvm] [VPlan] Extend CSE to eliminate GEPs (PR #156699)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 10 11:21:47 PDT 2025
================
@@ -1976,8 +1976,11 @@ struct VPCSEDenseMapInfo : public DenseMapInfo<VPSingleDefRecipe *> {
static bool canHandle(const VPSingleDefRecipe *Def) {
// We can extend the list of handled recipes in the future,
// provided we account for the data embedded in them while checking for
- // equality or hashing.
- auto C = getOpcodeOrIntrinsicID(Def);
+ // equality or hashing. We assign VPVectorEndPointerRecipe the GEP opcode,
+ // as it is essentially a GEP with different semantics.
+ auto C = isa<VPVectorPointerRecipe>(Def)
----------------
fhahn wrote:
As I mentioned above, any GEP needs to consider the index type, i.e could also have a VPReplicateRecipe that is a GEP.
https://github.com/llvm/llvm-project/pull/156699
More information about the llvm-commits
mailing list