[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
Wed May 11 17:37:10 PDT 2022


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

Splitted the merge constant-indexed GEP optimization into two smaller transformations: 1. Merging GEP of GEP if both are constant-indexed. 2. Swapping constant indexed GEP in a chain of (non-constant) GEP to the end, so that 1 can be applied repeatedly.
There is existing code to partially  handle transformation 1, but it only deals with limited cases

Unit tests are breaking down into two parts for the 2 transformations.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125438

Files:
  llvm/test/Transforms/InstCombine/gep-canonicalize-constant-indices.ll
  llvm/test/Transforms/InstCombine/gep-merge-constant-indices.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125438.428825.patch
Type: text/x-patch
Size: 11266 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220512/919e9de1/attachment.bin>


More information about the llvm-commits mailing list