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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 11 06:08:25 PDT 2025


================
@@ -0,0 +1,61 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals none --filter-out-after "^scalar.ph" --version 5
+; RUN: opt -passes=loop-vectorize -force-vector-width=4 -force-vector-interleave=2 -S %s | FileCheck %s
+
+; Verify that we check the source element of GEPs when performing a CSE.
+
+define void @cse_gep_source_element_type(ptr noalias %A, ptr noalias %B, ptr noalias %C, i64 %n) {
----------------
fhahn wrote:

Do we have coverage for VPWidenGEP elsewhere? If not, please add a variant with VPWidenGEPRecipe. Probably enough to store a GEP

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


More information about the llvm-commits mailing list