[PATCH] D125438: [InstCombine] NEW Baseline tests for InstCombine optimization to merge GEP instructions with constant indices
William Junda Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 12 13:46:01 PDT 2022
huangjd marked 3 inline comments as done.
huangjd added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/gep-merge-constant-indices.ll:162
+
+; result = (i16*) &((struct.B*) (p + a))[0].member1 + 4
+define ptr @appendIndexReverse(ptr %p) {
----------------
nikic wrote:
> What's `+ a` in this comment?
typo, fixed.
================
Comment at: llvm/test/Transforms/InstCombine/gep-merge-constant-indices.ll:172
+ ret ptr %2
+}
----------------
nikic wrote:
> Maybe I missed it, but it would be good to test a case where neither element type can be used, e.g. `gep i24, 1` and `gep i32, 1`. Total offset is 7, which is not a multiple of 3 or 4.
Added more test cases
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125438/new/
https://reviews.llvm.org/D125438
More information about the llvm-commits
mailing list