[PATCH] D137664: [InstCombine][NFC] Baseline tests for D137212 Simplify chain of GEP with constant indices

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 10 12:30:40 PST 2022


spatel added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/gep-merge-constant-indices.ll:277
+  %2 = getelementptr inbounds i32, ptr %1, i64 %a
+  %3 = getelementptr inbounds [4 x i16], ptr %2, i64 1, i64 -4
+  ret ptr %3
----------------
It's not clear to me that this test is providing coverage for the intended constraint in the other patch. 

Should we add a simplify for any gep like %3?
https://alive2.llvm.org/ce/z/w89_Y5


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137664/new/

https://reviews.llvm.org/D137664



More information about the llvm-commits mailing list