[PATCH] D125934: [InstCombine] Changing constant-indexed GEP of GEP to i8* for merging

William Junda Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 16:05:24 PDT 2022


huangjd created this revision.
huangjd added reviewers: davidxl, Carrot, nikic, spatel, reames, aeubanks.
Herald added subscribers: arphaman, hiraditya.
Herald added a project: All.
huangjd requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When merging GEP of GEP with constant indices, if the second GEP's offset is not divisible by the first GEP's element size, convert both type to i8* and merge.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125934

Files:
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/test/Transforms/InstCombine/gep-merge-constant-indices.ll
  llvm/test/Transforms/InstCombine/opaque-ptr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125934.430525.patch
Type: text/x-patch
Size: 5058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220518/ec85ed27/attachment.bin>


More information about the llvm-commits mailing list