This is an archive of the discontinued LLVM Phabricator instance.

[ConstantFold][InstSimplify] Pre-commit tests for D144445 (NFC)
AbandonedPublic

Authored by khei4 on Feb 22 2023, 11:31 PM.

Details

Summary

Restructure and add tests for patterned aggregates load folding.

D144445

alive proofs: https://alive2.llvm.org/ce/z/mWB6if

Diff Detail

Event Timeline

khei4 created this revision.Feb 22 2023, 11:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2023, 11:31 PM
khei4 requested review of this revision.Feb 22 2023, 11:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2023, 11:31 PM
khei4 updated this revision to Diff 499739.Feb 22 2023, 11:37 PM

(Just for double-checking) I moved the tests because some cases are affected by the target endian.

khei4 updated this revision to Diff 499748.Feb 23 2023, 12:04 AM

fixed typo

khei4 updated this revision to Diff 499749.Feb 23 2023, 12:07 AM

do forgotten updates (sorry for being noisy). I'll land by myself.

khei4 edited the summary of this revision. (Show Details)Feb 23 2023, 12:23 AM
StephenFan added inline comments.Feb 23 2023, 6:12 AM
llvm/test/Transforms/InstSimplify/load-patterned-aggregates.ll
29

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 .

khei4 abandoned this revision.Feb 23 2023, 6:33 AM

missed to tie with the actual commit https://reviews.llvm.org/rG0eb45cd081e4ad8c496aa8358082ef2644c6a50f. abandon this revision.

llvm/test/Transforms/InstSimplify/load-patterned-aggregates.ll
29

I think this case can also be folded since every i32 values in constarray are same. Is there a TODO missing?

Thank you! Right. But sorry, I failed to tie the actual commit with this revision, already committed by https://reviews.llvm.org/rG0eb45cd081e4ad8c496aa8358082ef2644c6a50f so I'll implement in https://reviews.llvm.org/D144445.

And BTW, we can also fold it if replace [4 x i32] with [4 x i16]. See https://alive2.llvm.org/ce/z/xt2c2z .

That's also right. Thank you for comments!

khei4 reclaimed this revision.Feb 25 2023, 8:28 PM

now I noticed the need to add Differential Revision: <URL> https://llvm.org/docs/Phabricator.html#committing-a-change

khei4 abandoned this revision.Feb 25 2023, 8:29 PM