[llvm] [instcombine] Scalarize operands of vector geps if possible (PR #145402)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 23 23:41:08 PDT 2025


================
@@ -3058,6 +3058,31 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) {
     return replaceInstUsesWith(GEP, NewGEP);
   }
 
+  // Scalarize vector operands; prefer splat-of-gep.as canonical form.
----------------
dtcxzyw wrote:

https://github.com/llvm/llvm-project/blob/ef048471f70143b4c0505dff10828a5b7e3a4ec4/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp#L2997-L2999 needs update

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


More information about the llvm-commits mailing list