; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s 2>%t | FileCheck %s ; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t ; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it. ; WARN-NOT: warning define @vselect_16( %Pg, %Pn, %Pd) { ; CHECK-LABEL: vselect_16: ; CHECK: sel p0.b, p0, p1.b, p2.b ; CHECK-NEXT: ret %res = select %Pg, %Pn, %Pd ret %res; } define @vselect_8( %Pg, %Pn, %Pd) { ; CHECK-LABEL: vselect_8: ; CHECK: sel p0.b, p0, p1.b, p2.b ; CHECK-NEXT: ret %res = select %Pg, %Pn, %Pd ret %res; } define @vselect_4( %Pg, %Pn, %Pd) { ; CHECK-LABEL: vselect_4: ; CHECK: sel p0.b, p0, p1.b, p2.b ; CHECK-NEXT: ret %res = select %Pg, %Pn, %Pd ret %res; } define @vselect_2( %Pg, %Pn, %Pd) { ; CHECK-LABEL: vselect_2: ; CHECK: sel p0.b, p0, p1.b, p2.b ; CHECK-NEXT: ret %res = select %Pg, %Pn, %Pd ret %res; } define @and_16( %Pg, %Pn, %Pd) { ; CHECK-LABEL: and_16: ; CHECK: and p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.and.z.nxv16i1( %Pg, %Pn, %Pd) ret %res; } define @and_8( %Pg, %Pn, %Pd) { ; CHECK-LABEL: and_8: ; CHECK: and p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.and.z.nxv8i1( %Pg, %Pn, %Pd) ret %res; } define @and_4( %Pg, %Pn, %Pd) { ; CHECK-LABEL: and_4: ; CHECK: and p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.and.z.nxv4i1( %Pg, %Pn, %Pd) ret %res; } define @and_2( %Pg, %Pn, %Pd) { ; CHECK-LABEL: and_2: ; CHECK: and p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.and.z.nxv2i1( %Pg, %Pn, %Pd) ret %res; } define @bic_16( %Pg, %Pn, %Pd) { ; CHECK-LABEL: bic_16: ; CHECK: bic p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.bic.z.nxv16i1( %Pg, %Pn, %Pd) ret %res; } define @bic_8( %Pg, %Pn, %Pd) { ; CHECK-LABEL: bic_8: ; CHECK: bic p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.bic.z.nxv8i1( %Pg, %Pn, %Pd) ret %res; } define @bic_4( %Pg, %Pn, %Pd) { ; CHECK-LABEL: bic_4: ; CHECK: bic p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.bic.z.nxv4i1( %Pg, %Pn, %Pd) ret %res; } define @bic_2( %Pg, %Pn, %Pd) { ; CHECK-LABEL: bic_2: ; CHECK: bic p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.bic.z.nxv2i1( %Pg, %Pn, %Pd) ret %res; } define @eor_16( %Pg, %Pn, %Pd) { ; CHECK-LABEL: eor_16: ; CHECK: eor p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.eor.z.nxv16i1( %Pg, %Pn, %Pd) ret %res; } define @eor_8( %Pg, %Pn, %Pd) { ; CHECK-LABEL: eor_8: ; CHECK: eor p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.eor.z.nxv8i1( %Pg, %Pn, %Pd) ret %res; } define @eor_4( %Pg, %Pn, %Pd) { ; CHECK-LABEL: eor_4: ; CHECK: eor p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.eor.z.nxv4i1( %Pg, %Pn, %Pd) ret %res; } define @eor_2( %Pg, %Pn, %Pd) { ; CHECK-LABEL: eor_2: ; CHECK: eor p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.eor.z.nxv2i1( %Pg, %Pn, %Pd) ret %res; } define @orr_16( %Pg, %Pn, %Pd) { ; CHECK-LABEL: orr_16: ; CHECK: orr p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.orr.z.nxv16i1( %Pg, %Pn, %Pd) ret %res; } define @orr_8( %Pg, %Pn, %Pd) { ; CHECK-LABEL: orr_8: ; CHECK: orr p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.orr.z.nxv8i1( %Pg, %Pn, %Pd) ret %res; } define @orr_4( %Pg, %Pn, %Pd) { ; CHECK-LABEL: orr_4: ; CHECK: orr p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.orr.z.nxv4i1( %Pg, %Pn, %Pd) ret %res; } define @orr_2( %Pg, %Pn, %Pd) { ; CHECK-LABEL: orr_2: ; CHECK: orr p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.orr.z.nxv2i1( %Pg, %Pn, %Pd) ret %res; } define @orn_16( %Pg, %Pn, %Pd) { ; CHECK-LABEL: orn_16: ; CHECK: orn p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.orn.z.nxv16i1( %Pg, %Pn, %Pd) ret %res; } define @orn_8( %Pg, %Pn, %Pd) { ; CHECK-LABEL: orn_8: ; CHECK: orn p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.orn.z.nxv8i1( %Pg, %Pn, %Pd) ret %res; } define @orn_4( %Pg, %Pn, %Pd) { ; CHECK-LABEL: orn_4: ; CHECK: orn p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.orn.z.nxv4i1( %Pg, %Pn, %Pd) ret %res; } define @orn_2( %Pg, %Pn, %Pd) { ; CHECK-LABEL: orn_2: ; CHECK: orn p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.orn.z.nxv2i1( %Pg, %Pn, %Pd) ret %res; } define @nor_16( %Pg, %Pn, %Pd) { ; CHECK-LABEL: nor_16: ; CHECK: nor p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.nor.z.nxv16i1( %Pg, %Pn, %Pd) ret %res; } define @nor_8( %Pg, %Pn, %Pd) { ; CHECK-LABEL: nor_8: ; CHECK: nor p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.nor.z.nxv8i1( %Pg, %Pn, %Pd) ret %res; } define @nor_4( %Pg, %Pn, %Pd) { ; CHECK-LABEL: nor_4: ; CHECK: nor p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.nor.z.nxv4i1( %Pg, %Pn, %Pd) ret %res; } define @nor_2( %Pg, %Pn, %Pd) { ; CHECK-LABEL: nor_2: ; CHECK: nor p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.nor.z.nxv2i1( %Pg, %Pn, %Pd) ret %res; } define @nand_16( %Pg, %Pn, %Pd) { ; CHECK-LABEL: nand_16: ; CHECK: nand p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.nand.z.nxv16i1( %Pg, %Pn, %Pd) ret %res; } define @nand_8( %Pg, %Pn, %Pd) { ; CHECK-LABEL: nand_8: ; CHECK: nand p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.nand.z.nxv8i1( %Pg, %Pn, %Pd) ret %res; } define @nand_4( %Pg, %Pn, %Pd) { ; CHECK-LABEL: nand_4: ; CHECK: nand p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.nand.z.nxv4i1( %Pg, %Pn, %Pd) ret %res; } define @nand_2( %Pg, %Pn, %Pd) { ; CHECK-LABEL: nand_2: ; CHECK: nand p0.b, p0/z, p1.b, p2.b ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.nand.z.nxv2i1( %Pg, %Pn, %Pd) ret %res; } declare @llvm.aarch64.sve.and.z.nxv16i1(, , ) declare @llvm.aarch64.sve.and.z.nxv8i1(, , ) declare @llvm.aarch64.sve.and.z.nxv4i1(, , ) declare @llvm.aarch64.sve.and.z.nxv2i1(, , ) declare @llvm.aarch64.sve.bic.z.nxv16i1(, , ) declare @llvm.aarch64.sve.bic.z.nxv8i1(, , ) declare @llvm.aarch64.sve.bic.z.nxv4i1(, , ) declare @llvm.aarch64.sve.bic.z.nxv2i1(, , ) declare @llvm.aarch64.sve.eor.z.nxv16i1(, , ) declare @llvm.aarch64.sve.eor.z.nxv8i1(, , ) declare @llvm.aarch64.sve.eor.z.nxv4i1(, , ) declare @llvm.aarch64.sve.eor.z.nxv2i1(, , ) declare @llvm.aarch64.sve.orr.z.nxv16i1(, , ) declare @llvm.aarch64.sve.orr.z.nxv8i1(, , ) declare @llvm.aarch64.sve.orr.z.nxv4i1(, , ) declare @llvm.aarch64.sve.orr.z.nxv2i1(, , ) declare @llvm.aarch64.sve.orn.z.nxv16i1(, , ) declare @llvm.aarch64.sve.orn.z.nxv8i1(, , ) declare @llvm.aarch64.sve.orn.z.nxv4i1(, , ) declare @llvm.aarch64.sve.orn.z.nxv2i1(, , ) declare @llvm.aarch64.sve.nor.z.nxv16i1(, , ) declare @llvm.aarch64.sve.nor.z.nxv8i1(, , ) declare @llvm.aarch64.sve.nor.z.nxv4i1(, , ) declare @llvm.aarch64.sve.nor.z.nxv2i1(, , ) declare @llvm.aarch64.sve.nand.z.nxv16i1(, , ) declare @llvm.aarch64.sve.nand.z.nxv8i1(, , ) declare @llvm.aarch64.sve.nand.z.nxv4i1(, , ) declare @llvm.aarch64.sve.nand.z.nxv2i1(, , )