This is an archive of the discontinued LLVM Phabricator instance.

[NFC][NewGVN][LoadCoercion] Add tests for future commit.
AcceptedPublic

Authored by kmitropoulou on Apr 19 2022, 11:41 PM.

Diff Detail

Event Timeline

kmitropoulou created this revision.Apr 19 2022, 11:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2022, 11:41 PM
kmitropoulou requested review of this revision.Apr 19 2022, 11:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2022, 11:41 PM
foad added a subscriber: foad.Apr 20 2022, 1:27 AM
foad added inline comments.
llvm/test/Transforms/NewGVN/load_coercion_between_store_and_load.ll
3

Should be testing -newgvn instead of gvn?

kmitropoulou added inline comments.Apr 20 2022, 1:35 AM
llvm/test/Transforms/NewGVN/load_coercion_between_store_and_load.ll
3

I just wanted to prove that we do the same thing as GVN. None of these tests are optimized with NewGVN. If we prefer to see the diff, then I can change it :)

foad added inline comments.Apr 20 2022, 1:45 AM
llvm/test/Transforms/NewGVN/load_coercion_between_store_and_load.ll
3

I see. Then maybe use two RUN lines:

; RUN: opt -S -gvn < %s | FileCheck %s -check-prefixes=GVN,OLDGVN
; RUN: opt -S -newgvn < %s | FileCheck %s -check-prefixes=GVN,NEWGVN

(as suggested offline).

Updating D124068: [NewGVN][LoadCoercion] Add tests for future commit.

kmitropoulou marked an inline comment as done.Apr 20 2022, 9:43 PM

Updating D124068: [NewGVN][LoadCoercion] Add tests for future commit.

Updating D124068: [NFC][NewGVN][LoadCoercion] Add tests for future commit.

[NFC][NewGVN][LoadCoercion] Add tests for future commit.

foad accepted this revision.Jun 13 2022, 2:42 AM

LGTM.

If you prefer you could also add a common "GVN" prefix. The update_test_checks script will use this prefix when oldgvn and newgvn produce the same result, which will make it easier to see when they are different.

; RUN: opt -S -gvn < %s | FileCheck %s -check-prefixes=GVN,OLDGVN
; RUN: opt -S -newgvn < %s | FileCheck %s -check-prefixes=GVN,NEWGVN
This revision is now accepted and ready to land.Jun 13 2022, 2:42 AM

If possible, please replace all uses of undef with poison. Thank you!

kmitropoulou retitled this revision from [NewGVN][LoadCoercion] Add tests for future commit. to [NFC][NewGVN][LoadCoercion] Add tests for future commit..Jun 13 2022, 2:56 AM

Updating D124068: [NFC][NewGVN][LoadCoercion] Add tests for future commit.

If possible, please replace all uses of undef with poison. Thank you!

Done.

[NFC][NewGVN][LoadCoercion] Add tests for future commit.

Updating D124068: [NFC][NewGVN][LoadCoercion] Add tests for future commit.

Updating D124068: [NFC][NewGVN][LoadCoercion] Add tests for future commit.