; RUN: llc -mtriple=aarch64-none-linux-gnu -mattr=+sve,+f64mm -asm-verbose=0 < %s -o - 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 ; ; TRN1Q ; define @trn1_i8( %a, %b) nounwind { ; CHECK-LABEL: trn1_i8: ; CHECK-NEXT: trn1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn1q.nxv16i8( %a, %b) ret %out } define @trn1_i16( %a, %b) nounwind { ; CHECK-LABEL: trn1_i16: ; CHECK-NEXT: trn1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn1q.nxv8i16( %a, %b) ret %out } define @trn1_i32( %a, %b) nounwind { ; CHECK-LABEL: trn1_i32: ; CHECK-NEXT: trn1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn1q.nxv4i32( %a, %b) ret %out } define @trn1_i64( %a, %b) nounwind { ; CHECK-LABEL: trn1_i64: ; CHECK-NEXT: trn1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn1q.nxv2i64( %a, %b) ret %out } define @trn1_f16( %a, %b) nounwind { ; CHECK-LABEL: trn1_f16: ; CHECK-NEXT: trn1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn1q.nxv8f16( %a, %b) ret %out } define @trn1_bf16( %a, %b) nounwind #0 { ; CHECK-LABEL: trn1_bf16: ; CHECK-NEXT: trn1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn1q.nxv8bf16( %a, %b) ret %out } define @trn1_f32( %a, %b) nounwind { ; CHECK-LABEL: trn1_f32: ; CHECK-NEXT: trn1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn1q.nxv4f32( %a, %b) ret %out } define @trn1_f64( %a, %b) nounwind { ; CHECK-LABEL: trn1_f64: ; CHECK-NEXT: trn1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn1q.nxv2f64( %a, %b) ret %out } ; ; TRN2Q ; define @trn2_i8( %a, %b) nounwind { ; CHECK-LABEL: trn2_i8: ; CHECK-NEXT: trn2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn2q.nxv16i8( %a, %b) ret %out } define @trn2_i16( %a, %b) nounwind { ; CHECK-LABEL: trn2_i16: ; CHECK-NEXT: trn2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn2q.nxv8i16( %a, %b) ret %out } define @trn2_i32( %a, %b) nounwind { ; CHECK-LABEL: trn2_i32: ; CHECK-NEXT: trn2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn2q.nxv4i32( %a, %b) ret %out } define @trn2_i64( %a, %b) nounwind { ; CHECK-LABEL: trn2_i64: ; CHECK-NEXT: trn2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn2q.nxv2i64( %a, %b) ret %out } define @trn2_f16( %a, %b) nounwind { ; CHECK-LABEL: trn2_f16: ; CHECK-NEXT: trn2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn2q.nxv8f16( %a, %b) ret %out } define @trn2_bf16( %a, %b) nounwind #0 { ; CHECK-LABEL: trn2_bf16: ; CHECK-NEXT: trn2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn2q.nxv8bf16( %a, %b) ret %out } define @trn2_f32( %a, %b) nounwind { ; CHECK-LABEL: trn2_f32: ; CHECK-NEXT: trn2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn2q.nxv4f32( %a, %b) ret %out } define @trn2_f64( %a, %b) nounwind { ; CHECK-LABEL: trn2_f64: ; CHECK-NEXT: trn2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.trn2q.nxv2f64( %a, %b) ret %out } ; ; UZP1Q ; define @uzp1_i8( %a, %b) nounwind { ; CHECK-LABEL: uzp1_i8: ; CHECK-NEXT: uzp1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp1q.nxv16i8( %a, %b) ret %out } define @uzp1_i16( %a, %b) nounwind { ; CHECK-LABEL: uzp1_i16: ; CHECK-NEXT: uzp1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp1q.nxv8i16( %a, %b) ret %out } define @uzp1_i32( %a, %b) nounwind { ; CHECK-LABEL: uzp1_i32: ; CHECK-NEXT: uzp1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp1q.nxv4i32( %a, %b) ret %out } define @uzp1_i64( %a, %b) nounwind { ; CHECK-LABEL: uzp1_i64: ; CHECK-NEXT: uzp1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp1q.nxv2i64( %a, %b) ret %out } define @uzp1_f16( %a, %b) nounwind { ; CHECK-LABEL: uzp1_f16: ; CHECK-NEXT: uzp1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp1q.nxv8f16( %a, %b) ret %out } define @uzp1_bf16( %a, %b) nounwind #0 { ; CHECK-LABEL: uzp1_bf16: ; CHECK-NEXT: uzp1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp1q.nxv8bf16( %a, %b) ret %out } define @uzp1_f32( %a, %b) nounwind { ; CHECK-LABEL: uzp1_f32: ; CHECK-NEXT: uzp1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp1q.nxv4f32( %a, %b) ret %out } define @uzp1_f64( %a, %b) nounwind { ; CHECK-LABEL: uzp1_f64: ; CHECK-NEXT: uzp1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp1q.nxv2f64( %a, %b) ret %out } ; ; UZP2Q ; define @uzp2_i8( %a, %b) nounwind { ; CHECK-LABEL: uzp2_i8: ; CHECK-NEXT: uzp2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp2q.nxv16i8( %a, %b) ret %out } define @uzp2_i16( %a, %b) nounwind { ; CHECK-LABEL: uzp2_i16: ; CHECK-NEXT: uzp2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp2q.nxv8i16( %a, %b) ret %out } define @uzp2_i32( %a, %b) nounwind { ; CHECK-LABEL: uzp2_i32: ; CHECK-NEXT: uzp2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp2q.nxv4i32( %a, %b) ret %out } define @uzp2_i64( %a, %b) nounwind { ; CHECK-LABEL: uzp2_i64: ; CHECK-NEXT: uzp2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp2q.nxv2i64( %a, %b) ret %out } define @uzp2_f16( %a, %b) nounwind { ; CHECK-LABEL: uzp2_f16: ; CHECK-NEXT: uzp2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp2q.nxv8f16( %a, %b) ret %out } define @uzp2_bf16( %a, %b) nounwind #0 { ; CHECK-LABEL: uzp2_bf16: ; CHECK-NEXT: uzp2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp2q.nxv8bf16( %a, %b) ret %out } define @uzp2_f32( %a, %b) nounwind { ; CHECK-LABEL: uzp2_f32: ; CHECK-NEXT: uzp2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp2q.nxv4f32( %a, %b) ret %out } define @uzp2_f64( %a, %b) nounwind { ; CHECK-LABEL: uzp2_f64: ; CHECK-NEXT: uzp2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uzp2q.nxv2f64( %a, %b) ret %out } ; ; ZIP1Q ; define @zip1_i8( %a, %b) nounwind { ; CHECK-LABEL: zip1_i8: ; CHECK-NEXT: zip1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip1q.nxv16i8( %a, %b) ret %out } define @zip1_i16( %a, %b) nounwind { ; CHECK-LABEL: zip1_i16: ; CHECK-NEXT: zip1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip1q.nxv8i16( %a, %b) ret %out } define @zip1_i32( %a, %b) nounwind { ; CHECK-LABEL: zip1_i32: ; CHECK-NEXT: zip1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip1q.nxv4i32( %a, %b) ret %out } define @zip1_i64( %a, %b) nounwind { ; CHECK-LABEL: zip1_i64: ; CHECK-NEXT: zip1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip1q.nxv2i64( %a, %b) ret %out } define @zip1_f16( %a, %b) nounwind { ; CHECK-LABEL: zip1_f16: ; CHECK-NEXT: zip1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip1q.nxv8f16( %a, %b) ret %out } define @zip1_bf16( %a, %b) nounwind #0 { ; CHECK-LABEL: zip1_bf16: ; CHECK-NEXT: zip1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip1q.nxv8bf16( %a, %b) ret %out } define @zip1_f32( %a, %b) nounwind { ; CHECK-LABEL: zip1_f32: ; CHECK-NEXT: zip1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip1q.nxv4f32( %a, %b) ret %out } define @zip1_f64( %a, %b) nounwind { ; CHECK-LABEL: zip1_f64: ; CHECK-NEXT: zip1 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip1q.nxv2f64( %a, %b) ret %out } ; ; ZIP2Q ; define @zip2_i8( %a, %b) nounwind { ; CHECK-LABEL: zip2_i8: ; CHECK-NEXT: zip2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip2q.nxv16i8( %a, %b) ret %out } define @zip2_i16( %a, %b) nounwind { ; CHECK-LABEL: zip2_i16: ; CHECK-NEXT: zip2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip2q.nxv8i16( %a, %b) ret %out } define @zip2_i32( %a, %b) nounwind { ; CHECK-LABEL: zip2_i32: ; CHECK-NEXT: zip2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip2q.nxv4i32( %a, %b) ret %out } define @zip2_i64( %a, %b) nounwind { ; CHECK-LABEL: zip2_i64: ; CHECK-NEXT: zip2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip2q.nxv2i64( %a, %b) ret %out } define @zip2_f16( %a, %b) nounwind { ; CHECK-LABEL: zip2_f16: ; CHECK-NEXT: zip2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip2q.nxv8f16( %a, %b) ret %out } define @zip2_bf16( %a, %b) nounwind #0 { ; CHECK-LABEL: zip2_bf16: ; CHECK-NEXT: zip2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip2q.nxv8bf16( %a, %b) ret %out } define @zip2_f32( %a, %b) nounwind { ; CHECK-LABEL: zip2_f32: ; CHECK-NEXT: zip2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip2q.nxv4f32( %a, %b) ret %out } define @zip2_f64( %a, %b) nounwind { ; CHECK-LABEL: zip2_f64: ; CHECK-NEXT: zip2 z0.q, z0.q, z1.q ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.zip2q.nxv2f64( %a, %b) ret %out } declare @llvm.aarch64.sve.trn1q.nxv2f64(, ) declare @llvm.aarch64.sve.trn1q.nxv2i64(, ) declare @llvm.aarch64.sve.trn1q.nxv4f32(, ) declare @llvm.aarch64.sve.trn1q.nxv4i32(, ) declare @llvm.aarch64.sve.trn1q.nxv8bf16(, ) declare @llvm.aarch64.sve.trn1q.nxv8f16(, ) declare @llvm.aarch64.sve.trn1q.nxv8i16(, ) declare @llvm.aarch64.sve.trn1q.nxv16i8(, ) declare @llvm.aarch64.sve.trn2q.nxv2f64(, ) declare @llvm.aarch64.sve.trn2q.nxv2i64(, ) declare @llvm.aarch64.sve.trn2q.nxv4f32(, ) declare @llvm.aarch64.sve.trn2q.nxv4i32(, ) declare @llvm.aarch64.sve.trn2q.nxv8bf16(, ) declare @llvm.aarch64.sve.trn2q.nxv8f16(, ) declare @llvm.aarch64.sve.trn2q.nxv8i16(, ) declare @llvm.aarch64.sve.trn2q.nxv16i8(, ) declare @llvm.aarch64.sve.uzp1q.nxv2f64(, ) declare @llvm.aarch64.sve.uzp1q.nxv2i64(, ) declare @llvm.aarch64.sve.uzp1q.nxv4f32(, ) declare @llvm.aarch64.sve.uzp1q.nxv4i32(, ) declare @llvm.aarch64.sve.uzp1q.nxv8bf16(, ) declare @llvm.aarch64.sve.uzp1q.nxv8f16(, ) declare @llvm.aarch64.sve.uzp1q.nxv8i16(, ) declare @llvm.aarch64.sve.uzp1q.nxv16i8(, ) declare @llvm.aarch64.sve.uzp2q.nxv2f64(, ) declare @llvm.aarch64.sve.uzp2q.nxv2i64(, ) declare @llvm.aarch64.sve.uzp2q.nxv4f32(, ) declare @llvm.aarch64.sve.uzp2q.nxv4i32(, ) declare @llvm.aarch64.sve.uzp2q.nxv8bf16(, ) declare @llvm.aarch64.sve.uzp2q.nxv8f16(, ) declare @llvm.aarch64.sve.uzp2q.nxv8i16(, ) declare @llvm.aarch64.sve.uzp2q.nxv16i8(, ) declare @llvm.aarch64.sve.zip1q.nxv2f64(, ) declare @llvm.aarch64.sve.zip1q.nxv2i64(, ) declare @llvm.aarch64.sve.zip1q.nxv4f32(, ) declare @llvm.aarch64.sve.zip1q.nxv4i32(, ) declare @llvm.aarch64.sve.zip1q.nxv8bf16(, ) declare @llvm.aarch64.sve.zip1q.nxv8f16(, ) declare @llvm.aarch64.sve.zip1q.nxv8i16(, ) declare @llvm.aarch64.sve.zip1q.nxv16i8(, ) declare @llvm.aarch64.sve.zip2q.nxv2f64(, ) declare @llvm.aarch64.sve.zip2q.nxv2i64(, ) declare @llvm.aarch64.sve.zip2q.nxv4f32(, ) declare @llvm.aarch64.sve.zip2q.nxv4i32(, ) declare @llvm.aarch64.sve.zip2q.nxv8bf16(, ) declare @llvm.aarch64.sve.zip2q.nxv8f16(, ) declare @llvm.aarch64.sve.zip2q.nxv8i16(, ) declare @llvm.aarch64.sve.zip2q.nxv16i8(, ) ; +bf16 is required for the bfloat version. attributes #0 = { "target-features"="+sve,+fp64mm,+bf16" }