; RUN: llc -mtriple aarch64 -mattr=+sve -asm-verbose=1 < %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 ; ; SVCREATE2 (i8) ; define @test_svcreate2_s8_vec0(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_s8_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv32i8.nxv16i8( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv16i8.nxv32i8( %tuple, i32 0) ret %extract } define @test_svcreate2_s8_vec1(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_s8_vec1: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z1.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv32i8.nxv16i8( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv16i8.nxv32i8( %tuple, i32 1) ret %extract } ; ; SVCREATE2 (i16) ; define @test_svcreate2_s16_vec0(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_s16_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv16i16.nxv8i16( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8i16.nxv16i16( %tuple, i32 0) ret %extract } define @test_svcreate2_s16_vec1(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_s16_vec1: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z1.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv16i16.nxv8i16( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8i16.nxv16i16( %tuple, i32 1) ret %extract } ; ; SVCREATE2 (half) ; define @test_svcreate2_f16_vec0(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_f16_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv16f16.nxv8f16( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8f16.nxv16f16( %tuple, i32 0) ret %extract } define @test_svcreate2_f16_vec1(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_f16_vec1: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z1.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv16f16.nxv8f16( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8f16.nxv16f16( %tuple, i32 1) ret %extract } ; ; SVCREATE2 (bfloat) ; define @test_svcreate2_bf16_vec0(i1 %p, %z0, %z1) local_unnamed_addr #1 { ; CHECK-LABEL: test_svcreate2_bf16_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv16bf16.nxv8bf16( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8bf16.nxv16bf16( %tuple, i32 0) ret %extract } define @test_svcreate2_bf16_vec1(i1 %p, %z0, %z1) local_unnamed_addr #1 { ; CHECK-LABEL: test_svcreate2_bf16_vec1: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z1.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv16bf16.nxv8bf16( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8bf16.nxv16bf16( %tuple, i32 1) ret %extract } ; ; SVCREATE2 (i32) ; define @test_svcreate2_s32_vec0(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_s32_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv8i32.nxv4i32( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv4i32.nxv8i32( %tuple, i32 0) ret %extract } define @test_svcreate2_s32_vec1(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_s32_vec1: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z1.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv8i32.nxv4i32( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv4i32.nxv8i32( %tuple, i32 1) ret %extract } ; ; SVCREATE2 (float) ; define @test_svcreate2_f32_vec0(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_f32_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv8f32.nxv4f32( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv4f32.nxv8f32( %tuple, i32 0) ret %extract } define @test_svcreate2_f32_vec1(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_f32_vec1: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z1.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv8f32.nxv4f32( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv4f32.nxv8f32( %tuple, i32 1) ret %extract } ; ; SVCREATE2 (i64) ; define @test_svcreate2_s64_vec0(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_s64_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv4i64.nxv2i64( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv2i64.nxv4i64( %tuple, i32 0) ret %extract } define @test_svcreate2_s64_vec1(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_s64_vec1: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z1.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv4i64.nxv2i64( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv2i64.nxv4i64( %tuple, i32 1) ret %extract } ; ; SVCREATE2 (double) ; define @test_svcreate2_f64_vec0(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_f64_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv4f64.nxv2f64( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv2f64.nxv4f64( %tuple, i32 0) ret %extract } define @test_svcreate2_f64_vec1(i1 %p, %z0, %z1) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate2_f64_vec1: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z1.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create2.nxv4f64.nxv2f64( %z0, %z1) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv2f64.nxv4f64( %tuple, i32 1) ret %extract } ; ; SVCREATE3 (i8) ; define @test_svcreate3_s8_vec0(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_s8_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv48i8.nxv16i8( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv16i8.nxv48i8( %tuple, i32 0) ret %extract } define @test_svcreate3_s8_vec2(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_s8_vec2: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z2.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv48i8.nxv16i8( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv16i8.nxv48i8( %tuple, i32 2) ret %extract } ; ; SVCREATE3 (i16) ; define @test_svcreate3_s16_vec0(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_s16_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv24i16.nxv8i16( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8i16.nxv24i16( %tuple, i32 0) ret %extract } define @test_svcreate3_s16_vec2(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_s16_vec2: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z2.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv24i16.nxv8i16( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8i16.nxv24i16( %tuple, i32 2) ret %extract } ; ; SVCREATE3 (half) ; define @test_svcreate3_f16_vec0(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_f16_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv24f16.nxv8f16( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8f16.nxv24f16( %tuple, i32 0) ret %extract } define @test_svcreate3_f16_vec2(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_f16_vec2: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z2.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv24f16.nxv8f16( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8f16.nxv24f16( %tuple, i32 2) ret %extract } ; ; SVCREATE3 (bfloat) ; define @test_svcreate3_bf16_vec0(i1 %p, %z0, %z1, %z2) local_unnamed_addr #1 { ; CHECK-LABEL: test_svcreate3_bf16_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv24bf16.nxv8bf16( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8bf16.nxv24bf16( %tuple, i32 0) ret %extract } define @test_svcreate3_bf16_vec2(i1 %p, %z0, %z1, %z2) local_unnamed_addr #1 { ; CHECK-LABEL: test_svcreate3_bf16_vec2: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z2.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv24bf16.nxv8bf16( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8bf16.nxv24bf16( %tuple, i32 2) ret %extract } ; ; SVCREATE3 (i32) ; define @test_svcreate3_s32_vec0(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_s32_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv12i32.nxv4i32( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv4i32.nxv12i32( %tuple, i32 0) ret %extract } define @test_svcreate3_s32_vec2(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_s32_vec2: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z2.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv12i32.nxv4i32( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv4i32.nxv12i32( %tuple, i32 2) ret %extract } ; ; SVCREATE3 (float) ; define @test_svcreate3_f32_vec0(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_f32_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv12f32.nxv4f32( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv4f32.nxv12f32( %tuple, i32 0) ret %extract } define @test_svcreate3_f32_vec2(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_f32_vec2: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z2.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv12f32.nxv4f32( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv4f32.nxv12f32( %tuple, i32 2) ret %extract } ; ; SVCREATE3 (i64) ; define @test_svcreate3_s64_vec0(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_s64_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv6i64.nxv2i64( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv2i64.nxv6i64( %tuple, i32 0) ret %extract } define @test_svcreate3_s64_vec2(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_s64_vec2: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z2.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv6i64.nxv2i64( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv2i64.nxv6i64( %tuple, i32 2) ret %extract } ; ; SVCREATE3 (double) ; define @test_svcreate3_f64_vec0(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_f64_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv6f64.nxv2f64( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv2f64.nxv6f64( %tuple, i32 0) ret %extract } define @test_svcreate3_f64_vec2(i1 %p, %z0, %z1, %z2) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate3_f64_vec2: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z2.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create3.nxv6f64.nxv2f64( %z0, %z1, %z2) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv2f64.nxv6f64( %tuple, i32 2) ret %extract } ; ; SVCREATE4 (i8) ; define @test_svcreate4_s8_vec0(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_s8_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv64i8.nxv16i8( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv16i8.nxv64i8( %tuple, i32 0) ret %extract } define @test_svcreate4_s8_vec3(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_s8_vec3: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z3.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv64i8.nxv16i8( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv16i8.nxv64i8( %tuple, i32 3) ret %extract } ; ; SVCREATE4 (i16) ; define @test_svcreate4_s16_vec0(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_s16_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv32i16.nxv8i16( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8i16.nxv32i16( %tuple, i32 0) ret %extract } define @test_svcreate4_s16_vec3(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_s16_vec3: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z3.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv32i16.nxv8i16( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8i16.nxv32i16( %tuple, i32 3) ret %extract } ; ; SVCREATE4 (half) ; define @test_svcreate4_f16_vec0(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_f16_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv32f16.nxv8f16( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8f16.nxv32f16( %tuple, i32 0) ret %extract } define @test_svcreate4_f16_vec3(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_f16_vec3: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z3.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv32f16.nxv8f16( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8f16.nxv32f16( %tuple, i32 3) ret %extract } ; ; SVCREATE4 (bfloat) ; define @test_svcreate4_bf16_vec0(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #1 { ; CHECK-LABEL: test_svcreate4_bf16_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv32bf16.nxv8bf16( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8bf16.nxv32bf16( %tuple, i32 0) ret %extract } define @test_svcreate4_bf16_vec3(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #1 { ; CHECK-LABEL: test_svcreate4_bf16_vec3: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z3.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv32bf16.nxv8bf16( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv8bf16.nxv32bf16( %tuple, i32 3) ret %extract } ; ; SVCREATE4 (i32) ; define @test_svcreate4_s32_vec0(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_s32_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv16i32.nxv4i32( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv4i32.nxv16i32( %tuple, i32 0) ret %extract } define @test_svcreate4_s32_vec3(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_s32_vec3: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z3.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv16i32.nxv4i32( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv4i32.nxv16i32( %tuple, i32 3) ret %extract } ; ; SVCREATE4 (float) ; define @test_svcreate4_f32_vec0(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_f32_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv16f32.nxv4f32( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv4f32.nxv16f32( %tuple, i32 0) ret %extract } define @test_svcreate4_f32_vec3(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_f32_vec3: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z3.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv16f32.nxv4f32( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv4f32.nxv16f32( %tuple, i32 3) ret %extract } ; ; SVCREATE4 (i64) ; define @test_svcreate4_s64_vec0(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_s64_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv8i64.nxv2i64( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv2i64.nxv8i64( %tuple, i32 0) ret %extract } define @test_svcreate4_s64_vec3(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_s64_vec3: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z3.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv8i64.nxv2i64( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv2i64.nxv8i64( %tuple, i32 3) ret %extract } ; ; SVCREATE4 (double) ; define @test_svcreate4_f64_vec0(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_f64_vec0: ; CHECK: // %L2 ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv8f64.nxv2f64( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv2f64.nxv8f64( %tuple, i32 0) ret %extract } define @test_svcreate4_f64_vec3(i1 %p, %z0, %z1, %z2, %z3) local_unnamed_addr #0 { ; CHECK-LABEL: test_svcreate4_f64_vec3: ; CHECK: // %L2 ; CHECK-NEXT: mov z0.d, z3.d ; CHECK-NEXT: ret %tuple = tail call @llvm.aarch64.sve.tuple.create4.nxv8f64.nxv2f64( %z0, %z1, %z2, %z3) br i1 %p, label %L1, label %L2 L1: ret undef L2: %extract = tail call @llvm.aarch64.sve.tuple.get.nxv2f64.nxv8f64( %tuple, i32 3) ret %extract } attributes #0 = { nounwind "target-features"="+sve" } ; +bf16 is required for the bfloat version. attributes #1 = { nounwind "target-features"="+sve,+bf16" } declare @llvm.aarch64.sve.tuple.create2.nxv4f64.nxv2f64(, ) declare @llvm.aarch64.sve.tuple.create2.nxv8f32.nxv4f32(, ) declare @llvm.aarch64.sve.tuple.create2.nxv16f16.nxv8f16(, ) declare @llvm.aarch64.sve.tuple.create2.nxv16bf16.nxv8bf16(, ) declare @llvm.aarch64.sve.tuple.create2.nxv4i64.nxv2i64(, ) declare @llvm.aarch64.sve.tuple.create2.nxv8i32.nxv4i32(, ) declare @llvm.aarch64.sve.tuple.create2.nxv16i16.nxv8i16(, ) declare @llvm.aarch64.sve.tuple.create2.nxv32i8.nxv16i8(, ) declare @llvm.aarch64.sve.tuple.create3.nxv6f64.nxv2f64(, , ) declare @llvm.aarch64.sve.tuple.create3.nxv12f32.nxv4f32(, , ) declare @llvm.aarch64.sve.tuple.create3.nxv24f16.nxv8f16(, , ) declare @llvm.aarch64.sve.tuple.create3.nxv24bf16.nxv8bf16(, , ) declare @llvm.aarch64.sve.tuple.create3.nxv6i64.nxv2i64(, , ) declare @llvm.aarch64.sve.tuple.create3.nxv12i32.nxv4i32(, , ) declare @llvm.aarch64.sve.tuple.create3.nxv24i16.nxv8i16(, , ) declare @llvm.aarch64.sve.tuple.create3.nxv48i8.nxv16i8(, , ) declare @llvm.aarch64.sve.tuple.create4.nxv8f64.nxv2f64 (, , , ) declare @llvm.aarch64.sve.tuple.create4.nxv16f32.nxv4f32(, , , ) declare @llvm.aarch64.sve.tuple.create4.nxv32f16.nxv8f16(, , , ) declare @llvm.aarch64.sve.tuple.create4.nxv32bf16.nxv8bf16(, , , ) declare @llvm.aarch64.sve.tuple.create4.nxv8i64.nxv2i64(, , , ) declare @llvm.aarch64.sve.tuple.create4.nxv16i32.nxv4i32(, , , ) declare @llvm.aarch64.sve.tuple.create4.nxv32i16.nxv8i16(, , , ) declare @llvm.aarch64.sve.tuple.create4.nxv64i8.nxv16i8(, , , ) declare @llvm.aarch64.sve.tuple.get.nxv16i8.nxv32i8(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv16i8.nxv48i8(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv16i8.nxv64i8(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv8i16.nxv16i16(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv8i16.nxv24i16(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv8i16.nxv32i16(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv4i32.nxv8i32(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv4i32.nxv12i32(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv4i32.nxv16i32(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv2i64.nxv4i64(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv2i64.nxv6i64(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv2i64.nxv8i64(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv8bf16.nxv16bf16(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv8bf16.nxv24bf16(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv8bf16.nxv32bf16(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv8f16.nxv16f16(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv8f16.nxv24f16(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv8f16.nxv32f16(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv4f32.nxv8f32(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv4f32.nxv12f32(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv4f32.nxv16f32(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv2f64.nxv4f64(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv2f64.nxv6f64(, i32 immarg) declare @llvm.aarch64.sve.tuple.get.nxv2f64.nxv8f64(, i32 immarg)