Restructure and add tests for patterned aggregates load folding.
alive proofs: https://alive2.llvm.org/ce/z/mWB6if
Differential D144618
[ConstantFold][InstSimplify] Pre-commit tests for D144445 (NFC) khei4 on Feb 22 2023, 11:31 PM. Authored by
Details
Restructure and add tests for patterned aggregates load folding. alive proofs: https://alive2.llvm.org/ce/z/mWB6if
Diff Detail Event TimelineComment Actions (Just for double-checking) I moved the tests because some cases are affected by the target endian.
Comment Actions missed to tie with the actual commit https://reviews.llvm.org/rG0eb45cd081e4ad8c496aa8358082ef2644c6a50f. abandon this revision.
Comment Actions now I noticed the need to add Differential Revision: <URL> https://llvm.org/docs/Phabricator.html#committing-a-change |
I think this case can also be folded since every i32 values in constarray are same. Is there a TODO missing?
And BTW, we can also fold it if replace [4 x i32] with [4 x i16]. See https://alive2.llvm.org/ce/z/xt2c2z .