[PATCH] D146622: [AggressiveInstCombine] folding load for constant global patterened arrays and structs by GEP indices

Kohei Asano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 18:21:08 PDT 2023


khei4 updated this revision to Diff 521511.
khei4 added a comment.

> The updated code looks good to me, but could you please also add the extra test case (that was previously crashing)?

@nikic Thank you for reminding me! I added. (sorry I said in the former text.

> I think it is due to this check: https://github.com/llvm/llvm-project/blob/0f800dfe036c12e1883586234bcae2be33d82920/llvm/lib/Analysis/ConstantFolding.cpp#L432

Thanks a lot for finding that part! I'll try to patch it!


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

https://reviews.llvm.org/D146622

Files:
  llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
  llvm/test/Transforms/AggressiveInstCombine/patterned-load.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146622.521511.patch
Type: text/x-patch
Size: 8646 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230512/b9568e49/attachment.bin>


More information about the llvm-commits mailing list