diff --git a/llvm/include/llvm/IR/IntrinsicsAArch64.td b/llvm/include/llvm/IR/IntrinsicsAArch64.td --- a/llvm/include/llvm/IR/IntrinsicsAArch64.td +++ b/llvm/include/llvm/IR/IntrinsicsAArch64.td @@ -1011,12 +1011,6 @@ def int_aarch64_sve_sub : AdvSIMD_Pred2VectorArg_Intrinsic; def int_aarch64_sve_subr : AdvSIMD_Pred2VectorArg_Intrinsic; -def int_aarch64_sve_and : AdvSIMD_Pred2VectorArg_Intrinsic; -def int_aarch64_sve_or : AdvSIMD_Pred2VectorArg_Intrinsic; -def int_aarch64_sve_xor : AdvSIMD_Pred2VectorArg_Intrinsic; -def int_aarch64_sve_bic : AdvSIMD_2VectorArg_Intrinsic; -def int_aarch64_sve_bic_pred : AdvSIMD_Pred2VectorArg_Intrinsic; - def int_aarch64_sve_mul : AdvSIMD_Pred2VectorArg_Intrinsic; def int_aarch64_sve_smulh : AdvSIMD_Pred2VectorArg_Intrinsic; def int_aarch64_sve_umulh : AdvSIMD_Pred2VectorArg_Intrinsic; @@ -1092,6 +1086,25 @@ def int_aarch64_sve_cnot : AdvSIMD_Merged1VectorArg_Intrinsic; def int_aarch64_sve_not : AdvSIMD_Merged1VectorArg_Intrinsic; +def int_aarch64_sve_and : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_or : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_xor : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_bic_base : AdvSIMD_2VectorArg_Intrinsic; +def int_aarch64_sve_bic : AdvSIMD_Pred2VectorArg_Intrinsic; + +def int_aarch64_sve_eor : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_ands : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_bics : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_eors : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_orr : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_orn : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_nor : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_nand : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_orrs : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_orns : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_nors : AdvSIMD_Pred2VectorArg_Intrinsic; +def int_aarch64_sve_nands : AdvSIMD_Pred2VectorArg_Intrinsic; + // // Conversion // diff --git a/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td b/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td --- a/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td +++ b/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td @@ -46,7 +46,7 @@ defm AND_ZZZ : sve_int_bin_cons_log<0b00, "and", and>; defm ORR_ZZZ : sve_int_bin_cons_log<0b01, "orr", or>; defm EOR_ZZZ : sve_int_bin_cons_log<0b10, "eor", xor>; - defm BIC_ZZZ : sve_int_bin_cons_log<0b11, "bic", int_aarch64_sve_bic>; + defm BIC_ZZZ : sve_int_bin_cons_log<0b11, "bic", int_aarch64_sve_bic_base>; defm ADD_ZPmZ : sve_int_bin_pred_arit_0<0b000, "add", int_aarch64_sve_add>; defm SUB_ZPmZ : sve_int_bin_pred_arit_0<0b001, "sub", int_aarch64_sve_sub>; @@ -55,7 +55,7 @@ defm ORR_ZPmZ : sve_int_bin_pred_log<0b000, "orr", int_aarch64_sve_or>; defm EOR_ZPmZ : sve_int_bin_pred_log<0b001, "eor", int_aarch64_sve_xor>; defm AND_ZPmZ : sve_int_bin_pred_log<0b010, "and", int_aarch64_sve_and>; - defm BIC_ZPmZ : sve_int_bin_pred_log<0b011, "bic", int_aarch64_sve_bic_pred>; + defm BIC_ZPmZ : sve_int_bin_pred_log<0b011, "bic", int_aarch64_sve_bic>; defm ADD_ZI : sve_int_arith_imm0<0b000, "add">; defm SUB_ZI : sve_int_arith_imm0<0b001, "sub">; @@ -262,21 +262,21 @@ defm PFIRST : sve_int_pfirst<0b00000, "pfirst">; defm PNEXT : sve_int_pnext<0b00110, "pnext">; - def AND_PPzPP : sve_int_pred_log<0b0000, "and">; - def BIC_PPzPP : sve_int_pred_log<0b0001, "bic">; - def EOR_PPzPP : sve_int_pred_log<0b0010, "eor">; - def SEL_PPPP : sve_int_pred_log<0b0011, "sel">; - def ANDS_PPzPP : sve_int_pred_log<0b0100, "ands">; - def BICS_PPzPP : sve_int_pred_log<0b0101, "bics">; - def EORS_PPzPP : sve_int_pred_log<0b0110, "eors">; - def ORR_PPzPP : sve_int_pred_log<0b1000, "orr">; - def ORN_PPzPP : sve_int_pred_log<0b1001, "orn">; - def NOR_PPzPP : sve_int_pred_log<0b1010, "nor">; - def NAND_PPzPP : sve_int_pred_log<0b1011, "nand">; - def ORRS_PPzPP : sve_int_pred_log<0b1100, "orrs">; - def ORNS_PPzPP : sve_int_pred_log<0b1101, "orns">; - def NORS_PPzPP : sve_int_pred_log<0b1110, "nors">; - def NANDS_PPzPP : sve_int_pred_log<0b1111, "nands">; + defm AND_PPzPP : sve_int_pred_log<0b0000, "and", int_aarch64_sve_and>; + defm BIC_PPzPP : sve_int_pred_log<0b0001, "bic", int_aarch64_sve_bic>; + defm EOR_PPzPP : sve_int_pred_log<0b0010, "eor", int_aarch64_sve_eor>; + defm SEL_PPPP : sve_int_pred_log<0b0011, "sel", vselect>; + defm ANDS_PPzPP : sve_int_pred_log<0b0100, "ands", int_aarch64_sve_ands>; + defm BICS_PPzPP : sve_int_pred_log<0b0101, "bics", int_aarch64_sve_bics>; + defm EORS_PPzPP : sve_int_pred_log<0b0110, "eors", int_aarch64_sve_eors>; + defm ORR_PPzPP : sve_int_pred_log<0b1000, "orr", int_aarch64_sve_orr>; + defm ORN_PPzPP : sve_int_pred_log<0b1001, "orn", int_aarch64_sve_orn>; + defm NOR_PPzPP : sve_int_pred_log<0b1010, "nor", int_aarch64_sve_nor>; + defm NAND_PPzPP : sve_int_pred_log<0b1011, "nand", int_aarch64_sve_nand>; + defm ORRS_PPzPP : sve_int_pred_log<0b1100, "orrs", int_aarch64_sve_orrs>; + defm ORNS_PPzPP : sve_int_pred_log<0b1101, "orns", int_aarch64_sve_orns>; + defm NORS_PPzPP : sve_int_pred_log<0b1110, "nors", int_aarch64_sve_nors>; + defm NANDS_PPzPP : sve_int_pred_log<0b1111, "nands", int_aarch64_sve_nands>; defm CLASTA_RPZ : sve_int_perm_clast_rz<0, "clasta">; defm CLASTB_RPZ : sve_int_perm_clast_rz<1, "clastb">; diff --git a/llvm/lib/Target/AArch64/SVEInstrFormats.td b/llvm/lib/Target/AArch64/SVEInstrFormats.td --- a/llvm/lib/Target/AArch64/SVEInstrFormats.td +++ b/llvm/lib/Target/AArch64/SVEInstrFormats.td @@ -1060,6 +1060,16 @@ !strconcat(asm, "\t$Pd, $Pg/z, $Pn, $Pm")); let Defs = !if(!eq (opc{2}, 1), [NZCV], []); + +} + +multiclass sve_int_pred_log opc, string asm, SDPatternOperator op> { + def NAME : sve_int_pred_log; + + def : SVE_3_Op_Pat(NAME)>; + def : SVE_3_Op_Pat(NAME)>; + def : SVE_3_Op_Pat(NAME)>; + def : SVE_3_Op_Pat(NAME)>; } diff --git a/llvm/test/CodeGen/AArch64/sve-int-log-pred.ll b/llvm/test/CodeGen/AArch64/sve-int-log-pred.ll --- a/llvm/test/CodeGen/AArch64/sve-int-log-pred.ll +++ b/llvm/test/CodeGen/AArch64/sve-int-log-pred.ll @@ -125,6 +125,46 @@ ret %out } +define @bic_pred_i8( %pg, %a, %b) { +; CHECK-LABEL: bic_pred_i8: +; CHECK: bic z0.b, p0/m, z0.b, z1.b +; CHECK-NEXT: ret + %out = call @llvm.aarch64.sve.bic.nxv2i8( %pg, + %a, + %b) + ret %out +} + +define @bic_pred_i16( %pg, %a, %b) { +; CHECK-LABEL: bic_pred_i16: +; CHECK: bic z0.h, p0/m, z0.h, z1.h +; CHECK-NEXT: ret + %out = call @llvm.aarch64.sve.bic.nxv2i16( %pg, + %a, + %b) + ret %out +} + + +define @bic_pred_i32( %pg, %a, %b) { +; CHECK-LABEL: bic_pred_i32: +; CHECK: bic z0.s, p0/m, z0.s, z1.s +; CHECK-NEXT: ret + %out = call @llvm.aarch64.sve.bic.nxv2i32( %pg, + %a, + %b) + ret %out +} + +define @bic_pred_i64( %pg, %a, %b) { +; CHECK-LABEL: bic_pred_i64: +; CHECK: bic z0.d, p0/m, z0.d, z1.d +; CHECK-NEXT: ret + %out = call @llvm.aarch64.sve.bic.nxv2i64( %pg, + %a, + %b) + ret %out +} declare @llvm.aarch64.sve.and.nxv2i8(,,) declare @llvm.aarch64.sve.and.nxv2i16(,,) @@ -138,3 +178,7 @@ declare @llvm.aarch64.sve.xor.nxv2i16(,,) declare @llvm.aarch64.sve.xor.nxv2i32(,,) declare @llvm.aarch64.sve.xor.nxv2i64(,,) +declare @llvm.aarch64.sve.bic.nxv2i8(,,) +declare @llvm.aarch64.sve.bic.nxv2i16(,,) +declare @llvm.aarch64.sve.bic.nxv2i32(,,) +declare @llvm.aarch64.sve.bic.nxv2i64(,,) diff --git a/llvm/test/CodeGen/AArch64/sve-int-log.ll b/llvm/test/CodeGen/AArch64/sve-int-log.ll --- a/llvm/test/CodeGen/AArch64/sve-int-log.ll +++ b/llvm/test/CodeGen/AArch64/sve-int-log.ll @@ -99,8 +99,8 @@ ; CHECK-LABEL: bic_d ; CHECK: bic z0.d, z0.d, z1.d ; CHECK-NEXT: ret - %res = call @llvm.aarch64.sve.bic.nxv2i64( %a, - %b) + %res = call @llvm.aarch64.sve.bic.base.nxv2i64( %a, + %b) ret %res } @@ -108,8 +108,8 @@ ; CHECK-LABEL: bic_s ; CHECK: bic z0.d, z0.d, z1.d ; CHECK-NEXT: ret - %res = call @llvm.aarch64.sve.bic.nxv4i32( %a, - %b) + %res = call @llvm.aarch64.sve.bic.base.nxv4i32( %a, + %b) ret %res } @@ -117,8 +117,8 @@ ; CHECK-LABEL: bic_h ; CHECK: bic z0.d, z0.d, z1.d ; CHECK-NEXT: ret - %res = call @llvm.aarch64.sve.bic.nxv8i16( %a, - %b) + %res = call @llvm.aarch64.sve.bic.base.nxv8i16( %a, + %b) ret %res } @@ -127,12 +127,12 @@ ; CHECK-LABEL: bic_b ; CHECK: bic z0.d, z0.d, z1.d ; CHECK-NEXT: ret - %res = call @llvm.aarch64.sve.bic.nxv16i8( %a, - %b) + %res = call @llvm.aarch64.sve.bic.base.nxv16i8( %a, + %b) ret %res } -declare @llvm.aarch64.sve.bic.nxv2i64(, ) -declare @llvm.aarch64.sve.bic.nxv4i32(, ) -declare @llvm.aarch64.sve.bic.nxv8i16(, ) -declare @llvm.aarch64.sve.bic.nxv16i8(, ) +declare @llvm.aarch64.sve.bic.base.nxv2i64(, ) +declare @llvm.aarch64.sve.bic.base.nxv4i32(, ) +declare @llvm.aarch64.sve.bic.base.nxv8i16(, ) +declare @llvm.aarch64.sve.bic.base.nxv16i8(, ) diff --git a/llvm/test/CodeGen/AArch64/sve-pred-log.ll b/llvm/test/CodeGen/AArch64/sve-pred-log.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/AArch64/sve-pred-log.ll @@ -0,0 +1,545 @@ +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s + +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.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.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.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.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.pred.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.pred.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.pred.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.pred.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.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.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.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.nxv2i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @ands_16( %Pg, %Pn, %Pd) { +; CHECK-LABEL: ands_16: +; CHECK: ands p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.ands.nxv16i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @ands_8( %Pg, %Pn, %Pd) { +; CHECK-LABEL: ands_8: +; CHECK: ands p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.ands.nxv8i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @ands_4( %Pg, %Pn, %Pd) { +; CHECK-LABEL: ands_4: +; CHECK: ands p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.ands.nxv4i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @ands_2( %Pg, %Pn, %Pd) { +; CHECK-LABEL: ands_2: +; CHECK: ands p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.ands.nxv2i1( %Pg, %Pn, %Pd) + ret %res; +} + + +define @bics_16( %Pg, %Pn, %Pd) { +; CHECK-LABEL: bics_16: +; CHECK: bics p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.bics.nxv16i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @bics_8( %Pg, %Pn, %Pd) { +; CHECK-LABEL: bics_8: +; CHECK: bics p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.bics.nxv8i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @bics_4( %Pg, %Pn, %Pd) { +; CHECK-LABEL: bics_4: +; CHECK: bics p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.bics.nxv4i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @bics_2( %Pg, %Pn, %Pd) { +; CHECK-LABEL: bics_2: +; CHECK: bics p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.bics.nxv2i1( %Pg, + %Pn, + %Pd) + ret %res; +} + + +define @eors_16( %Pg, %Pn, %Pd) { +; CHECK-LABEL: eors_16: +; CHECK: eors p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.eors.nxv16i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @eors_8( %Pg, %Pn, %Pd) { +; CHECK-LABEL: eors_8: +; CHECK: eors p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.eors.nxv8i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @eors_4( %Pg, %Pn, %Pd) { +; CHECK-LABEL: eors_4: +; CHECK: eors p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.eors.nxv4i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @eors_2( %Pg, %Pn, %Pd) { +; CHECK-LABEL: eors_2: +; CHECK: eors p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.eors.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.nxv2i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @orrs_16( %Pg, %Pn, %Pd) { +; CHECK-LABEL: orrs_16: +; CHECK: orrs p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.orrs.nxv16i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @orrs_8( %Pg, %Pn, %Pd) { +; CHECK-LABEL: orrs_8: +; CHECK: orrs p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.orrs.nxv8i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @orrs_4( %Pg, %Pn, %Pd) { +; CHECK-LABEL: orrs_4: +; CHECK: orrs p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.orrs.nxv4i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @orrs_2( %Pg, %Pn, %Pd) { +; CHECK-LABEL: orrs_2: +; CHECK: orrs p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.orrs.nxv2i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @orns_16( %Pg, %Pn, %Pd) { +; CHECK-LABEL: orns_16: +; CHECK: orns p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.orns.nxv16i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @orns_8( %Pg, %Pn, %Pd) { +; CHECK-LABEL: orns_8: +; CHECK: orns p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.orns.nxv8i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @orns_4( %Pg, %Pn, %Pd) { +; CHECK-LABEL: orns_4: +; CHECK: orns p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.orns.nxv4i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @orns_2( %Pg, %Pn, %Pd) { +; CHECK-LABEL: orns_2: +; CHECK: orns p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.orns.nxv2i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @nors_16( %Pg, %Pn, %Pd) { +; CHECK-LABEL: nors_16: +; CHECK: nors p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.nors.nxv16i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @nors_8( %Pg, %Pn, %Pd) { +; CHECK-LABEL: nors_8: +; CHECK: nors p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.nors.nxv8i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @nors_4( %Pg, %Pn, %Pd) { +; CHECK-LABEL: nors_4: +; CHECK: nors p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.nors.nxv4i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @nors_2( %Pg, %Pn, %Pd) { +; CHECK-LABEL: nors_2: +; CHECK: nors p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.nors.nxv2i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @nands_16( %Pg, %Pn, %Pd) { +; CHECK-LABEL: nands_16: +; CHECK: nands p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.nands.nxv16i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @nands_8( %Pg, %Pn, %Pd) { +; CHECK-LABEL: nands_8: +; CHECK: nands p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.nands.nxv8i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @nands_4( %Pg, %Pn, %Pd) { +; CHECK-LABEL: nands_4: +; CHECK: nands p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.nands.nxv4i1( %Pg, %Pn, %Pd) + ret %res; +} + +define @nands_2( %Pg, %Pn, %Pd) { +; CHECK-LABEL: nands_2: +; CHECK: nands p0.b, p0/z, p1.b, p2.b +; CHECK-NEXT: ret + %res = call @llvm.aarch64.sve.nands.nxv2i1( %Pg, %Pn, %Pd) + ret %res; +} + +declare @llvm.aarch64.sve.and.nxv16i1(, , ) +declare @llvm.aarch64.sve.and.nxv8i1(, , ) +declare @llvm.aarch64.sve.and.nxv4i1(, , ) +declare @llvm.aarch64.sve.and.nxv2i1(, , ) +declare @llvm.aarch64.sve.bic.pred.nxv16i1(, , ) +declare @llvm.aarch64.sve.bic.pred.nxv8i1(, , ) +declare @llvm.aarch64.sve.bic.pred.nxv4i1(, , ) +declare @llvm.aarch64.sve.bic.pred.nxv2i1(, , ) +declare @llvm.aarch64.sve.eor.nxv16i1(, , ) +declare @llvm.aarch64.sve.eor.nxv8i1(, , ) +declare @llvm.aarch64.sve.eor.nxv4i1(, , ) +declare @llvm.aarch64.sve.eor.nxv2i1(, , ) +declare @llvm.aarch64.sve.ands.nxv16i1(, , ) +declare @llvm.aarch64.sve.ands.nxv8i1(, , ) +declare @llvm.aarch64.sve.ands.nxv4i1(, , ) +declare @llvm.aarch64.sve.ands.nxv2i1(, , ) +declare @llvm.aarch64.sve.bics.nxv16i1(, , ) +declare @llvm.aarch64.sve.bics.nxv8i1(, , ) +declare @llvm.aarch64.sve.bics.nxv4i1(, , ) +declare @llvm.aarch64.sve.bics.nxv2i1(, , ) +declare @llvm.aarch64.sve.eors.nxv16i1(, , ) +declare @llvm.aarch64.sve.eors.nxv8i1(, , ) +declare @llvm.aarch64.sve.eors.nxv4i1(, , ) +declare @llvm.aarch64.sve.eors.nxv2i1(, , ) +declare @llvm.aarch64.sve.orr.nxv16i1(, , ) +declare @llvm.aarch64.sve.orr.nxv8i1(, , ) +declare @llvm.aarch64.sve.orr.nxv4i1(, , ) +declare @llvm.aarch64.sve.orr.nxv2i1(, , ) +declare @llvm.aarch64.sve.orn.nxv16i1(, , ) +declare @llvm.aarch64.sve.orn.nxv8i1(, , ) +declare @llvm.aarch64.sve.orn.nxv4i1(, , ) +declare @llvm.aarch64.sve.orn.nxv2i1(, , ) +declare @llvm.aarch64.sve.nor.nxv16i1(, , ) +declare @llvm.aarch64.sve.nor.nxv8i1(, , ) +declare @llvm.aarch64.sve.nor.nxv4i1(, , ) +declare @llvm.aarch64.sve.nor.nxv2i1(, , ) +declare @llvm.aarch64.sve.nand.nxv16i1(, , ) +declare @llvm.aarch64.sve.nand.nxv8i1(, , ) +declare @llvm.aarch64.sve.nand.nxv4i1(, , ) +declare @llvm.aarch64.sve.nand.nxv2i1(, , ) +declare @llvm.aarch64.sve.orrs.nxv16i1(, , ) +declare @llvm.aarch64.sve.orrs.nxv8i1(, , ) +declare @llvm.aarch64.sve.orrs.nxv4i1(, , ) +declare @llvm.aarch64.sve.orrs.nxv2i1(, , ) +declare @llvm.aarch64.sve.orns.nxv16i1(, , ) +declare @llvm.aarch64.sve.orns.nxv8i1(, , ) +declare @llvm.aarch64.sve.orns.nxv4i1(, , ) +declare @llvm.aarch64.sve.orns.nxv2i1(, , ) +declare @llvm.aarch64.sve.nors.nxv16i1(, , ) +declare @llvm.aarch64.sve.nors.nxv8i1(, , ) +declare @llvm.aarch64.sve.nors.nxv4i1(, , ) +declare @llvm.aarch64.sve.nors.nxv2i1(, , ) +declare @llvm.aarch64.sve.nands.nxv16i1(, , ) +declare @llvm.aarch64.sve.nands.nxv8i1(, , ) +declare @llvm.aarch64.sve.nands.nxv4i1(, , ) +declare @llvm.aarch64.sve.nands.nxv2i1(, , )