[llvm] [NFC][LLVM][CodeGen] Refactor testing of SVE predicate logical instructions. (PR #206737)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 30 06:58:27 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-aarch64
Author: Paul Walker (paulwalker-arm)
<details>
<summary>Changes</summary>
---
Patch is 66.50 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/206737.diff
3 Files Affected:
- (modified) llvm/test/CodeGen/AArch64/sve-intrinsics-pred-operations.ll (+129-46)
- (modified) llvm/test/CodeGen/AArch64/sve-pred-log.ll (+854-293)
- (modified) llvm/test/CodeGen/AArch64/sve-select.ll (+120-28)
``````````diff
diff --git a/llvm/test/CodeGen/AArch64/sve-intrinsics-pred-operations.ll b/llvm/test/CodeGen/AArch64/sve-intrinsics-pred-operations.ll
index fd1469930726f..8a0403c59732a 100644
--- a/llvm/test/CodeGen/AArch64/sve-intrinsics-pred-operations.ll
+++ b/llvm/test/CodeGen/AArch64/sve-intrinsics-pred-operations.ll
@@ -2,6 +2,36 @@
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme -force-streaming < %s | FileCheck %s
+;
+; AND
+;
+
+define <vscale x 16 x i1> @and_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a, <vscale x 16 x i1> %b) {
+; CHECK-LABEL: and_b8:
+; CHECK: // %bb.0:
+; CHECK-NEXT: and p0.b, p0/z, p1.b, p2.b
+; CHECK-NEXT: ret
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.and.z.nxv16i1(<vscale x 16 x i1> %pg,
+ <vscale x 16 x i1> %a,
+ <vscale x 16 x i1> %b)
+ ret <vscale x 16 x i1> %res;
+}
+
+;
+; BIC
+;
+
+define <vscale x 16 x i1> @bic_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a, <vscale x 16 x i1> %b) {
+; CHECK-LABEL: bic_b8:
+; CHECK: // %bb.0:
+; CHECK-NEXT: bic p0.b, p0/z, p1.b, p2.b
+; CHECK-NEXT: ret
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.bic.z.nxv16i1(<vscale x 16 x i1> %pg,
+ <vscale x 16 x i1> %a,
+ <vscale x 16 x i1> %b)
+ ret <vscale x 16 x i1> %res;
+}
+
;
; BRKA
;
@@ -11,10 +41,10 @@ define <vscale x 16 x i1> @brka_m_b8(<vscale x 16 x i1> %inactive, <vscale x 16
; CHECK: // %bb.0:
; CHECK-NEXT: brka p0.b, p1/m, p2.b
; CHECK-NEXT: ret
- %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brka.nxv16i1(<vscale x 16 x i1> %inactive,
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.brka.nxv16i1(<vscale x 16 x i1> %inactive,
<vscale x 16 x i1> %pg,
<vscale x 16 x i1> %a)
- ret <vscale x 16 x i1> %out
+ ret <vscale x 16 x i1> %res
}
define <vscale x 16 x i1> @brka_z_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a) {
@@ -22,9 +52,9 @@ define <vscale x 16 x i1> @brka_z_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1>
; CHECK: // %bb.0:
; CHECK-NEXT: brka p0.b, p0/z, p1.b
; CHECK-NEXT: ret
- %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brka.z.nxv16i1(<vscale x 16 x i1> %pg,
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.brka.z.nxv16i1(<vscale x 16 x i1> %pg,
<vscale x 16 x i1> %a)
- ret <vscale x 16 x i1> %out
+ ret <vscale x 16 x i1> %res
}
;
@@ -36,10 +66,10 @@ define <vscale x 16 x i1> @brkb_m_b8(<vscale x 16 x i1> %inactive, <vscale x 16
; CHECK: // %bb.0:
; CHECK-NEXT: brkb p0.b, p1/m, p2.b
; CHECK-NEXT: ret
- %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brkb.nxv16i1(<vscale x 16 x i1> %inactive,
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.brkb.nxv16i1(<vscale x 16 x i1> %inactive,
<vscale x 16 x i1> %pg,
<vscale x 16 x i1> %a)
- ret <vscale x 16 x i1> %out
+ ret <vscale x 16 x i1> %res
}
define <vscale x 16 x i1> @brkb_z_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a) {
@@ -47,9 +77,9 @@ define <vscale x 16 x i1> @brkb_z_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1>
; CHECK: // %bb.0:
; CHECK-NEXT: brkb p0.b, p0/z, p1.b
; CHECK-NEXT: ret
- %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brkb.z.nxv16i1(<vscale x 16 x i1> %pg,
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.brkb.z.nxv16i1(<vscale x 16 x i1> %pg,
<vscale x 16 x i1> %a)
- ret <vscale x 16 x i1> %out
+ ret <vscale x 16 x i1> %res
}
;
@@ -62,10 +92,10 @@ define <vscale x 16 x i1> @brkn_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a
; CHECK-NEXT: brkn p2.b, p0/z, p1.b, p2.b
; CHECK-NEXT: mov p0.b, p2.b
; CHECK-NEXT: ret
- %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brkn.z.nxv16i1(<vscale x 16 x i1> %pg,
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.brkn.z.nxv16i1(<vscale x 16 x i1> %pg,
<vscale x 16 x i1> %a,
<vscale x 16 x i1> %b)
- ret <vscale x 16 x i1> %out
+ ret <vscale x 16 x i1> %res
}
;
@@ -77,10 +107,10 @@ define <vscale x 16 x i1> @brkpa_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %
; CHECK: // %bb.0:
; CHECK-NEXT: brkpa p0.b, p0/z, p1.b, p2.b
; CHECK-NEXT: ret
- %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brkpa.z.nxv16i1(<vscale x 16 x i1> %pg,
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.brkpa.z.nxv16i1(<vscale x 16 x i1> %pg,
<vscale x 16 x i1> %a,
<vscale x 16 x i1> %b)
- ret <vscale x 16 x i1> %out
+ ret <vscale x 16 x i1> %res
}
;
@@ -92,10 +122,85 @@ define <vscale x 16 x i1> @brkpb_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %
; CHECK: // %bb.0:
; CHECK-NEXT: brkpb p0.b, p0/z, p1.b, p2.b
; CHECK-NEXT: ret
- %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brkpb.z.nxv16i1(<vscale x 16 x i1> %pg,
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.brkpb.z.nxv16i1(<vscale x 16 x i1> %pg,
<vscale x 16 x i1> %a,
<vscale x 16 x i1> %b)
- ret <vscale x 16 x i1> %out
+ ret <vscale x 16 x i1> %res
+}
+
+;
+; EOR
+;
+
+define <vscale x 16 x i1> @eor_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a, <vscale x 16 x i1> %b) {
+; CHECK-LABEL: eor_b8:
+; CHECK: // %bb.0:
+; CHECK-NEXT: eor p0.b, p0/z, p1.b, p2.b
+; CHECK-NEXT: ret
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.eor.z.nxv16i1(<vscale x 16 x i1> %pg,
+ <vscale x 16 x i1> %a,
+ <vscale x 16 x i1> %b)
+ ret <vscale x 16 x i1> %res;
+}
+
+;
+; ORN
+;
+
+define <vscale x 16 x i1> @orn_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a, <vscale x 16 x i1> %b) {
+; CHECK-LABEL: orn_b8:
+; CHECK: // %bb.0:
+; CHECK-NEXT: orn p0.b, p0/z, p1.b, p2.b
+; CHECK-NEXT: ret
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.orn.z.nxv16i1(<vscale x 16 x i1> %pg,
+ <vscale x 16 x i1> %a,
+ <vscale x 16 x i1> %b)
+ ret <vscale x 16 x i1> %res;
+}
+
+;
+; ORR
+;
+
+define <vscale x 16 x i1> @orr_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a, <vscale x 16 x i1> %b) {
+; CHECK-LABEL: orr_b8:
+; CHECK: // %bb.0:
+; CHECK-NEXT: orr p0.b, p0/z, p1.b, p2.b
+; CHECK-NEXT: ret
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.orr.z.nxv16i1(<vscale x 16 x i1> %pg,
+ <vscale x 16 x i1> %a,
+ <vscale x 16 x i1> %b)
+ ret <vscale x 16 x i1> %res;
+}
+
+;
+; NAND
+;
+
+define <vscale x 16 x i1> @nand_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a, <vscale x 16 x i1> %b) {
+; CHECK-LABEL: nand_b8:
+; CHECK: // %bb.0:
+; CHECK-NEXT: nand p0.b, p0/z, p1.b, p2.b
+; CHECK-NEXT: ret
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.nand.z.nxv16i1(<vscale x 16 x i1> %pg,
+ <vscale x 16 x i1> %a,
+ <vscale x 16 x i1> %b)
+ ret <vscale x 16 x i1> %res;
+}
+
+;
+; NOR
+;
+
+define <vscale x 16 x i1> @nor_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a, <vscale x 16 x i1> %b) {
+; CHECK-LABEL: nor_b8:
+; CHECK: // %bb.0:
+; CHECK-NEXT: nor p0.b, p0/z, p1.b, p2.b
+; CHECK-NEXT: ret
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.nor.z.nxv16i1(<vscale x 16 x i1> %pg,
+ <vscale x 16 x i1> %a,
+ <vscale x 16 x i1> %b)
+ ret <vscale x 16 x i1> %res;
}
;
@@ -108,9 +213,9 @@ define <vscale x 16 x i1> @pfirst_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1>
; CHECK-NEXT: pfirst p1.b, p0, p1.b
; CHECK-NEXT: mov p0.b, p1.b
; CHECK-NEXT: ret
- %out = call <vscale x 16 x i1> @llvm.aarch64.sve.pfirst.nxv16i1(<vscale x 16 x i1> %pg,
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.pfirst.nxv16i1(<vscale x 16 x i1> %pg,
<vscale x 16 x i1> %a)
- ret <vscale x 16 x i1> %out
+ ret <vscale x 16 x i1> %res
}
;
@@ -123,9 +228,9 @@ define <vscale x 16 x i1> @pnext_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %
; CHECK-NEXT: pnext p1.b, p0, p1.b
; CHECK-NEXT: mov p0.b, p1.b
; CHECK-NEXT: ret
- %out = call <vscale x 16 x i1> @llvm.aarch64.sve.pnext.nxv16i1(<vscale x 16 x i1> %pg,
+ %res = call <vscale x 16 x i1> @llvm.aarch64.sve.pnext.nxv16i1(<vscale x 16 x i1> %pg,
<vscale x 16 x i1> %a)
- ret <vscale x 16 x i1> %out
+ ret <vscale x 16 x i1> %res
}
define <vscale x 8 x i1> @pnext_b16(<vscale x 8 x i1> %pg, <vscale x 8 x i1> %a) {
@@ -134,9 +239,9 @@ define <vscale x 8 x i1> @pnext_b16(<vscale x 8 x i1> %pg, <vscale x 8 x i1> %a)
; CHECK-NEXT: pnext p1.h, p0, p1.h
; CHECK-NEXT: mov p0.b, p1.b
; CHECK-NEXT: ret
- %out = call <vscale x 8 x i1> @llvm.aarch64.sve.pnext.nxv8i1(<vscale x 8 x i1> %pg,
+ %res = call <vscale x 8 x i1> @llvm.aarch64.sve.pnext.nxv8i1(<vscale x 8 x i1> %pg,
<vscale x 8 x i1> %a)
- ret <vscale x 8 x i1> %out
+ ret <vscale x 8 x i1> %res
}
define <vscale x 4 x i1> @pnext_b32(<vscale x 4 x i1> %pg, <vscale x 4 x i1> %a) {
@@ -145,9 +250,9 @@ define <vscale x 4 x i1> @pnext_b32(<vscale x 4 x i1> %pg, <vscale x 4 x i1> %a)
; CHECK-NEXT: pnext p1.s, p0, p1.s
; CHECK-NEXT: mov p0.b, p1.b
; CHECK-NEXT: ret
- %out = call <vscale x 4 x i1> @llvm.aarch64.sve.pnext.nxv4i1(<vscale x 4 x i1> %pg,
+ %res = call <vscale x 4 x i1> @llvm.aarch64.sve.pnext.nxv4i1(<vscale x 4 x i1> %pg,
<vscale x 4 x i1> %a)
- ret <vscale x 4 x i1> %out
+ ret <vscale x 4 x i1> %res
}
define <vscale x 2 x i1> @pnext_b64(<vscale x 2 x i1> %pg, <vscale x 2 x i1> %a) {
@@ -156,9 +261,9 @@ define <vscale x 2 x i1> @pnext_b64(<vscale x 2 x i1> %pg, <vscale x 2 x i1> %a)
; CHECK-NEXT: pnext p1.d, p0, p1.d
; CHECK-NEXT: mov p0.b, p1.b
; CHECK-NEXT: ret
- %out = call <vscale x 2 x i1> @llvm.aarch64.sve.pnext.nxv2i1(<vscale x 2 x i1> %pg,
+ %res = call <vscale x 2 x i1> @llvm.aarch64.sve.pnext.nxv2i1(<vscale x 2 x i1> %pg,
<vscale x 2 x i1> %a)
- ret <vscale x 2 x i1> %out
+ ret <vscale x 2 x i1> %res
}
;
@@ -223,25 +328,3 @@ define <vscale x 2 x i1> @punpklo_b4(<vscale x 4 x i1> %a) {
ret <vscale x 2 x i1> %res
}
-declare <vscale x 16 x i1> @llvm.aarch64.sve.brka.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>)
-declare <vscale x 16 x i1> @llvm.aarch64.sve.brka.z.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>)
-declare <vscale x 16 x i1> @llvm.aarch64.sve.brkb.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>)
-declare <vscale x 16 x i1> @llvm.aarch64.sve.brkb.z.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>)
-declare <vscale x 16 x i1> @llvm.aarch64.sve.brkn.z.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>)
-declare <vscale x 16 x i1> @llvm.aarch64.sve.brkpa.z.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>)
-declare <vscale x 16 x i1> @llvm.aarch64.sve.brkpb.z.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>)
-
-declare <vscale x 16 x i1> @llvm.aarch64.sve.pfirst.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>)
-
-declare <vscale x 16 x i1> @llvm.aarch64.sve.pnext.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>)
-declare <vscale x 8 x i1> @llvm.aarch64.sve.pnext.nxv8i1(<vscale x 8 x i1>, <vscale x 8 x i1>)
-declare <vscale x 4 x i1> @llvm.aarch64.sve.pnext.nxv4i1(<vscale x 4 x i1>, <vscale x 4 x i1>)
-declare <vscale x 2 x i1> @llvm.aarch64.sve.pnext.nxv2i1(<vscale x 2 x i1>, <vscale x 2 x i1>)
-
-declare <vscale x 8 x i1> @llvm.aarch64.sve.punpkhi.nxv8i1(<vscale x 16 x i1>)
-declare <vscale x 4 x i1> @llvm.aarch64.sve.punpkhi.nxv4i1(<vscale x 8 x i1>)
-declare <vscale x 2 x i1> @llvm.aarch64.sve.punpkhi.nxv2i1(<vscale x 4 x i1>)
-
-declare <vscale x 8 x i1> @llvm.aarch64.sve.punpklo.nxv8i1(<vscale x 16 x i1>)
-declare <vscale x 4 x i1> @llvm.aarch64.sve.punpklo.nxv4i1(<vscale x 8 x i1>)
-declare <vscale x 2 x i1> @llvm.aarch64.sve.punpklo.nxv2i1(<vscale x 4 x i1>)
diff --git a/llvm/test/CodeGen/AArch64/sve-pred-log.ll b/llvm/test/CodeGen/AArch64/sve-pred-log.ll
index a66375258db3a..418dc503695a4 100644
--- a/llvm/test/CodeGen/AArch64/sve-pred-log.ll
+++ b/llvm/test/CodeGen/AArch64/sve-pred-log.ll
@@ -1,294 +1,855 @@
-; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
-
-define <vscale x 16 x i1> @vselect_16(<vscale x 16 x i1> %Pg, <vscale x 16 x i1> %Pn, <vscale x 16 x i1> %Pd) {
-; CHECK-LABEL: vselect_16:
-; CHECK: sel p0.b, p0, p1.b, p2.b
-; CHECK-NEXT: ret
- %res = select <vscale x 16 x i1> %Pg, <vscale x 16 x i1> %Pn, <vscale x 16 x i1> %Pd
- ret <vscale x 16 x i1> %res;
-}
-
-define <vscale x 8 x i1> @vselect_8(<vscale x 8 x i1> %Pg, <vscale x 8 x i1> %Pn, <vscale x 8 x i1> %Pd) {
-; CHECK-LABEL: vselect_8:
-; CHECK: sel p0.b, p0, p1.b, p2.b
-; CHECK-NEXT: ret
- %res = select <vscale x 8 x i1> %Pg, <vscale x 8 x i1> %Pn, <vscale x 8 x i1> %Pd
- ret <vscale x 8 x i1> %res;
-}
-
-define <vscale x 4 x i1> @vselect_4(<vscale x 4 x i1> %Pg, <vscale x 4 x i1> %Pn, <vscale x 4 x i1> %Pd) {
-; CHECK-LABEL: vselect_4:
-; CHECK: sel p0.b, p0, p1.b, p2.b
-; CHECK-NEXT: ret
- %res = select <vscale x 4 x i1> %Pg, <vscale x 4 x i1> %Pn, <vscale x 4 x i1> %Pd
- ret <vscale x 4 x i1> %res;
-}
-
-define <vscale x 2 x i1> @vselect_2(<vscale x 2 x i1> %Pg, <vscale x 2 x i1> %Pn, <vscale x 2 x i1> %Pd) {
-; CHECK-LABEL: vselect_2:
-; CHECK: sel p0.b, p0, p1.b, p2.b
-; CHECK-NEXT: ret
- %res = select <vscale x 2 x i1> %Pg, <vscale x 2 x i1> %Pn, <vscale x 2 x i1> %Pd
- ret <vscale x 2 x i1> %res;
-}
-
-define <vscale x 1 x i1> @vselect_1(<vscale x 1 x i1> %Pg, <vscale x 1 x i1> %Pn, <vscale x 1 x i1> %Pd) {
-; CHECK-LABEL: vselect_1:
-; CHECK: sel p0.b, p0, p1.b, p2.b
-; CHECK-NEXT: ret
- %res = select <vscale x 1 x i1> %Pg, <vscale x 1 x i1> %Pn, <vscale x 1 x i1> %Pd
- ret <vscale x 1 x i1> %res;
-}
-
-define <vscale x 16 x i1> @and_16(<vscale x 16 x i1> %Pg, <vscale x 16 x i1> %Pn, <vscale x 16 x i1> %Pd) {
-; CHECK-LABEL: and_16:
-; CHECK: and p0.b, p0/z, p1.b, p2.b
-; CHECK-NEXT: ret
- %res = call <vscale x 16 x i1> @llvm.aarch64.sve.and.z.nxv16i1(<vscale x 16 x i1> %Pg, <vscale x 16 x i1> %Pn, <vscale x 16 x i1> %Pd)
- ret <vscale x 16 x i1> %res;
-}
-
-define <vscale x 8 x i1> @and_8(<vscale x 8 x i1> %Pg, <vscale x 8 x i1> %Pn, <vscale x 8 x i1> %Pd) {
-; CHECK-LABEL: and_8:
-; CHECK: and p0.b, p0/z, p1.b, p2.b
-; CHECK-NEXT: ret
- %res = call <vscale x 8 x i1> @llvm.aarch64.sve.and.z.nxv8i1(<vscale x 8 x i1> %Pg, <vscale x 8 x i1> %Pn, <vscale x 8 x i1> %Pd)
- ret <vscale x 8 x i1> %res;
-}
-
-define <vscale x 4 x i1> @and_4(<vscale x 4 x i1> %Pg, <vscale x 4 x i1> %Pn, <vscale x 4 x i1> %Pd) {
-; CHECK-LABEL: and_4:
-; CHECK: and p0.b, p0/z, p1.b, p2.b
-; CHECK-NEXT: ret
- %res = call <vscale x 4 x i1> @llvm.aarch64.sve.and.z.nxv4i1(<vscale x 4 x i1> %Pg, <vscale x 4 x i1> %Pn, <vscale x 4 x i1> %Pd)
- ret <vscale x 4 x i1> %res;
-}
-
-define <vscale x 2 x i1> @and_2(<vscale x 2 x i1> %Pg, <vscale x 2 x i1> %Pn, <vscale x 2 x i1> %Pd) {
-; CHECK-LABEL: and_2:
-; CHECK: and p0.b, p0/z, p1.b, p2.b
-; CHECK-NEXT: ret
- %res = call <vscale x 2 x i1> @llvm.aarch64.sve.and.z.nxv2i1(<vscale x 2 x i1> %Pg, <vscale x 2 x i1> %Pn, <vscale x 2 x i1> %Pd)
- ret <vscale x 2 x i1> %res;
-}
-
-define <vscale x 16 x i1> @bic_16(<vscale x 16 x i1> %Pg, <vscale x 16 x i1> %Pn, <vscale x 16 x i1> %Pd) {
-; CHECK-LABEL: bic_16:
-; CHECK: bic p0.b, p0/z, p1.b, p2.b
-; CHECK-NEXT: ret
- %res = call <vscale x 16 x i1> @llvm.aarch64.sve.bic.z.nxv16i1(<vscale x 16 x i1> %Pg, <vscale x 16 x i1> %Pn, <vscale x 16 x i1> %Pd)
- ret <vscale x 16 x i1> %res;
-}
-
-define <vscale x 8 x i1> @bic_8(<vscale x 8 x i1> %Pg, <vscale x 8 x i1> %Pn, <vscale x 8 x i1> %Pd) {
-; CHECK-LABEL: bic_8:
-; CHECK: bic p0.b, p0/z, p1.b, p2.b
-; CHECK-NEXT: ret
- %res = call <vscale x 8 x i1> @llvm.aarch64.sve.bic.z.nxv8i1(<vscale x 8 x i1> %Pg, <vscale x 8 x i1> %Pn, <vscale x 8 x i1> %Pd)
- ret <vscale x 8 x i1> %res;
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc -mtriple=aarch64-unknown-linux-gnu -mattr=+sve < %s | FileCheck %s
+
+define <vscale x 16 x i1> @and_nxv16i1(<vscale x 16 x i1> %a, <vscale x 16 x i1> %b) {
+; CHECK-LABEL: and_nxv16i1:
+; CHECK: // %bb.0:
+; CHECK-NEXT: and p0.b, p0/z, p0.b, p1.b
+; CHECK-NEXT: ret
+ %res = and <vscale x 16 x i1> %a, %b
+ ret <vscale x 16 x i1> %res
+}
+
+define <vscale x 8 x i1> @and_nxv8i1(<vscale x 8 x i1> %a, <vscale x 8 x i1> %b) {
+; CHECK-LABEL: and_nxv8i1:
+; CHECK: // %bb.0:
+; CHECK-NEXT: and p0.b, p0/z, p0.b, p1.b
+; CHECK-NEXT: ret
+ %res = and <vscale x 8 x i1> %a, %b
+ ret <vscale x 8 x i1> %res
+}
+
+define <vscale x 4 x i1> @and_nxv4i1(<vscale x 4 x i1> %a, <vscale x 4 x i1> %b) {
+; CHECK-LABEL: and_nxv4i1:
+; CHECK: // %bb.0:
+; CHECK-NEXT: and p0.b, p0/z, p0.b, p1.b
+; CHECK-NEXT: ret
+ %res = and <vscale x 4 x i1> %a, %b
+ ret <vscale x 4 x i1> %res
+}
+
+define <vscale x 2 x i1> @and_nxv2i1(<vscale x 2 x i1> %a, <vscale x 2 x i1> %b) {
+; CHECK-LABEL: and_nxv2i1:
+; CHECK: // %bb.0:
+; CHECK-NEXT: and p0.b, p0/z, p0.b, p1.b
+; CHECK-NEXT: ret
+ %res = and <vscale x 2 x i1> %a, %b
+ ret <vscale x 2 x i1> %res
+}
+
+define <vscale x 1 x i1> @and_nxv1i1(<vscale x 1 x i1> %a, <vscale x 1 x i1> %b) {
+; CHECK-LABEL: and_nxv1i1:
+; CHECK: // %bb.0:
+; CHECK-NEXT: and p0.b, p0/z, p0.b, p1.b
+; CHECK-NEXT: ret
+ %res = and <vscale x 1 x i1> %a, %b
+ ret <vscale x 1 x i1> %res
+}
+
+define <vscale x 16 x i1> @and_and_nxv16i1(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a, <vscale x 16 x i1> %b) {
+; CHECK-LABEL: and_and_nxv16i1:
+; CHECK: // %bb.0:
+; CHECK-NEXT: and p2.b, p1/z, p1.b, p2.b
+; CHECK-NEXT: and p0.b, p0/z, p0.b, p2.b
+; CHECK-NEXT: ret
+ %op = and <vscale x 16 x i1> %a, %b
+ %res = and <vscale x 16 x i1> %pg, %op
+ ret <vscale x 16 x i1> %res
+}
+
+define <vscale x 8 x i1> @and_and_nxv8i1(<vscale x 8 x i1> %pg, <vscale x 8 x i1> %a, <vscale x 8 x i1> %b) {
+; CHECK-LABEL: and_and_nxv8i1:
+; CHECK: // %bb.0:
+; CHECK-NEXT: and p2.b, p1/z, p1.b, p2.b
+; CHECK-NEXT: and p0.b, p0/z, p0.b, p2.b
+; CHECK-NEXT: ret
+ %op = and <vscale x 8 x i1> %a, %b
+ %res = and <vscale x 8 x i1> %pg, %op
+ ret <vscale x 8 x i1> %res
+}
+
+define <vscale x 4 x i1> @and_and_nxv4i1(<vscale x 4 x i1> %pg, <vscale x 4 x i1> %a, <vscale x 4 x i1> %b) {
+; CHECK-LABEL: and_and_nxv4i1:
+; CHECK: // %bb.0:
+; CHECK-NEXT: and p2.b, p1/z, p1.b, p2.b
+; CHECK-NEXT: and p0.b, p0/z, p0.b, p2.b
+; CHECK-NEXT: ret
+ %op = and <vscale x 4 x i1> %a, %b
+ %res = and <vscale x 4 x i1> %pg, %op
+ ret <vscale x 4 x i1> %res
+}
+
+define <vscale x 2 x i1> @and_and_nxv2i1(<vscale x 2 x i1> %pg, <vscale x 2 x i1> %a, <vscale x 2 x i1> %b) {
+; CHECK-LABEL: and_and_nxv2i1:
+; CHECK: // %bb.0:
+; CHECK-NEXT: and p2.b, p1/z, p1.b, p2.b...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/206737
More information about the llvm-commits
mailing list