xref: /llvm-project/llvm/test/Analysis/CostModel/RISCV/fixed-vector-insert-subvector.ll (revision 12bcea3292a1559ecad549b5d34c8abcf19f2626)
1*12bcea32SHan-Kuan Chen; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2*12bcea32SHan-Kuan Chen; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -S -mtriple=riscv64 -mattr=+v | FileCheck %s
3*12bcea32SHan-Kuan Chen
4*12bcea32SHan-Kuan Chendefine void @test() {
5*12bcea32SHan-Kuan Chen; CHECK-LABEL: 'test'
6*12bcea32SHan-Kuan Chen; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %0 = shufflevector <8 x float> poison, <8 x float> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
7*12bcea32SHan-Kuan Chen; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %1 = shufflevector <4 x i16> poison, <4 x i16> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
8*12bcea32SHan-Kuan Chen; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %2 = shufflevector <4 x float> poison, <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
9*12bcea32SHan-Kuan Chen; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %3 = shufflevector <2 x i1> poison, <2 x i1> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
10*12bcea32SHan-Kuan Chen; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
11*12bcea32SHan-Kuan Chen;
12*12bcea32SHan-Kuan Chenentry:
13*12bcea32SHan-Kuan Chen  %0 = shufflevector <8 x float> poison, <8 x float> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
14*12bcea32SHan-Kuan Chen  %1 = shufflevector <4 x i16> poison, <4 x i16> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
15*12bcea32SHan-Kuan Chen  %2 = shufflevector <4 x float> poison, <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
16*12bcea32SHan-Kuan Chen  %3 = shufflevector <2 x i1> poison, <2 x i1> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
17*12bcea32SHan-Kuan Chen  ret void
18*12bcea32SHan-Kuan Chen}
19