1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve2p1 < %s | FileCheck %s
4 define <vscale x 16 x i1> @test_pmov_to_pred_i8(<vscale x 16 x i8> %zn) {
5 ; CHECK-LABEL: test_pmov_to_pred_i8:
6 ; CHECK: // %bb.0: // %entry
7 ; CHECK-NEXT: pmov p0.b, z0
10 %res = call <vscale x 16 x i1> @llvm.aarch64.sve.pmov.to.pred.lane.nxv16i8(<vscale x 16 x i8> %zn, i32 0)
11 ret <vscale x 16 x i1> %res
14 define <vscale x 8 x i1> @test_pmov_to_pred_i16(<vscale x 8 x i16> %zn) {
15 ; CHECK-LABEL: test_pmov_to_pred_i16:
16 ; CHECK: // %bb.0: // %entry
17 ; CHECK-NEXT: ptrue p0.h
18 ; CHECK-NEXT: pmov p1.h, z0[0]
19 ; CHECK-NEXT: pmov p2.h, z0[1]
20 ; CHECK-NEXT: eor p0.b, p0/z, p1.b, p2.b
23 %res1 = call <vscale x 8 x i1> @llvm.aarch64.sve.pmov.to.pred.lane.nxv8i16(<vscale x 8 x i16> %zn, i32 0)
24 %res2 = call <vscale x 8 x i1> @llvm.aarch64.sve.pmov.to.pred.lane.nxv8i16(<vscale x 8 x i16> %zn, i32 1)
26 %res = add <vscale x 8 x i1> %res1, %res2
27 ret <vscale x 8 x i1> %res
30 define <vscale x 4 x i1> @test_pmov_to_pred_i32(<vscale x 4 x i32> %zn) {
31 ; CHECK-LABEL: test_pmov_to_pred_i32:
32 ; CHECK: // %bb.0: // %entry
33 ; CHECK-NEXT: ptrue p0.s
34 ; CHECK-NEXT: pmov p1.s, z0[0]
35 ; CHECK-NEXT: pmov p2.s, z0[3]
36 ; CHECK-NEXT: eor p0.b, p0/z, p1.b, p2.b
39 %res1 = call <vscale x 4 x i1> @llvm.aarch64.sve.pmov.to.pred.lane.nxv4i32(<vscale x 4 x i32> %zn, i32 0)
40 %res2 = call <vscale x 4 x i1> @llvm.aarch64.sve.pmov.to.pred.lane.nxv4i32(<vscale x 4 x i32> %zn, i32 3)
42 %res = add <vscale x 4 x i1> %res1, %res2
43 ret <vscale x 4 x i1> %res
46 define <vscale x 2 x i1> @test_pmov_to_pred_i64(<vscale x 2 x i64> %zn) {
47 ; CHECK-LABEL: test_pmov_to_pred_i64:
48 ; CHECK: // %bb.0: // %entry
49 ; CHECK-NEXT: ptrue p0.d
50 ; CHECK-NEXT: pmov p1.d, z0[0]
51 ; CHECK-NEXT: pmov p2.d, z0[7]
52 ; CHECK-NEXT: eor p0.b, p0/z, p1.b, p2.b
55 %res1 = call <vscale x 2 x i1> @llvm.aarch64.sve.pmov.to.pred.lane.nxv2i64(<vscale x 2 x i64> %zn, i32 0)
56 %res2 = call <vscale x 2 x i1> @llvm.aarch64.sve.pmov.to.pred.lane.nxv2i64(<vscale x 2 x i64> %zn, i32 7)
58 %res = add <vscale x 2 x i1> %res1, %res2
59 ret <vscale x 2 x i1> %res
62 declare <vscale x 16 x i1> @llvm.aarch64.sve.pmov.to.pred.lane.nxv16i8(<vscale x 16 x i8>, i32)
63 declare <vscale x 8 x i1> @llvm.aarch64.sve.pmov.to.pred.lane.nxv8i16(<vscale x 8 x i16>, i32)
64 declare <vscale x 4 x i1> @llvm.aarch64.sve.pmov.to.pred.lane.nxv4i32(<vscale x 4 x i32>, i32)
65 declare <vscale x 2 x i1> @llvm.aarch64.sve.pmov.to.pred.lane.nxv2i64(<vscale x 2 x i64>, i32)