; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; 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 ; Test that DAGCombiner doesn't drop the scalable flag when it tries to fold: ; extract_subv (bitcast X), Index --> bitcast (extract_subv X, Index') define @extract_nxv16i8_nxv4i64( %z0_z1) { ; CHECK-LABEL: extract_nxv16i8_nxv4i64: ; CHECK: // %bb.0: ; CHECK-NEXT: mov z0.d, z1.d ; CHECK-NEXT: ret %z0_z1_bc = bitcast %z0_z1 to %ext = call @llvm.aarch64.sve.tuple.get.nxv32i8( %z0_z1_bc, i32 1) ret %ext } define @extract_nxv2i64_nxv32i8( %z0_z1) { ; CHECK-LABEL: extract_nxv2i64_nxv32i8: ; CHECK: // %bb.0: ; CHECK-NEXT: mov z0.d, z1.d ; CHECK-NEXT: ret %z0_z1_bc = bitcast %z0_z1 to %ext = call @llvm.aarch64.sve.tuple.get.nxv4i64( %z0_z1_bc, i32 1) ret %ext } define @extract_lo_nxv4f16_nxv8f16( %z0) { ; CHECK-LABEL: extract_lo_nxv4f16_nxv8f16: ; CHECK: // %bb.0: ; CHECK-NEXT: uunpklo z0.s, z0.h ; CHECK-NEXT: ret %ext = call @llvm.aarch64.sve.tuple.get.nxv8f16( %z0, i32 0) ret %ext } define @extract_hi_nxv4f16_nxv8f16( %z0) { ; CHECK-LABEL: extract_hi_nxv4f16_nxv8f16: ; CHECK: // %bb.0: ; CHECK-NEXT: uunpkhi z0.s, z0.h ; CHECK-NEXT: ret %ext = call @llvm.aarch64.sve.tuple.get.nxv8f16( %z0, i32 1) ret %ext } define @extract_lo_nxv2f32_nxv4f32( %z0) { ; CHECK-LABEL: extract_lo_nxv2f32_nxv4f32: ; CHECK: // %bb.0: ; CHECK-NEXT: uunpklo z0.d, z0.s ; CHECK-NEXT: ret %ext = call @llvm.aarch64.sve.tuple.get.nxv4f32( %z0, i32 0) ret %ext } define @extract_hi_nxv2f32_nxv4f32( %z0) { ; CHECK-LABEL: extract_hi_nxv2f32_nxv4f32: ; CHECK: // %bb.0: ; CHECK-NEXT: uunpkhi z0.d, z0.s ; CHECK-NEXT: ret %ext = call @llvm.aarch64.sve.tuple.get.nxv4f32( %z0, i32 1) ret %ext } define @load_extract_nxv4f32_nxv8f32(* %p) { ; CHECK-LABEL: load_extract_nxv4f32_nxv8f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: ld1w { z0.s }, p0/z, [x0, #1, mul vl] ; CHECK-NEXT: ret %tmp1 = load , * %p, align 16 %tmp2 = call @llvm.aarch64.sve.tuple.get.nxv8f32( %tmp1, i32 1) ret %tmp2 } declare @llvm.aarch64.sve.tuple.get.nxv4i64(, i32) declare @llvm.aarch64.sve.tuple.get.nxv32i8(, i32) declare @llvm.aarch64.sve.tuple.get.nxv4f32(, i32) declare @llvm.aarch64.sve.tuple.get.nxv8f16(, i32) declare @llvm.aarch64.sve.tuple.get.nxv8f32(, i32)