[llvm] [VPlan] Extend CSE to eliminate GEPs (PR #156699)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 8 03:31:31 PDT 2025


================
@@ -1897,6 +1900,9 @@ class VPVectorPointerRecipe : public VPRecipeWithIRFlags,
 
   VP_CLASSOF_IMPL(VPDef::VPVectorPointerSC)
 
+  /// This recipe primarily generates a GEP instruction.
+  unsigned getOpcode() const { return Instruction::GetElementPtr; }
----------------
artagnon wrote:

Hm, what do you mean by "plain GEP"? Don't we have to match a specific recipe, and check that the subclass IDs match before performing a replacement?

https://github.com/llvm/llvm-project/pull/156699


More information about the llvm-commits mailing list