[PATCH] D144445: [ConstantFold][InstSimplify] pre-commit test for constant global all-element-equal arrays and structs (NFC)

Kohei Asano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 20 20:21:31 PST 2023


khei4 updated this revision to Diff 499033.
khei4 added a comment.
Herald added a subscriber: hiraditya.

Fold loadInst for aggregate types those elements are all equal.

- Add ConstantFoldLoadFromAllEqAggregate on ConstantFolding.
- Loosen the initializer check in simplifyLoadInst, and try to fold after uniform constant folding.


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

https://reviews.llvm.org/D144445

Files:
  llvm/include/llvm/Analysis/ConstantFolding.h
  llvm/lib/Analysis/ConstantFolding.cpp
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/test/Transforms/InstSimplify/load.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144445.499033.patch
Type: text/x-patch
Size: 5369 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230221/53d8139e/attachment.bin>


More information about the llvm-commits mailing list