[llvm] [VPlan] Extend CSE to eliminate GEPs (PR #156699)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 10 07:59:06 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)
----------------
artagnon wrote:
Thanks! I didn't realize that this was the source element type of the GEP: I thought for some reason that all GEPs were canonicalized to have the i8 source element type, due to recent changes.
https://github.com/llvm/llvm-project/pull/156699
More information about the llvm-commits
mailing list