This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE2] Add patterns for eor3
ClosedPublic

Authored by TiehuZhang on Nov 28 2022, 4:56 AM.

Details

Summary
Add patterns for:
    eor x, (eor y, z) -> eor3 x, y, z

Diff Detail

Event Timeline

TiehuZhang created this revision.Nov 28 2022, 4:56 AM
TiehuZhang requested review of this revision.Nov 28 2022, 4:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 28 2022, 4:56 AM
sdesmalen added inline comments.Nov 28 2022, 6:16 AM
llvm/test/CodeGen/AArch64/sve2-eor3.ll
17

The operation seems commutative, such that

%4 = xor <vscale x 16 x i8> %0, %1
%5 = xor <vscale x 16 x i> %2, %4

should give the same result. Can you add a test for this case?

dmgreen added inline comments.Nov 28 2022, 2:08 PM
llvm/test/CodeGen/AArch64/sve2-eor3.ll
5

Can you add other test sizes too. nxv2i64, nxv4i32 and nxv8i16.

TiehuZhang marked 2 inline comments as done.Nov 30 2022, 4:25 AM

Update the test:

  1. Supplement other data types (nxv2i64, nxv4i32 and nxv8i16).
  2. Add functions with different operand orders.

@sdesmalen, @dmgreen

llvm/test/CodeGen/AArch64/sve2-eor3.ll
5

Thanks,

dmgreen accepted this revision.Nov 30 2022, 10:34 AM

Thanks. LGTM

This revision is now accepted and ready to land.Nov 30 2022, 10:34 AM
sdesmalen accepted this revision.Dec 1 2022, 2:23 AM
Allen added a subscriber: Allen.Dec 1 2022, 4:16 AM
This revision was landed with ongoing or failed builds.Dec 5 2022, 2:17 AM
This revision was automatically updated to reflect the committed changes.