This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Add intrinsics for SVE2 bitwise ternary operations
ClosedPublic

Authored by dancgr on Feb 18 2020, 12:03 PM.

Diff Detail

Event Timeline

dancgr created this revision.Feb 18 2020, 12:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2020, 12:03 PM
efriedma added inline comments.Feb 18 2020, 1:13 PM
llvm/test/CodeGen/AArch64/sve2-bitwise-ternary.ll
153

Missing newline

Any particular reason you're only testing bsl with nxv2i64 operands?

dancgr added inline comments.Feb 18 2020, 1:47 PM
llvm/test/CodeGen/AArch64/sve2-bitwise-ternary.ll
153

I didn't add other operand types for bsl because the class definition on SVEInstrFormats.td for bsl, bsl1n, bsl2n and nbsl were only defined for ZPR64. For eor3 and bcax there was instruction aliases for ZPR32, ZPR16 and ZPR8.

efriedma added inline comments.Feb 18 2020, 1:52 PM
llvm/test/CodeGen/AArch64/sve2-bitwise-ternary.ll
153

Do you have any idea why bsl is defined differently?

dancgr marked an inline comment as done.Feb 18 2020, 3:11 PM
dancgr added inline comments.
llvm/test/CodeGen/AArch64/sve2-bitwise-ternary.ll
153

Actually no, should they be the same? I can unify the definition and apply the aliases to the bsl instructions as well.

efriedma added inline comments.Feb 18 2020, 3:19 PM
llvm/test/CodeGen/AArch64/sve2-bitwise-ternary.ll
153

That makes sense to me.

dancgr updated this revision to Diff 245457.Feb 19 2020, 10:34 AM

Merging all instructions into same multiclass.

This revision is now accepted and ready to land.Feb 19 2020, 2:31 PM
This revision was automatically updated to reflect the committed changes.

Hi, I think this might've caused some test failures on our bots and others on buildbot:

FAIL: LLVM :: MC/AArch64/SVE2/bsl-diagnostics.s (23685 of 36141)
******************** TEST 'LLVM :: MC/AArch64/SVE2/bsl-diagnostics.s' FAILED ********************
Script:
--
: 'RUN: at line 1';   not /b/s/w/ir/k/recipe_cleanup/clangOZ9WCk/llvm_build_dir/bin/llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2  2>&1 < /b/s/w/ir/k/llvm-project/llvm/test/MC/AArch64/SVE2/bsl-diagnostics.s| /b/s/w/ir/k/recipe_cleanup/clangOZ9WCk/llvm_build_dir/bin/FileCheck /b/s/w/ir/k/llvm-project/llvm/test/MC/AArch64/SVE2/bsl-diagnostics.s
--
Exit Code: 1

Command Output (stderr):
--
/b/s/w/ir/k/llvm-project/llvm/test/MC/AArch64/SVE2/bsl-diagnostics.s:8:11: error: CHECK: expected string not found in input
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
          ^
<stdin>:1:1: note: scanning from here
<stdin>:26:11: error: operand must match destination register
^
<stdin>:1:1: note: with "@LINE-1" equal to "7"
<stdin>:26:11: error: operand must match destination register
^
<stdin>:1:2: note: possible intended match here
<stdin>:26:11: error: operand must match destination register
 ^

...

Testing Time: 135.11s
********************
Failing Tests (4):
    LLVM :: MC/AArch64/SVE2/bsl-diagnostics.s
    LLVM :: MC/AArch64/SVE2/bsl1n-diagnostics.s
    LLVM :: MC/AArch64/SVE2/bsl2n-diagnostics.s
    LLVM :: MC/AArch64/SVE2/nbsl-diagnostics.s

Could you send out a fix or revert? Thanks.

Builder: https://ci.chromium.org/p/fuchsia/builders/ci/clang-linux-x64/b8887916992587484480

thakis added a subscriber: thakis.Feb 20 2020, 12:11 PM

I reverted this in 6f4d9d10293d8e93d7cf3397e3a82ac19c8b629f due to breaking tests everywhere.

dancgr reopened this revision.Feb 21 2020, 8:33 AM

Will look into that and update this review with the necessary changes.

Thanks @thakis for reverting the commit.

This revision is now accepted and ready to land.Feb 21 2020, 8:33 AM
This revision was automatically updated to reflect the committed changes.

Latest commit adds a change to the failing MC tests to be exactly the same as the MC tests for eor3 and bcax.