This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add SVE int instructions to isAssociativeAndCommutative
ClosedPublic

Authored by kawashima-fj on Dec 20 2022, 6:56 AM.

Diff Detail

Event Timeline

kawashima-fj created this revision.Dec 20 2022, 6:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 20 2022, 6:56 AM
kawashima-fj requested review of this revision.Dec 20 2022, 6:56 AM
kawashima-fj retitled this revision from Add SVE int instructions to isAssociativeAndCommutative to [AArch64] Add SVE int instructions to isAssociativeAndCommutative.Dec 20 2022, 6:56 AM

This sounds OK, but it is probably worth adding extra tests

Some tests are added.

Matt added a subscriber: Matt.Dec 27 2022, 8:13 AM

Ping.
I addressed @dmgreen's comment.

dmgreen accepted this revision.Jan 5 2023, 12:26 AM

Thanks. LGTM

llvm/test/CodeGen/AArch64/machine-combiner-eor.mir
6

I believe that eor3 is SVE2, and eor is SVE. So with the right target features it should be possible to test in a ll file too.
This test sounds good though instead. It can be good to test passes in isolation too.

This revision is now accepted and ready to land.Jan 5 2023, 12:26 AM
kawashima-fj marked an inline comment as done.Jan 5 2023, 3:40 AM
kawashima-fj added inline comments.
llvm/test/CodeGen/AArch64/machine-combiner-eor.mir
6

Yes, EOR3 is SVE2. However, I want to test MUL <Zd>.<T>, <Zn>.<T>, <Zm>.<T>, which was introduced in SVE2, in machine-combiner.ll. So I want sve2 target feature in machine-combiner.ll.
Adding a RUN line to test both +sve2 and +nosve2 will resolve the problem but will uselessly increase unrelated CHECK lines.

This revision was automatically updated to reflect the committed changes.
kawashima-fj marked an inline comment as done.