; 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 ; ; FCVT ; define @fcvt_f16_f32( %a, %pg, %b) { ; CHECK-LABEL: fcvt_f16_f32: ; CHECK: fcvt z0.h, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvt.f16f32( %a, %pg, %b) ret %out } define @fcvt_f16_f64( %a, %pg, %b) { ; CHECK-LABEL: fcvt_f16_f64: ; CHECK: fcvt z0.h, p0/m, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvt.f16f64( %a, %pg, %b) ret %out } define @fcvt_f32_f16( %a, %pg, %b) { ; CHECK-LABEL: fcvt_f32_f16: ; CHECK: fcvt z0.s, p0/m, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvt.f32f16( %a, %pg, %b) ret %out } define @fcvt_f32_f64( %a, %pg, %b) { ; CHECK-LABEL: fcvt_f32_f64: ; CHECK: fcvt z0.s, p0/m, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvt.f32f64( %a, %pg, %b) ret %out } define @fcvt_f64_f16( %a, %pg, %b) { ; CHECK-LABEL: fcvt_f64_f16: ; CHECK: fcvt z0.d, p0/m, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvt.f64f16( %a, %pg, %b) ret %out } define @fcvt_f64_f32( %a, %pg, %b) { ; CHECK-LABEL: fcvt_f64_f32: ; CHECK: fcvt z0.d, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvt.f64f32( %a, %pg, %b) ret %out } ; ; FCVTZS ; define @fcvtzs_i16_f16( %a, %pg, %b) { ; CHECK-LABEL: fcvtzs_i16_f16: ; CHECK: fcvtzs z0.h, p0/m, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzs.nxv8i16.nxv8f16( %a, %pg, %b) ret %out } define @fcvtzs_i32_f32( %a, %pg, %b) { ; CHECK-LABEL: fcvtzs_i32_f32: ; CHECK: fcvtzs z0.s, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzs.nxv4i32.nxv4f32( %a, %pg, %b) ret %out } define @fcvtzs_i64_f64( %a, %pg, %b) { ; CHECK-LABEL: fcvtzs_i64_f64: ; CHECK: fcvtzs z0.d, p0/m, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzs.nxv2i64.nxv2f64( %a, %pg, %b) ret %out } define @fcvtzs_i32_f16( %a, %pg, %b) { ; CHECK-LABEL: fcvtzs_i32_f16: ; CHECK: fcvtzs z0.s, p0/m, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzs.i32f16( %a, %pg, %b) ret %out } define @fcvtzs_i32_f64( %a, %pg, %b) { ; CHECK-LABEL: fcvtzs_i32_f64: ; CHECK: fcvtzs z0.s, p0/m, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzs.i32f64( %a, %pg, %b) ret %out } define @fcvtzs_i64_f16( %a, %pg, %b) { ; CHECK-LABEL: fcvtzs_i64_f16: ; CHECK: fcvtzs z0.d, p0/m, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzs.i64f16( %a, %pg, %b) ret %out } define @fcvtzs_i64_f32( %a, %pg, %b) { ; CHECK-LABEL: fcvtzs_i64_f32: ; CHECK: fcvtzs z0.d, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzs.i64f32( %a, %pg, %b) ret %out } ; ; FCVTZU ; define @fcvtzu_i16_f16( %a, %pg, %b) { ; CHECK-LABEL: fcvtzu_i16_f16: ; CHECK: fcvtzu z0.h, p0/m, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzu.nxv8i16.nxv8f16( %a, %pg, %b) ret %out } define @fcvtzu_i32_f32( %a, %pg, %b) { ; CHECK-LABEL: fcvtzu_i32_f32: ; CHECK: fcvtzu z0.s, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzu.nxv4i32.nxv4f32( %a, %pg, %b) ret %out } define @fcvtzu_i64_f64( %a, %pg, %b) { ; CHECK-LABEL: fcvtzu_i64_f64: ; CHECK: fcvtzu z0.d, p0/m, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzu.nxv2i64.nxv2f64( %a, %pg, %b) ret %out } define @fcvtzu_i32_f16( %a, %pg, %b) { ; CHECK-LABEL: fcvtzu_i32_f16: ; CHECK: fcvtzu z0.s, p0/m, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzu.i32f16( %a, %pg, %b) ret %out } define @fcvtzu_i32_f64( %a, %pg, %b) { ; CHECK-LABEL: fcvtzu_i32_f64: ; CHECK: fcvtzu z0.s, p0/m, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzu.i32f64( %a, %pg, %b) ret %out } define @fcvtzu_i64_f16( %a, %pg, %b) { ; CHECK-LABEL: fcvtzu_i64_f16: ; CHECK: fcvtzu z0.d, p0/m, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzu.i64f16( %a, %pg, %b) ret %out } define @fcvtzu_i64_f32( %a, %pg, %b) { ; CHECK-LABEL: fcvtzu_i64_f32: ; CHECK: fcvtzu z0.d, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtzu.i64f32( %a, %pg, %b) ret %out } ; ; SCVTF ; define @scvtf_f16_i16( %a, %pg, %b) { ; CHECK-LABEL: scvtf_f16_i16: ; CHECK: scvtf z0.h, p0/m, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.scvtf.nxv8f16.nxv8i16( %a, %pg, %b) ret %out } define @scvtf_f32_i32( %a, %pg, %b) { ; CHECK-LABEL: scvtf_f32_i32: ; CHECK: scvtf z0.s, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.scvtf.nxv4f32.nxv4i32( %a, %pg, %b) ret %out } define @scvtf_f64_i64( %a, %pg, %b) { ; CHECK-LABEL: scvtf_f64_i64: ; CHECK: scvtf z0.d, p0/m, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.scvtf.nxv2f64.nxv2i64( %a, %pg, %b) ret %out } define @scvtf_f16_i32( %a, %pg, %b) { ; CHECK-LABEL: scvtf_f16_i32: ; CHECK: scvtf z0.h, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.scvtf.f16i32( %a, %pg, %b) ret %out } define @scvtf_f16_i64( %a, %pg, %b) { ; CHECK-LABEL: scvtf_f16_i64: ; CHECK: scvtf z0.h, p0/m, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.scvtf.f16i64( %a, %pg, %b) ret %out } define @scvtf_f32_i64( %a, %pg, %b) { ; CHECK-LABEL: scvtf_f32_i64: ; CHECK: scvtf z0.s, p0/m, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.scvtf.f32i64( %a, %pg, %b) ret %out } define @scvtf_f64_i32( %a, %pg, %b) { ; CHECK-LABEL: scvtf_f64_i32: ; CHECK: scvtf z0.d, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.scvtf.f64i32( %a, %pg, %b) ret %out } ; ; UCVTF ; define @ucvtf_f16_i16( %a, %pg, %b) { ; CHECK-LABEL: ucvtf_f16_i16: ; CHECK: ucvtf z0.h, p0/m, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.ucvtf.nxv8f16.nxv8i16( %a, %pg, %b) ret %out } define @ucvtf_f32_i32( %a, %pg, %b) { ; CHECK-LABEL: ucvtf_f32_i32: ; CHECK: ucvtf z0.s, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.ucvtf.nxv4f32.nxv4i32( %a, %pg, %b) ret %out } define @ucvtf_f64_i64( %a, %pg, %b) { ; CHECK-LABEL: ucvtf_f64_i64: ; CHECK: ucvtf z0.d, p0/m, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.ucvtf.nxv2f64.nxv2i64( %a, %pg, %b) ret %out } define @ucvtf_f16_i32( %a, %pg, %b) { ; CHECK-LABEL: ucvtf_f16_i32: ; CHECK: ucvtf z0.h, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.ucvtf.f16i32( %a, %pg, %b) ret %out } define @ucvtf_f16_i64( %a, %pg, %b) { ; CHECK-LABEL: ucvtf_f16_i64: ; CHECK: ucvtf z0.h, p0/m, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.ucvtf.f16i64( %a, %pg, %b) ret %out } define @ucvtf_f32_i64( %a, %pg, %b) { ; CHECK-LABEL: ucvtf_f32_i64: ; CHECK: ucvtf z0.s, p0/m, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.ucvtf.f32i64( %a, %pg, %b) ret %out } define @ucvtf_f64_i32( %a, %pg, %b) { ; CHECK-LABEL: ucvtf_f64_i32: ; CHECK: ucvtf z0.d, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.ucvtf.f64i32( %a, %pg, %b) ret %out } declare @llvm.aarch64.sve.fcvt.f16f32(, , ) declare @llvm.aarch64.sve.fcvt.f16f64(, , ) declare @llvm.aarch64.sve.fcvt.f32f16(, , ) declare @llvm.aarch64.sve.fcvt.f32f64(, , ) declare @llvm.aarch64.sve.fcvt.f64f16(, , ) declare @llvm.aarch64.sve.fcvt.f64f32(, , ) declare @llvm.aarch64.sve.fcvtzs.nxv8i16.nxv8f16(, , ) declare @llvm.aarch64.sve.fcvtzs.nxv4i32.nxv4f32(, , ) declare @llvm.aarch64.sve.fcvtzs.nxv2i64.nxv2f64(, , ) declare @llvm.aarch64.sve.fcvtzs.i32f16(, , ) declare @llvm.aarch64.sve.fcvtzs.i32f64(, , ) declare @llvm.aarch64.sve.fcvtzs.i64f16(, , ) declare @llvm.aarch64.sve.fcvtzs.i64f32(, , ) declare @llvm.aarch64.sve.fcvtzu.nxv8i16.nxv8f16(, , ) declare @llvm.aarch64.sve.fcvtzu.nxv4i32.nxv4f32(, , ) declare @llvm.aarch64.sve.fcvtzu.nxv2i64.nxv2f64(, , ) declare @llvm.aarch64.sve.fcvtzu.i32f16(, , ) declare @llvm.aarch64.sve.fcvtzu.i32f64(, , ) declare @llvm.aarch64.sve.fcvtzu.i64f16(, , ) declare @llvm.aarch64.sve.fcvtzu.i64f32(, , ) declare @llvm.aarch64.sve.scvtf.nxv8f16.nxv8i16(, , ) declare @llvm.aarch64.sve.scvtf.nxv4f32.nxv4i32(, , ) declare @llvm.aarch64.sve.scvtf.nxv2f64.nxv2i64(, , ) declare @llvm.aarch64.sve.scvtf.f16i32(, , ) declare @llvm.aarch64.sve.scvtf.f16i64(, , ) declare @llvm.aarch64.sve.scvtf.f32i64(, , ) declare @llvm.aarch64.sve.scvtf.f64i32(, , ) declare @llvm.aarch64.sve.ucvtf.nxv8f16.nxv8i16(, , ) declare @llvm.aarch64.sve.ucvtf.nxv4f32.nxv4i32(, , ) declare @llvm.aarch64.sve.ucvtf.nxv2f64.nxv2i64(, , ) declare @llvm.aarch64.sve.ucvtf.f16i32(, , ) declare @llvm.aarch64.sve.ucvtf.f16i64(, , ) declare @llvm.aarch64.sve.ucvtf.f32i64(, , ) declare @llvm.aarch64.sve.ucvtf.f64i32(, , )