; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=aarch64 -mattr=+sve -passes="print" 2>&1 -disable-output \ ; RUN: -aarch64-sve-vector-bits-min=128 \ ; RUN: | FileCheck %s --check-prefixes=VSCALE-ANY,VSCALE-1 ; RUN: opt < %s -mtriple=aarch64 -mattr=+sve -passes="print" 2>&1 -disable-output \ ; RUN: -aarch64-sve-vector-bits-min=128 -aarch64-sve-vector-bits-max=128 \ ; RUN: | FileCheck %s --check-prefixes=VSCALE-ANY,VSCALE-1 ; RUN: opt < %s -mtriple=aarch64 -mattr=+sve -passes="print" 2>&1 -disable-output \ ; RUN: -aarch64-sve-vector-bits-min=256 \ ; RUN: | FileCheck %s --check-prefixes=VSCALE-ANY,VSCALE-2 ; RUN: opt < %s -mtriple=aarch64 -mattr=+sve -passes="print" 2>&1 -disable-output \ ; RUN: -aarch64-sve-vector-bits-min=256 -aarch64-sve-vector-bits-max=256 \ ; RUN: | FileCheck %s --check-prefixes=VSCALE-ANY,VSCALE-2 ; RUN: opt < %s -mtriple=aarch64 -mattr=+sve -passes="print" 2>&1 -disable-output \ ; RUN: -aarch64-sve-vector-bits-min=512 \ ; RUN: | FileCheck %s --check-prefixes=VSCALE-ANY,VSCALE-4 ; RUN: opt < %s -mtriple=aarch64 -mattr=+sve -passes="print" 2>&1 -disable-output \ ; RUN: -aarch64-sve-vector-bits-min=512 -aarch64-sve-vector-bits-max=512 \ ; RUN: | FileCheck %s --check-prefixes=VSCALE-ANY,VSCALE-4 ; This tests the cost of fixed-length subvector extracts for SVE, ; either for a minimum vscale or a fixed vscale (aka VLS). ; For the NEON equivalent test, see shuffle-extract.ll define void @extract_half_lo() { ; VSCALE-ANY-LABEL: 'extract_half_lo' ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i8_lo = shufflevector <16 x i8> poison, <16 x i8> poison, <8 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v32i8_lo = shufflevector <32 x i8> poison, <32 x i8> poison, <16 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v64i8_lo = shufflevector <64 x i8> poison, <64 x i8> poison, <32 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i16_lo = shufflevector <8 x i16> poison, <8 x i16> poison, <4 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i16_lo = shufflevector <16 x i16> poison, <16 x i16> poison, <8 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v32i16_lo = shufflevector <32 x i16> poison, <32 x i16> poison, <16 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_lo = shufflevector <4 x i32> poison, <4 x i32> poison, <2 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_lo = shufflevector <8 x i32> poison, <8 x i32> poison, <4 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i32_lo = shufflevector <16 x i32> poison, <16 x i32> poison, <8 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_lo = shufflevector <2 x i64> poison, <2 x i64> poison, <1 x i32> zeroinitializer ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_lo = shufflevector <4 x i64> poison, <4 x i64> poison, <2 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_lo = shufflevector <8 x i64> poison, <8 x i64> poison, <4 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v16i8_lo = shufflevector <16 x i8> poison, <16 x i8> poison, <8 x i32> %v32i8_lo = shufflevector <32 x i8> poison, <32 x i8> poison, <16 x i32> %v64i8_lo = shufflevector <64 x i8> poison, <64 x i8> poison, <32 x i32> %v8i16_lo = shufflevector <8 x i16> poison, <8 x i16> poison, <4 x i32> %v16i16_lo = shufflevector <16 x i16> poison, <16 x i16> poison, <8 x i32> %v32i16_lo = shufflevector <32 x i16> poison, <32 x i16> poison, <16 x i32> %v4i32_lo = shufflevector <4 x i32> poison, <4 x i32> poison, <2 x i32> %v8i32_lo = shufflevector <8 x i32> poison, <8 x i32> poison, <4 x i32> %v16i32_lo = shufflevector <16 x i32> poison, <16 x i32> poison, <8 x i32> %v2i64_lo = shufflevector <2 x i64> poison, <2 x i64> poison, <1 x i32> %v4i64_lo = shufflevector <4 x i64> poison, <4 x i64> poison, <2 x i32> %v8i64_lo = shufflevector <8 x i64> poison, <8 x i64> poison, <4 x i32> ret void } define void @extract_half_hi() { ; VSCALE-1-LABEL: 'extract_half_hi' ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_hi = shufflevector <16 x i8> poison, <16 x i8> poison, <8 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v32i8_hi = shufflevector <32 x i8> poison, <32 x i8> poison, <16 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v64i8_hi = shufflevector <64 x i8> poison, <64 x i8> poison, <32 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_hi = shufflevector <8 x i16> poison, <8 x i16> poison, <4 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v16i16_hi = shufflevector <16 x i16> poison, <16 x i16> poison, <8 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v32i16_hi = shufflevector <32 x i16> poison, <32 x i16> poison, <16 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_hi = shufflevector <4 x i32> poison, <4 x i32> poison, <2 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v8i32_hi = shufflevector <8 x i32> poison, <8 x i32> poison, <4 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %v16i32_hi = shufflevector <16 x i32> poison, <16 x i32> poison, <8 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64_hi = shufflevector <2 x i64> poison, <2 x i64> poison, <1 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_hi = shufflevector <4 x i64> poison, <4 x i64> poison, <2 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64_hi = shufflevector <8 x i64> poison, <8 x i64> poison, <4 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; VSCALE-2-LABEL: 'extract_half_hi' ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_hi = shufflevector <16 x i8> poison, <16 x i8> poison, <8 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_hi = shufflevector <32 x i8> poison, <32 x i8> poison, <16 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %v64i8_hi = shufflevector <64 x i8> poison, <64 x i8> poison, <32 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_hi = shufflevector <8 x i16> poison, <8 x i16> poison, <4 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_hi = shufflevector <16 x i16> poison, <16 x i16> poison, <8 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %v32i16_hi = shufflevector <32 x i16> poison, <32 x i16> poison, <16 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_hi = shufflevector <4 x i32> poison, <4 x i32> poison, <2 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_hi = shufflevector <8 x i32> poison, <8 x i32> poison, <4 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16i32_hi = shufflevector <16 x i32> poison, <16 x i32> poison, <8 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64_hi = shufflevector <2 x i64> poison, <2 x i64> poison, <1 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i64_hi = shufflevector <4 x i64> poison, <4 x i64> poison, <2 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8i64_hi = shufflevector <8 x i64> poison, <8 x i64> poison, <4 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; VSCALE-4-LABEL: 'extract_half_hi' ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_hi = shufflevector <16 x i8> poison, <16 x i8> poison, <8 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_hi = shufflevector <32 x i8> poison, <32 x i8> poison, <16 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_hi = shufflevector <64 x i8> poison, <64 x i8> poison, <32 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_hi = shufflevector <8 x i16> poison, <8 x i16> poison, <4 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_hi = shufflevector <16 x i16> poison, <16 x i16> poison, <8 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_hi = shufflevector <32 x i16> poison, <32 x i16> poison, <16 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_hi = shufflevector <4 x i32> poison, <4 x i32> poison, <2 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_hi = shufflevector <8 x i32> poison, <8 x i32> poison, <4 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_hi = shufflevector <16 x i32> poison, <16 x i32> poison, <8 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64_hi = shufflevector <2 x i64> poison, <2 x i64> poison, <1 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i64_hi = shufflevector <4 x i64> poison, <4 x i64> poison, <2 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i64_hi = shufflevector <8 x i64> poison, <8 x i64> poison, <4 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v16i8_hi = shufflevector <16 x i8> poison, <16 x i8> poison, <8 x i32> %v32i8_hi = shufflevector <32 x i8> poison, <32 x i8> poison, <16 x i32> %v64i8_hi = shufflevector <64 x i8> poison, <64 x i8> poison, <32 x i32> %v8i16_hi = shufflevector <8 x i16> poison, <8 x i16> poison, <4 x i32> %v16i16_hi = shufflevector <16 x i16> poison, <16 x i16> poison, <8 x i32> %v32i16_hi = shufflevector <32 x i16> poison, <32 x i16> poison, <16 x i32> %v4i32_hi = shufflevector <4 x i32> poison, <4 x i32> poison, <2 x i32> %v8i32_hi = shufflevector <8 x i32> poison, <8 x i32> poison, <4 x i32> %v16i32_hi = shufflevector <16 x i32> poison, <16 x i32> poison, <8 x i32> %v2i64_hi = shufflevector <2 x i64> poison, <2 x i64> poison, <1 x i32> %v4i64_hi = shufflevector <4 x i64> poison, <4 x i64> poison, <2 x i32> %v8i64_hi = shufflevector <8 x i64> poison, <8 x i64> poison, <4 x i32> ret void } define void @extract_half_unaligned() { ; VSCALE-1-LABEL: 'extract_half_unaligned' ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v16i8_mi = shufflevector <16 x i8> poison, <16 x i8> poison, <8 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v32i8_mi = shufflevector <32 x i8> poison, <32 x i8> poison, <16 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v64i8_mi = shufflevector <64 x i8> poison, <64 x i8> poison, <32 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i16_mi = shufflevector <8 x i16> poison, <8 x i16> poison, <4 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v16i16_mi = shufflevector <16 x i16> poison, <16 x i16> poison, <8 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v32i16_mi = shufflevector <32 x i16> poison, <32 x i16> poison, <16 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i32_mi = shufflevector <4 x i32> poison, <4 x i32> poison, <2 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v8i32_mi = shufflevector <8 x i32> poison, <8 x i32> poison, <4 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %v16i32_mi = shufflevector <16 x i32> poison, <16 x i32> poison, <8 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_mi = shufflevector <4 x i64> poison, <4 x i64> poison, <2 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64_mi = shufflevector <8 x i64> poison, <8 x i64> poison, <4 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; VSCALE-2-LABEL: 'extract_half_unaligned' ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v16i8_mi = shufflevector <16 x i8> poison, <16 x i8> poison, <8 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %v32i8_mi = shufflevector <32 x i8> poison, <32 x i8> poison, <16 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %v64i8_mi = shufflevector <64 x i8> poison, <64 x i8> poison, <32 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i16_mi = shufflevector <8 x i16> poison, <8 x i16> poison, <4 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16i16_mi = shufflevector <16 x i16> poison, <16 x i16> poison, <8 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %v32i16_mi = shufflevector <32 x i16> poison, <32 x i16> poison, <16 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i32_mi = shufflevector <4 x i32> poison, <4 x i32> poison, <2 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8i32_mi = shufflevector <8 x i32> poison, <8 x i32> poison, <4 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16i32_mi = shufflevector <16 x i32> poison, <16 x i32> poison, <8 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4i64_mi = shufflevector <4 x i64> poison, <4 x i64> poison, <2 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8i64_mi = shufflevector <8 x i64> poison, <8 x i64> poison, <4 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; VSCALE-4-LABEL: 'extract_half_unaligned' ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v16i8_mi = shufflevector <16 x i8> poison, <16 x i8> poison, <8 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %v32i8_mi = shufflevector <32 x i8> poison, <32 x i8> poison, <16 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %v64i8_mi = shufflevector <64 x i8> poison, <64 x i8> poison, <32 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i16_mi = shufflevector <8 x i16> poison, <8 x i16> poison, <4 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16i16_mi = shufflevector <16 x i16> poison, <16 x i16> poison, <8 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %v32i16_mi = shufflevector <32 x i16> poison, <32 x i16> poison, <16 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i32_mi = shufflevector <4 x i32> poison, <4 x i32> poison, <2 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8i32_mi = shufflevector <8 x i32> poison, <8 x i32> poison, <4 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16i32_mi = shufflevector <16 x i32> poison, <16 x i32> poison, <8 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4i64_mi = shufflevector <4 x i64> poison, <4 x i64> poison, <2 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8i64_mi = shufflevector <8 x i64> poison, <8 x i64> poison, <4 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v16i8_mi = shufflevector <16 x i8> poison, <16 x i8> poison, <8 x i32> %v32i8_mi = shufflevector <32 x i8> poison, <32 x i8> poison, <16 x i32> %v64i8_mi = shufflevector <64 x i8> poison, <64 x i8> poison, <32 x i32> %v8i16_mi = shufflevector <8 x i16> poison, <8 x i16> poison, <4 x i32> %v16i16_mi = shufflevector <16 x i16> poison, <16 x i16> poison, <8 x i32> %v32i16_mi = shufflevector <32 x i16> poison, <32 x i16> poison, <16 x i32> %v4i32_mi = shufflevector <4 x i32> poison, <4 x i32> poison, <2 x i32> %v8i32_mi = shufflevector <8 x i32> poison, <8 x i32> poison, <4 x i32> %v16i32_mi = shufflevector <16 x i32> poison, <16 x i32> poison, <8 x i32> %v4i64_mi = shufflevector <4 x i64> poison, <4 x i64> poison, <2 x i32> %v8i64_mi = shufflevector <8 x i64> poison, <8 x i64> poison, <4 x i32> ret void } define void @extract_qtr_lo() { ; VSCALE-ANY-LABEL: 'extract_qtr_lo' ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i8_lo = shufflevector <16 x i8> poison, <16 x i8> poison, <4 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v32i8_lo = shufflevector <32 x i8> poison, <32 x i8> poison, <8 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v64i8_lo = shufflevector <64 x i8> poison, <64 x i8> poison, <16 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i16_lo = shufflevector <8 x i16> poison, <8 x i16> poison, <2 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i16_lo = shufflevector <16 x i16> poison, <16 x i16> poison, <4 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v32i16_lo = shufflevector <32 x i16> poison, <32 x i16> poison, <8 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_lo = shufflevector <4 x i32> poison, <4 x i32> poison, <1 x i32> zeroinitializer ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_lo = shufflevector <8 x i32> poison, <8 x i32> poison, <2 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i32_lo = shufflevector <16 x i32> poison, <16 x i32> poison, <4 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_lo = shufflevector <4 x i64> poison, <4 x i64> poison, <1 x i32> zeroinitializer ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_lo = shufflevector <8 x i64> poison, <8 x i64> poison, <2 x i32> ; VSCALE-ANY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v16i8_lo = shufflevector <16 x i8> poison, <16 x i8> poison, <4 x i32> %v32i8_lo = shufflevector <32 x i8> poison, <32 x i8> poison, <8 x i32> %v64i8_lo = shufflevector <64 x i8> poison, <64 x i8> poison, <16 x i32> %v8i16_lo = shufflevector <8 x i16> poison, <8 x i16> poison, <2 x i32> %v16i16_lo = shufflevector <16 x i16> poison, <16 x i16> poison, <4 x i32> %v32i16_lo = shufflevector <32 x i16> poison, <32 x i16> poison, <8 x i32> %v4i32_lo = shufflevector <4 x i32> poison, <4 x i32> poison, <1 x i32> %v8i32_lo = shufflevector <8 x i32> poison, <8 x i32> poison, <2 x i32> %v16i32_lo = shufflevector <16 x i32> poison, <16 x i32> poison, <4 x i32> %v4i64_lo = shufflevector <4 x i64> poison, <4 x i64> poison, <1 x i32> %v8i64_lo = shufflevector <8 x i64> poison, <8 x i64> poison, <2 x i32> ret void } define void @extract_qtr_hi() { ; VSCALE-1-LABEL: 'extract_qtr_hi' ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v16i8_hi = shufflevector <16 x i8> poison, <16 x i8> poison, <4 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v32i8_hi = shufflevector <32 x i8> poison, <32 x i8> poison, <8 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v64i8_hi = shufflevector <64 x i8> poison, <64 x i8> poison, <16 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i16_hi = shufflevector <8 x i16> poison, <8 x i16> poison, <2 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v16i16_hi = shufflevector <16 x i16> poison, <16 x i16> poison, <4 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v32i16_hi = shufflevector <32 x i16> poison, <32 x i16> poison, <8 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i32_hi = shufflevector <4 x i32> poison, <4 x i32> poison, <1 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v8i32_hi = shufflevector <8 x i32> poison, <8 x i32> poison, <2 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %v16i32_hi = shufflevector <16 x i32> poison, <16 x i32> poison, <4 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_hi = shufflevector <4 x i64> poison, <4 x i64> poison, <1 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64_hi = shufflevector <8 x i64> poison, <8 x i64> poison, <2 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; VSCALE-2-LABEL: 'extract_qtr_hi' ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v16i8_hi = shufflevector <16 x i8> poison, <16 x i8> poison, <4 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v32i8_hi = shufflevector <32 x i8> poison, <32 x i8> poison, <8 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %v64i8_hi = shufflevector <64 x i8> poison, <64 x i8> poison, <16 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i16_hi = shufflevector <8 x i16> poison, <8 x i16> poison, <2 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v16i16_hi = shufflevector <16 x i16> poison, <16 x i16> poison, <4 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v32i16_hi = shufflevector <32 x i16> poison, <32 x i16> poison, <8 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i32_hi = shufflevector <4 x i32> poison, <4 x i32> poison, <1 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i32_hi = shufflevector <8 x i32> poison, <8 x i32> poison, <2 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v16i32_hi = shufflevector <16 x i32> poison, <16 x i32> poison, <4 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i64_hi = shufflevector <4 x i64> poison, <4 x i64> poison, <1 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i64_hi = shufflevector <8 x i64> poison, <8 x i64> poison, <2 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; VSCALE-4-LABEL: 'extract_qtr_hi' ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v16i8_hi = shufflevector <16 x i8> poison, <16 x i8> poison, <4 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v32i8_hi = shufflevector <32 x i8> poison, <32 x i8> poison, <8 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %v64i8_hi = shufflevector <64 x i8> poison, <64 x i8> poison, <16 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i16_hi = shufflevector <8 x i16> poison, <8 x i16> poison, <2 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v16i16_hi = shufflevector <16 x i16> poison, <16 x i16> poison, <4 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v32i16_hi = shufflevector <32 x i16> poison, <32 x i16> poison, <8 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i32_hi = shufflevector <4 x i32> poison, <4 x i32> poison, <1 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i32_hi = shufflevector <8 x i32> poison, <8 x i32> poison, <2 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v16i32_hi = shufflevector <16 x i32> poison, <16 x i32> poison, <4 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i64_hi = shufflevector <4 x i64> poison, <4 x i64> poison, <1 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i64_hi = shufflevector <8 x i64> poison, <8 x i64> poison, <2 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v16i8_hi = shufflevector <16 x i8> poison, <16 x i8> poison, <4 x i32> %v32i8_hi = shufflevector <32 x i8> poison, <32 x i8> poison, <8 x i32> %v64i8_hi = shufflevector <64 x i8> poison, <64 x i8> poison, <16 x i32> %v8i16_hi = shufflevector <8 x i16> poison, <8 x i16> poison, <2 x i32> %v16i16_hi = shufflevector <16 x i16> poison, <16 x i16> poison, <4 x i32> %v32i16_hi = shufflevector <32 x i16> poison, <32 x i16> poison, <8 x i32> %v4i32_hi = shufflevector <4 x i32> poison, <4 x i32> poison, <1 x i32> %v8i32_hi = shufflevector <8 x i32> poison, <8 x i32> poison, <2 x i32> %v16i32_hi = shufflevector <16 x i32> poison, <16 x i32> poison, <4 x i32> %v4i64_hi = shufflevector <4 x i64> poison, <4 x i64> poison, <1 x i32> %v8i64_hi = shufflevector <8 x i64> poison, <8 x i64> poison, <2 x i32> ret void } define void @extract_qtr_unaligned() { ; VSCALE-1-LABEL: 'extract_qtr_unaligned' ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v16i8_mi = shufflevector <16 x i8> poison, <16 x i8> poison, <4 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v32i8_mi = shufflevector <32 x i8> poison, <32 x i8> poison, <8 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v64i8_mi = shufflevector <64 x i8> poison, <64 x i8> poison, <16 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i16_mi = shufflevector <8 x i16> poison, <8 x i16> poison, <2 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_mi = shufflevector <16 x i16> poison, <16 x i16> poison, <4 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v32i16_mi = shufflevector <32 x i16> poison, <32 x i16> poison, <8 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i32_mi = shufflevector <4 x i32> poison, <4 x i32> poison, <1 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_mi = shufflevector <8 x i32> poison, <8 x i32> poison, <2 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %v16i32_mi = shufflevector <16 x i32> poison, <16 x i32> poison, <4 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i64_mi = shufflevector <4 x i64> poison, <4 x i64> poison, <1 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64_mi = shufflevector <8 x i64> poison, <8 x i64> poison, <2 x i32> ; VSCALE-1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; VSCALE-2-LABEL: 'extract_qtr_unaligned' ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v16i8_mi = shufflevector <16 x i8> poison, <16 x i8> poison, <4 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v32i8_mi = shufflevector <32 x i8> poison, <32 x i8> poison, <8 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %v64i8_mi = shufflevector <64 x i8> poison, <64 x i8> poison, <16 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i16_mi = shufflevector <8 x i16> poison, <8 x i16> poison, <2 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v16i16_mi = shufflevector <16 x i16> poison, <16 x i16> poison, <4 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v32i16_mi = shufflevector <32 x i16> poison, <32 x i16> poison, <8 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i32_mi = shufflevector <4 x i32> poison, <4 x i32> poison, <1 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i32_mi = shufflevector <8 x i32> poison, <8 x i32> poison, <2 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_mi = shufflevector <16 x i32> poison, <16 x i32> poison, <4 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i64_mi = shufflevector <4 x i64> poison, <4 x i64> poison, <1 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i64_mi = shufflevector <8 x i64> poison, <8 x i64> poison, <2 x i32> ; VSCALE-2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; VSCALE-4-LABEL: 'extract_qtr_unaligned' ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v16i8_mi = shufflevector <16 x i8> poison, <16 x i8> poison, <4 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v32i8_mi = shufflevector <32 x i8> poison, <32 x i8> poison, <8 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %v64i8_mi = shufflevector <64 x i8> poison, <64 x i8> poison, <16 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i16_mi = shufflevector <8 x i16> poison, <8 x i16> poison, <2 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v16i16_mi = shufflevector <16 x i16> poison, <16 x i16> poison, <4 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v32i16_mi = shufflevector <32 x i16> poison, <32 x i16> poison, <8 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i32_mi = shufflevector <4 x i32> poison, <4 x i32> poison, <1 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i32_mi = shufflevector <8 x i32> poison, <8 x i32> poison, <2 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v16i32_mi = shufflevector <16 x i32> poison, <16 x i32> poison, <4 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i64_mi = shufflevector <4 x i64> poison, <4 x i64> poison, <1 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v8i64_mi = shufflevector <8 x i64> poison, <8 x i64> poison, <2 x i32> ; VSCALE-4-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v16i8_mi = shufflevector <16 x i8> poison, <16 x i8> poison, <4 x i32> %v32i8_mi = shufflevector <32 x i8> poison, <32 x i8> poison, <8 x i32> %v64i8_mi = shufflevector <64 x i8> poison, <64 x i8> poison, <16 x i32> %v8i16_mi = shufflevector <8 x i16> poison, <8 x i16> poison, <2 x i32> %v16i16_mi = shufflevector <16 x i16> poison, <16 x i16> poison, <4 x i32> %v32i16_mi = shufflevector <32 x i16> poison, <32 x i16> poison, <8 x i32> %v4i32_mi = shufflevector <4 x i32> poison, <4 x i32> poison, <1 x i32> %v8i32_mi = shufflevector <8 x i32> poison, <8 x i32> poison, <2 x i32> %v16i32_mi = shufflevector <16 x i32> poison, <16 x i32> poison, <4 x i32> %v4i64_mi = shufflevector <4 x i64> poison, <4 x i64> poison, <1 x i32> %v8i64_mi = shufflevector <8 x i64> poison, <8 x i64> poison, <2 x i32> ret void }