1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64--linux-gnu -mattr=+sve %s -o - | FileCheck %s
4 define i32 @pfirst_16(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a) {
5 ; CHECK-LABEL: pfirst_16:
7 ; CHECK-NEXT: pfirst p1.b, p0, p1.b
8 ; CHECK-NEXT: cset w0, ne
10 %1 = tail call <vscale x 16 x i1> @llvm.aarch64.sve.pfirst.nxv16i1(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a)
11 %2 = tail call i1 @llvm.aarch64.sve.ptest.any.nxv16i1(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %1)
12 %conv = zext i1 %2 to i32
16 define i32 @pnext_2(<vscale x 2 x i1> %pg, <vscale x 2 x i1> %a) {
17 ; CHECK-LABEL: pnext_2:
19 ; CHECK-NEXT: pnext p1.d, p0, p1.d
20 ; CHECK-NEXT: cset w0, ne
22 %1 = tail call <vscale x 2 x i1> @llvm.aarch64.sve.pnext.nxv2i1(<vscale x 2 x i1> %pg, <vscale x 2 x i1> %a)
23 %2 = tail call i1 @llvm.aarch64.sve.ptest.any.nxv2i1(<vscale x 2 x i1> %pg, <vscale x 2 x i1> %1)
24 %conv = zext i1 %2 to i32
28 define i32 @pnext_4(<vscale x 4 x i1> %pg, <vscale x 4 x i1> %a) {
29 ; CHECK-LABEL: pnext_4:
31 ; CHECK-NEXT: pnext p1.s, p0, p1.s
32 ; CHECK-NEXT: cset w0, ne
34 %1 = tail call <vscale x 4 x i1> @llvm.aarch64.sve.pnext.nxv4i1(<vscale x 4 x i1> %pg, <vscale x 4 x i1> %a)
35 %2 = tail call i1 @llvm.aarch64.sve.ptest.any.nxv4i1(<vscale x 4 x i1> %pg, <vscale x 4 x i1> %1)
36 %conv = zext i1 %2 to i32
40 define i32 @pnext_8(<vscale x 8 x i1> %pg, <vscale x 8 x i1> %a) {
41 ; CHECK-LABEL: pnext_8:
43 ; CHECK-NEXT: pnext p1.h, p0, p1.h
44 ; CHECK-NEXT: cset w0, ne
46 %1 = tail call <vscale x 8 x i1> @llvm.aarch64.sve.pnext.nxv8i1(<vscale x 8 x i1> %pg, <vscale x 8 x i1> %a)
47 %2 = tail call i1 @llvm.aarch64.sve.ptest.any.nxv8i1(<vscale x 8 x i1> %pg, <vscale x 8 x i1> %1)
48 %conv = zext i1 %2 to i32
52 define i32 @pnext_16(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a) {
53 ; CHECK-LABEL: pnext_16:
55 ; CHECK-NEXT: pnext p1.b, p0, p1.b
56 ; CHECK-NEXT: cset w0, ne
58 %1 = tail call <vscale x 16 x i1> @llvm.aarch64.sve.pnext.nxv16i1(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a)
59 %2 = tail call i1 @llvm.aarch64.sve.ptest.any.nxv16i1(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %1)
60 %conv = zext i1 %2 to i32
64 declare <vscale x 16 x i1> @llvm.aarch64.sve.pfirst.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>)
66 declare <vscale x 16 x i1> @llvm.aarch64.sve.pnext.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>)
67 declare <vscale x 8 x i1> @llvm.aarch64.sve.pnext.nxv8i1(<vscale x 8 x i1>, <vscale x 8 x i1>)
68 declare <vscale x 4 x i1> @llvm.aarch64.sve.pnext.nxv4i1(<vscale x 4 x i1>, <vscale x 4 x i1>)
69 declare <vscale x 2 x i1> @llvm.aarch64.sve.pnext.nxv2i1(<vscale x 2 x i1>, <vscale x 2 x i1>)
71 declare i1 @llvm.aarch64.sve.ptest.any.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>)
72 declare i1 @llvm.aarch64.sve.ptest.any.nxv8i1(<vscale x 8 x i1>, <vscale x 8 x i1>)
73 declare i1 @llvm.aarch64.sve.ptest.any.nxv4i1(<vscale x 4 x i1>, <vscale x 4 x i1>)
74 declare i1 @llvm.aarch64.sve.ptest.any.nxv2i1(<vscale x 2 x i1>, <vscale x 2 x i1>)