[llvm] [InstCombine] Canonicalize more geps with constant gep bases and constant offsets. (PR #110033)

David Green via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 3 11:30:38 PDT 2024


================
@@ -238,6 +238,8 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   std::optional<std::pair<Intrinsic::ID, SmallVector<Value *, 3>>>
   convertOrOfShiftsToFunnelShift(Instruction &Or);
 
+  Value *EmitGEPOffset(GEPOperator *GEP, bool RewriteGEP = false);
----------------
davemgreen wrote:

Oh - This was a relic of a previous version that moved the creation of geps into (a differently named) shouldCanonicalizeGEPToPtrAdd, but it was simpler to just have the condition in that function.

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


More information about the llvm-commits mailing list