[llvm] [AArch64][SVE2] Add pattern for BCAX (PR #77159)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 6 14:01:51 PST 2024
================
@@ -0,0 +1,143 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc -mtriple=aarch64 -mattr=+sve < %s -o - | FileCheck --check-prefix=SVE %s
+; RUN: llc -mtriple=aarch64 -mattr=+sve2 < %s -o - | FileCheck --check-prefix=SVE2 %s
+
+define <vscale x 2 x i64> @bcax_nxv2i64_1(<vscale x 2 x i64> %0, <vscale x 2 x i64> %1, <vscale x 2 x i64> %2) #0 {
+; SVE-LABEL: bcax_nxv2i64_1:
+; SVE: // %bb.0:
+; SVE-NEXT: bic z1.d, z2.d, z1.d
+; SVE-NEXT: eor z0.d, z1.d, z0.d
+; SVE-NEXT: ret
+;
+; SVE2-LABEL: bcax_nxv2i64_1:
+; SVE2: // %bb.0:
+; SVE2-NEXT: bcax z0.d, z0.d, z2.d, z1.d
+; SVE2-NEXT: ret
+ %4 = xor <vscale x 2 x i64> %1, shufflevector (<vscale x 2 x i64> insertelement (<vscale x 2 x i64> poison, i64 -1, i64 0), <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer)
----------------
paulwalker-arm wrote:
We're migrating away from ConstantExpr so do you mind using the new splat shorthand for these tests (i.e. `splat ( i64 -1)`). The created IR will be the same but the tests will at least be ready for the migration, plus easier to read.
https://github.com/llvm/llvm-project/pull/77159
More information about the llvm-commits
mailing list