[PATCH] D126035: [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
Thu May 19 16:53:59 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.
Removed unnecessary tests for swapping GEP with constant indices.

Fix up revision mess in D125934 <https://reviews.llvm.org/D125934>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126035

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: D126035.430857.patch
Type: text/x-patch
Size: 7053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220519/591368f0/attachment.bin>


More information about the llvm-commits mailing list