; 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 ; ; CMPEQ ; define @cmpeq_b( %pg, %a, %b) { ; CHECK-LABEL: cmpeq_b: ; CHECK: cmpeq p0.b, p0/z, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpeq.nxv16i8( %pg, %a, %b) ret %out } define @cmpeq_h( %pg, %a, %b) { ; CHECK-LABEL: cmpeq_h: ; CHECK: cmpeq p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpeq.nxv8i16( %pg, %a, %b) ret %out } define @cmpeq_s( %pg, %a, %b) { ; CHECK-LABEL: cmpeq_s: ; CHECK: cmpeq p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpeq.nxv4i32( %pg, %a, %b) ret %out } define @cmpeq_d( %pg, %a, %b) { ; CHECK-LABEL: cmpeq_d: ; CHECK: cmpeq p0.d, p0/z, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpeq.nxv2i64( %pg, %a, %b) ret %out } define @cmpeq_wide_b( %pg, %a, %b) { ; CHECK-LABEL: cmpeq_wide_b: ; CHECK: cmpeq p0.b, p0/z, z0.b, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpeq.wide.nxv16i8( %pg, %a, %b) ret %out } define @cmpeq_wide_h( %pg, %a, %b) { ; CHECK-LABEL: cmpeq_wide_h: ; CHECK: cmpeq p0.h, p0/z, z0.h, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpeq.wide.nxv8i16( %pg, %a, %b) ret %out } define @cmpeq_wide_s( %pg, %a, %b) { ; CHECK-LABEL: cmpeq_wide_s: ; CHECK: cmpeq p0.s, p0/z, z0.s, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpeq.wide.nxv4i32( %pg, %a, %b) ret %out } define @cmpeq_ir_b( %a, %b) { ; CHECK-LABEL: cmpeq_ir_b: ; CHECK: ptrue p0.b ; CHECK-NEXT: cmpeq p0.b, p0/z, z0.b, z1.b ; CHECK-NEXT: ret %out = icmp eq %a, %b ret %out } define @cmpeq_ir_h( %a, %b) { ; CHECK-LABEL: cmpeq_ir_h: ; CHECK: ptrue p0.h ; CHECK-NEXT: cmpeq p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %out = icmp eq %a, %b ret %out } define @cmpeq_ir_s( %a, %b) { ; CHECK-LABEL: cmpeq_ir_s: ; CHECK: ptrue p0.s ; CHECK-NEXT: cmpeq p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %out = icmp eq %a, %b ret %out } define @cmpeq_ir_d( %a, %b) { ; CHECK-LABEL: cmpeq_ir_d: ; CHECK: ptrue p0.d ; CHECK-NEXT: cmpeq p0.d, p0/z, z0.d, z1.d ; CHECK-NEXT: ret %out = icmp eq %a, %b ret %out } ; ; CMPGE ; define @cmpge_b( %pg, %a, %b) { ; CHECK-LABEL: cmpge_b: ; CHECK: cmpge p0.b, p0/z, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpge.nxv16i8( %pg, %a, %b) ret %out } define @cmpge_h( %pg, %a, %b) { ; CHECK-LABEL: cmpge_h: ; CHECK: cmpge p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpge.nxv8i16( %pg, %a, %b) ret %out } define @cmpge_s( %pg, %a, %b) { ; CHECK-LABEL: cmpge_s: ; CHECK: cmpge p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpge.nxv4i32( %pg, %a, %b) ret %out } define @cmpge_d( %pg, %a, %b) { ; CHECK-LABEL: cmpge_d: ; CHECK: cmpge p0.d, p0/z, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpge.nxv2i64( %pg, %a, %b) ret %out } define @cmpge_wide_b( %pg, %a, %b) { ; CHECK-LABEL: cmpge_wide_b: ; CHECK: cmpge p0.b, p0/z, z0.b, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpge.wide.nxv16i8( %pg, %a, %b) ret %out } define @cmpge_wide_h( %pg, %a, %b) { ; CHECK-LABEL: cmpge_wide_h: ; CHECK: cmpge p0.h, p0/z, z0.h, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpge.wide.nxv8i16( %pg, %a, %b) ret %out } define @cmpge_wide_s( %pg, %a, %b) { ; CHECK-LABEL: cmpge_wide_s: ; CHECK: cmpge p0.s, p0/z, z0.s, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpge.wide.nxv4i32( %pg, %a, %b) ret %out } define @cmpge_ir_b( %a, %b) { ; CHECK-LABEL: cmpge_ir_b: ; CHECK: ptrue p0.b ; CHECK-NEXT: cmpge p0.b, p0/z, z0.b, z1.b ; CHECK-NEXT: ret %out = icmp sge %a, %b ret %out } define @cmpge_ir_h( %a, %b) { ; CHECK-LABEL: cmpge_ir_h: ; CHECK: ptrue p0.h ; CHECK-NEXT: cmpge p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %out = icmp sge %a, %b ret %out } define @cmpge_ir_s( %a, %b) { ; CHECK-LABEL: cmpge_ir_s: ; CHECK: ptrue p0.s ; CHECK-NEXT: cmpge p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %out = icmp sge %a, %b ret %out } define @cmpge_ir_d( %a, %b) { ; CHECK-LABEL: cmpge_ir_d: ; CHECK: ptrue p0.d ; CHECK-NEXT: cmpge p0.d, p0/z, z0.d, z1.d ; CHECK-NEXT: ret %out = icmp sge %a, %b ret %out } define @cmpge_ir_comm_b( %a, %b) { ; CHECK-LABEL: cmpge_ir_comm_b: ; CHECK: ptrue p0.b ; CHECK-NEXT: cmpge p0.b, p0/z, z1.b, z0.b ; CHECK-NEXT: ret %out = icmp sle %a, %b ret %out } define @cmpge_ir_comm_h( %a, %b) { ; CHECK-LABEL: cmpge_ir_comm_h: ; CHECK: ptrue p0.h ; CHECK-NEXT: cmpge p0.h, p0/z, z1.h, z0.h ; CHECK-NEXT: ret %out = icmp sle %a, %b ret %out } define @cmpge_ir_comm_s( %a, %b) { ; CHECK-LABEL: cmpge_ir_comm_s: ; CHECK: ptrue p0.s ; CHECK-NEXT: cmpge p0.s, p0/z, z1.s, z0.s ; CHECK-NEXT: ret %out = icmp sle %a, %b ret %out } define @cmpge_ir_comm_d( %a, %b) { ; CHECK-LABEL: cmpge_ir_comm_d: ; CHECK: ptrue p0.d ; CHECK-NEXT: cmpge p0.d, p0/z, z1.d, z0.d ; CHECK-NEXT: ret %out = icmp sle %a, %b ret %out } ; ; CMPGT ; define @cmpgt_b( %pg, %a, %b) { ; CHECK-LABEL: cmpgt_b: ; CHECK: cmpgt p0.b, p0/z, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpgt.nxv16i8( %pg, %a, %b) ret %out } define @cmpgt_h( %pg, %a, %b) { ; CHECK-LABEL: cmpgt_h: ; CHECK: cmpgt p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpgt.nxv8i16( %pg, %a, %b) ret %out } define @cmpgt_s( %pg, %a, %b) { ; CHECK-LABEL: cmpgt_s: ; CHECK: cmpgt p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpgt.nxv4i32( %pg, %a, %b) ret %out } define @cmpgt_d( %pg, %a, %b) { ; CHECK-LABEL: cmpgt_d: ; CHECK: cmpgt p0.d, p0/z, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpgt.nxv2i64( %pg, %a, %b) ret %out } define @cmpgt_wide_b( %pg, %a, %b) { ; CHECK-LABEL: cmpgt_wide_b: ; CHECK: cmpgt p0.b, p0/z, z0.b, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpgt.wide.nxv16i8( %pg, %a, %b) ret %out } define @cmpgt_wide_h( %pg, %a, %b) { ; CHECK-LABEL: cmpgt_wide_h: ; CHECK: cmpgt p0.h, p0/z, z0.h, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpgt.wide.nxv8i16( %pg, %a, %b) ret %out } define @cmpgt_wide_s( %pg, %a, %b) { ; CHECK-LABEL: cmpgt_wide_s: ; CHECK: cmpgt p0.s, p0/z, z0.s, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpgt.wide.nxv4i32( %pg, %a, %b) ret %out } define @cmpgt_ir_b( %a, %b) { ; CHECK-LABEL: cmpgt_ir_b: ; CHECK: ptrue p0.b ; CHECK-NEXT: cmpgt p0.b, p0/z, z0.b, z1.b ; CHECK-NEXT: ret %out = icmp sgt %a, %b ret %out } define @cmpgt_ir_h( %a, %b) { ; CHECK-LABEL: cmpgt_ir_h: ; CHECK: ptrue p0.h ; CHECK-NEXT: cmpgt p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %out = icmp sgt %a, %b ret %out } define @cmpgt_ir_s( %a, %b) { ; CHECK-LABEL: cmpgt_ir_s: ; CHECK: ptrue p0.s ; CHECK-NEXT: cmpgt p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %out = icmp sgt %a, %b ret %out } define @cmpgt_ir_d( %a, %b) { ; CHECK-LABEL: cmpgt_ir_d: ; CHECK: ptrue p0.d ; CHECK-NEXT: cmpgt p0.d, p0/z, z0.d, z1.d ; CHECK-NEXT: ret %out = icmp sgt %a, %b ret %out } define @cmpgt_ir_comm_b( %a, %b) { ; CHECK-LABEL: cmpgt_ir_comm_b: ; CHECK: ptrue p0.b ; CHECK-NEXT: cmpgt p0.b, p0/z, z1.b, z0.b ; CHECK-NEXT: ret %out = icmp slt %a, %b ret %out } define @cmpgt_ir_comm_h( %a, %b) { ; CHECK-LABEL: cmpgt_ir_comm_h: ; CHECK: ptrue p0.h ; CHECK-NEXT: cmpgt p0.h, p0/z, z1.h, z0.h ; CHECK-NEXT: ret %out = icmp slt %a, %b ret %out } define @cmpgt_ir_comm_s( %a, %b) { ; CHECK-LABEL: cmpgt_ir_comm_s: ; CHECK: ptrue p0.s ; CHECK-NEXT: cmpgt p0.s, p0/z, z1.s, z0.s ; CHECK-NEXT: ret %out = icmp slt %a, %b ret %out } define @cmpgt_ir_comm_d( %a, %b) { ; CHECK-LABEL: cmpgt_ir_comm_d: ; CHECK: ptrue p0.d ; CHECK-NEXT: cmpgt p0.d, p0/z, z1.d, z0.d ; CHECK-NEXT: ret %out = icmp slt %a, %b ret %out } ; ; CMPHI ; define @cmphi_b( %pg, %a, %b) { ; CHECK-LABEL: cmphi_b: ; CHECK: cmphi p0.b, p0/z, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphi.nxv16i8( %pg, %a, %b) ret %out } define @cmphi_h( %pg, %a, %b) { ; CHECK-LABEL: cmphi_h: ; CHECK: cmphi p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphi.nxv8i16( %pg, %a, %b) ret %out } define @cmphi_s( %pg, %a, %b) { ; CHECK-LABEL: cmphi_s: ; CHECK: cmphi p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphi.nxv4i32( %pg, %a, %b) ret %out } define @cmphi_d( %pg, %a, %b) { ; CHECK-LABEL: cmphi_d: ; CHECK: cmphi p0.d, p0/z, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphi.nxv2i64( %pg, %a, %b) ret %out } define @cmphi_wide_b( %pg, %a, %b) { ; CHECK-LABEL: cmphi_wide_b: ; CHECK: cmphi p0.b, p0/z, z0.b, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphi.wide.nxv16i8( %pg, %a, %b) ret %out } define @cmphi_wide_h( %pg, %a, %b) { ; CHECK-LABEL: cmphi_wide_h: ; CHECK: cmphi p0.h, p0/z, z0.h, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphi.wide.nxv8i16( %pg, %a, %b) ret %out } define @cmphi_wide_s( %pg, %a, %b) { ; CHECK-LABEL: cmphi_wide_s: ; CHECK: cmphi p0.s, p0/z, z0.s, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphi.wide.nxv4i32( %pg, %a, %b) ret %out } define @cmphi_ir_b( %a, %b) { ; CHECK-LABEL: cmphi_ir_b: ; CHECK: ptrue p0.b ; CHECK-NEXT: cmphi p0.b, p0/z, z0.b, z1.b ; CHECK-NEXT: ret %out = icmp ugt %a, %b ret %out } define @cmphi_ir_h( %a, %b) { ; CHECK-LABEL: cmphi_ir_h: ; CHECK: ptrue p0.h ; CHECK-NEXT: cmphi p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %out = icmp ugt %a, %b ret %out } define @cmphi_ir_s( %a, %b) { ; CHECK-LABEL: cmphi_ir_s: ; CHECK: ptrue p0.s ; CHECK-NEXT: cmphi p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %out = icmp ugt %a, %b ret %out } define @cmphi_ir_d( %a, %b) { ; CHECK-LABEL: cmphi_ir_d: ; CHECK: ptrue p0.d ; CHECK-NEXT: cmphi p0.d, p0/z, z0.d, z1.d ; CHECK-NEXT: ret %out = icmp ugt %a, %b ret %out } define @cmphi_ir_comm_b( %a, %b) { ; CHECK-LABEL: cmphi_ir_comm_b: ; CHECK: ptrue p0.b ; CHECK-NEXT: cmphi p0.b, p0/z, z1.b, z0.b ; CHECK-NEXT: ret %out = icmp ult %a, %b ret %out } define @cmphi_ir_comm_h( %a, %b) { ; CHECK-LABEL: cmphi_ir_comm_h: ; CHECK: ptrue p0.h ; CHECK-NEXT: cmphi p0.h, p0/z, z1.h, z0.h ; CHECK-NEXT: ret %out = icmp ult %a, %b ret %out } define @cmphi_ir_comm_s( %a, %b) { ; CHECK-LABEL: cmphi_ir_comm_s: ; CHECK: ptrue p0.s ; CHECK-NEXT: cmphi p0.s, p0/z, z1.s, z0.s ; CHECK-NEXT: ret %out = icmp ult %a, %b ret %out } define @cmphi_ir_comm_d( %a, %b) { ; CHECK-LABEL: cmphi_ir_comm_d: ; CHECK: ptrue p0.d ; CHECK-NEXT: cmphi p0.d, p0/z, z1.d, z0.d ; CHECK-NEXT: ret %out = icmp ult %a, %b ret %out } ; ; CMPHS ; define @cmphs_b( %pg, %a, %b) { ; CHECK-LABEL: cmphs_b: ; CHECK: cmphs p0.b, p0/z, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphs.nxv16i8( %pg, %a, %b) ret %out } define @cmphs_h( %pg, %a, %b) { ; CHECK-LABEL: cmphs_h: ; CHECK: cmphs p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphs.nxv8i16( %pg, %a, %b) ret %out } define @cmphs_s( %pg, %a, %b) { ; CHECK-LABEL: cmphs_s: ; CHECK: cmphs p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphs.nxv4i32( %pg, %a, %b) ret %out } define @cmphs_d( %pg, %a, %b) { ; CHECK-LABEL: cmphs_d: ; CHECK: cmphs p0.d, p0/z, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphs.nxv2i64( %pg, %a, %b) ret %out } define @cmphs_wide_b( %pg, %a, %b) { ; CHECK-LABEL: cmphs_wide_b: ; CHECK: cmphs p0.b, p0/z, z0.b, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphs.wide.nxv16i8( %pg, %a, %b) ret %out } define @cmphs_wide_h( %pg, %a, %b) { ; CHECK-LABEL: cmphs_wide_h: ; CHECK: cmphs p0.h, p0/z, z0.h, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphs.wide.nxv8i16( %pg, %a, %b) ret %out } define @cmphs_wide_s( %pg, %a, %b) { ; CHECK-LABEL: cmphs_wide_s: ; CHECK: cmphs p0.s, p0/z, z0.s, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmphs.wide.nxv4i32( %pg, %a, %b) ret %out } define @cmphs_ir_b( %a, %b) { ; CHECK-LABEL: cmphs_ir_b: ; CHECK: ptrue p0.b ; CHECK-NEXT: cmphs p0.b, p0/z, z0.b, z1.b ; CHECK-NEXT: ret %out = icmp uge %a, %b ret %out } define @cmphs_ir_h( %a, %b) { ; CHECK-LABEL: cmphs_ir_h: ; CHECK: ptrue p0.h ; CHECK-NEXT: cmphs p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %out = icmp uge %a, %b ret %out } define @cmphs_ir_s( %a, %b) { ; CHECK-LABEL: cmphs_ir_s: ; CHECK: ptrue p0.s ; CHECK-NEXT: cmphs p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %out = icmp uge %a, %b ret %out } define @cmphs_ir_d( %a, %b) { ; CHECK-LABEL: cmphs_ir_d: ; CHECK: ptrue p0.d ; CHECK-NEXT: cmphs p0.d, p0/z, z0.d, z1.d ; CHECK-NEXT: ret %out = icmp uge %a, %b ret %out } define @cmphs_ir_comm_b( %a, %b) { ; CHECK-LABEL: cmphs_ir_comm_b: ; CHECK: ptrue p0.b ; CHECK-NEXT: cmphs p0.b, p0/z, z1.b, z0.b ; CHECK-NEXT: ret %out = icmp ule %a, %b ret %out } define @cmphs_ir_comm_h( %a, %b) { ; CHECK-LABEL: cmphs_ir_comm_h: ; CHECK: ptrue p0.h ; CHECK-NEXT: cmphs p0.h, p0/z, z1.h, z0.h ; CHECK-NEXT: ret %out = icmp ule %a, %b ret %out } define @cmphs_ir_comm_s( %a, %b) { ; CHECK-LABEL: cmphs_ir_comm_s: ; CHECK: ptrue p0.s ; CHECK-NEXT: cmphs p0.s, p0/z, z1.s, z0.s ; CHECK-NEXT: ret %out = icmp ule %a, %b ret %out } define @cmphs_ir_comm_d( %a, %b) { ; CHECK-LABEL: cmphs_ir_comm_d: ; CHECK: ptrue p0.d ; CHECK-NEXT: cmphs p0.d, p0/z, z1.d, z0.d ; CHECK-NEXT: ret %out = icmp ule %a, %b ret %out } ; ; CMPLE ; define @cmple_wide_b( %pg, %a, %b) { ; CHECK-LABEL: cmple_wide_b: ; CHECK: cmple p0.b, p0/z, z0.b, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmple.wide.nxv16i8( %pg, %a, %b) ret %out } define @cmple_wide_h( %pg, %a, %b) { ; CHECK-LABEL: cmple_wide_h: ; CHECK: cmple p0.h, p0/z, z0.h, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmple.wide.nxv8i16( %pg, %a, %b) ret %out } define @cmple_wide_s( %pg, %a, %b) { ; CHECK-LABEL: cmple_wide_s: ; CHECK: cmple p0.s, p0/z, z0.s, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmple.wide.nxv4i32( %pg, %a, %b) ret %out } ; ; CMPLO ; define @cmplo_wide_b( %pg, %a, %b) { ; CHECK-LABEL: cmplo_wide_b: ; CHECK: cmplo p0.b, p0/z, z0.b, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmplo.wide.nxv16i8( %pg, %a, %b) ret %out } define @cmplo_wide_h( %pg, %a, %b) { ; CHECK-LABEL: cmplo_wide_h: ; CHECK: cmplo p0.h, p0/z, z0.h, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmplo.wide.nxv8i16( %pg, %a, %b) ret %out } define @cmplo_wide_s( %pg, %a, %b) { ; CHECK-LABEL: cmplo_wide_s: ; CHECK: cmplo p0.s, p0/z, z0.s, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmplo.wide.nxv4i32( %pg, %a, %b) ret %out } ; ; CMPLS ; define @cmpls_wide_b( %pg, %a, %b) { ; CHECK-LABEL: cmpls_wide_b: ; CHECK: cmpls p0.b, p0/z, z0.b, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpls.wide.nxv16i8( %pg, %a, %b) ret %out } define @cmpls_wide_h( %pg, %a, %b) { ; CHECK-LABEL: cmpls_wide_h: ; CHECK: cmpls p0.h, p0/z, z0.h, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpls.wide.nxv8i16( %pg, %a, %b) ret %out } define @cmpls_wide_s( %pg, %a, %b) { ; CHECK-LABEL: cmpls_wide_s: ; CHECK: cmpls p0.s, p0/z, z0.s, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpls.wide.nxv4i32( %pg, %a, %b) ret %out } ; ; CMPLT ; define @cmplt_wide_b( %pg, %a, %b) { ; CHECK-LABEL: cmplt_wide_b: ; CHECK: cmplt p0.b, p0/z, z0.b, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmplt.wide.nxv16i8( %pg, %a, %b) ret %out } define @cmplt_wide_h( %pg, %a, %b) { ; CHECK-LABEL: cmplt_wide_h: ; CHECK: cmplt p0.h, p0/z, z0.h, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmplt.wide.nxv8i16( %pg, %a, %b) ret %out } define @cmplt_wide_s( %pg, %a, %b) { ; CHECK-LABEL: cmplt_wide_s: ; CHECK: cmplt p0.s, p0/z, z0.s, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmplt.wide.nxv4i32( %pg, %a, %b) ret %out } ; ; CMPNE ; define @cmpne_b( %pg, %a, %b) { ; CHECK-LABEL: cmpne_b: ; CHECK: cmpne p0.b, p0/z, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpne.nxv16i8( %pg, %a, %b) ret %out } define @cmpne_h( %pg, %a, %b) { ; CHECK-LABEL: cmpne_h: ; CHECK: cmpne p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpne.nxv8i16( %pg, %a, %b) ret %out } define @cmpne_s( %pg, %a, %b) { ; CHECK-LABEL: cmpne_s: ; CHECK: cmpne p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpne.nxv4i32( %pg, %a, %b) ret %out } define @cmpne_d( %pg, %a, %b) { ; CHECK-LABEL: cmpne_d: ; CHECK: cmpne p0.d, p0/z, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpne.nxv2i64( %pg, %a, %b) ret %out } define @cmpne_wide_b( %pg, %a, %b) { ; CHECK-LABEL: cmpne_wide_b: ; CHECK: cmpne p0.b, p0/z, z0.b, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpne.wide.nxv16i8( %pg, %a, %b) ret %out } define @cmpne_wide_h( %pg, %a, %b) { ; CHECK-LABEL: cmpne_wide_h: ; CHECK: cmpne p0.h, p0/z, z0.h, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpne.wide.nxv8i16( %pg, %a, %b) ret %out } define @cmpne_wide_s( %pg, %a, %b) { ; CHECK-LABEL: cmpne_wide_s: ; CHECK: cmpne p0.s, p0/z, z0.s, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmpne.wide.nxv4i32( %pg, %a, %b) ret %out } define @cmpne_ir_b( %a, %b) { ; CHECK-LABEL: cmpne_ir_b: ; CHECK: ptrue p0.b ; CHECK-NEXT: cmpne p0.b, p0/z, z0.b, z1.b ; CHECK-NEXT: ret %out = icmp ne %a, %b ret %out } define @cmpne_ir_h( %a, %b) { ; CHECK-LABEL: cmpne_ir_h: ; CHECK: ptrue p0.h ; CHECK-NEXT: cmpne p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %out = icmp ne %a, %b ret %out } define @cmpne_ir_s( %a, %b) { ; CHECK-LABEL: cmpne_ir_s: ; CHECK: ptrue p0.s ; CHECK-NEXT: cmpne p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %out = icmp ne %a, %b ret %out } define @cmpne_ir_d( %a, %b) { ; CHECK-LABEL: cmpne_ir_d: ; CHECK: ptrue p0.d ; CHECK-NEXT: cmpne p0.d, p0/z, z0.d, z1.d ; CHECK-NEXT: ret %out = icmp ne %a, %b ret %out } define @cmpgt_wide_splat_b( %pg, %a, i64 %b) { ; CHECK-LABEL: cmpgt_wide_splat_b: ; CHECK: cmpgt p0.b, p0/z, z0.b, z1.d ; CHECK-NEXT: ret %splat = call @llvm.aarch64.sve.dup.x.nxv2i64(i64 %b) %out = call @llvm.aarch64.sve.cmpgt.wide.nxv16i8( %pg, %a, %splat) ret %out } define @cmpls_wide_splat_s( %pg, %a, i64 %b) { ; CHECK-LABEL: cmpls_wide_splat_s: ; CHECK: cmpls p0.s, p0/z, z0.s, z1.d ; CHECK-NEXT: ret %splat = call @llvm.aarch64.sve.dup.x.nxv2i64(i64 %b) %out = call @llvm.aarch64.sve.cmpls.wide.nxv4i32( %pg, %a, %splat) ret %out } declare @llvm.aarch64.sve.cmpeq.nxv16i8(, , ) declare @llvm.aarch64.sve.cmpeq.nxv8i16(, , ) declare @llvm.aarch64.sve.cmpeq.nxv4i32(, , ) declare @llvm.aarch64.sve.cmpeq.nxv2i64(, , ) declare @llvm.aarch64.sve.cmpeq.wide.nxv16i8(, , ) declare @llvm.aarch64.sve.cmpeq.wide.nxv8i16(, , ) declare @llvm.aarch64.sve.cmpeq.wide.nxv4i32(, , ) declare @llvm.aarch64.sve.cmpge.nxv16i8(, , ) declare @llvm.aarch64.sve.cmpge.nxv8i16(, , ) declare @llvm.aarch64.sve.cmpge.nxv4i32(, , ) declare @llvm.aarch64.sve.cmpge.nxv2i64(, , ) declare @llvm.aarch64.sve.cmpge.wide.nxv16i8(, , ) declare @llvm.aarch64.sve.cmpge.wide.nxv8i16(, , ) declare @llvm.aarch64.sve.cmpge.wide.nxv4i32(, , ) declare @llvm.aarch64.sve.cmpgt.nxv16i8(, , ) declare @llvm.aarch64.sve.cmpgt.nxv8i16(, , ) declare @llvm.aarch64.sve.cmpgt.nxv4i32(, , ) declare @llvm.aarch64.sve.cmpgt.nxv2i64(, , ) declare @llvm.aarch64.sve.cmpgt.wide.nxv16i8(, , ) declare @llvm.aarch64.sve.cmpgt.wide.nxv8i16(, , ) declare @llvm.aarch64.sve.cmpgt.wide.nxv4i32(, , ) declare @llvm.aarch64.sve.cmphi.nxv16i8(, , ) declare @llvm.aarch64.sve.cmphi.nxv8i16(, , ) declare @llvm.aarch64.sve.cmphi.nxv4i32(, , ) declare @llvm.aarch64.sve.cmphi.nxv2i64(, , ) declare @llvm.aarch64.sve.cmphi.wide.nxv16i8(, , ) declare @llvm.aarch64.sve.cmphi.wide.nxv8i16(, , ) declare @llvm.aarch64.sve.cmphi.wide.nxv4i32(, , ) declare @llvm.aarch64.sve.cmphs.nxv16i8(, , ) declare @llvm.aarch64.sve.cmphs.nxv8i16(, , ) declare @llvm.aarch64.sve.cmphs.nxv4i32(, , ) declare @llvm.aarch64.sve.cmphs.nxv2i64(, , ) declare @llvm.aarch64.sve.cmphs.wide.nxv16i8(, , ) declare @llvm.aarch64.sve.cmphs.wide.nxv8i16(, , ) declare @llvm.aarch64.sve.cmphs.wide.nxv4i32(, , ) declare @llvm.aarch64.sve.cmple.wide.nxv16i8(, , ) declare @llvm.aarch64.sve.cmple.wide.nxv8i16(, , ) declare @llvm.aarch64.sve.cmple.wide.nxv4i32(, , ) declare @llvm.aarch64.sve.cmplo.wide.nxv16i8(, , ) declare @llvm.aarch64.sve.cmplo.wide.nxv8i16(, , ) declare @llvm.aarch64.sve.cmplo.wide.nxv4i32(, , ) declare @llvm.aarch64.sve.cmpls.wide.nxv16i8(, , ) declare @llvm.aarch64.sve.cmpls.wide.nxv8i16(, , ) declare @llvm.aarch64.sve.cmpls.wide.nxv4i32(, , ) declare @llvm.aarch64.sve.cmplt.wide.nxv16i8(, , ) declare @llvm.aarch64.sve.cmplt.wide.nxv8i16(, , ) declare @llvm.aarch64.sve.cmplt.wide.nxv4i32(, , ) declare @llvm.aarch64.sve.cmpne.nxv16i8(, , ) declare @llvm.aarch64.sve.cmpne.nxv8i16(, , ) declare @llvm.aarch64.sve.cmpne.nxv4i32(, , ) declare @llvm.aarch64.sve.cmpne.nxv2i64(, , ) declare @llvm.aarch64.sve.cmpne.wide.nxv16i8(, , ) declare @llvm.aarch64.sve.cmpne.wide.nxv8i16(, , ) declare @llvm.aarch64.sve.cmpne.wide.nxv4i32(, , ) declare @llvm.aarch64.sve.dup.x.nxv2i64(i64)