xref: /llvm-project/llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll (revision a6742094324d7166b451c749acf81d27a504c47b)
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv32 -mattr=+v,+f,+d,+zfh,+zvfh < %s | FileCheck %s --check-prefixes=RV32V
3; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv64 -mattr=+v,+f,+d,+zfh,+zvfh < %s | FileCheck %s --check-prefixes=RV64V
4; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv32 -mattr=+zve64x < %s | FileCheck %s --check-prefixes=RV32ZVE64X
5; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv64 -mattr=+zve64x < %s | FileCheck %s --check-prefixes=RV64ZVE64X
6; Check that we don't crash querying costs when vectors are not enabled.
7; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv64
8
9define void @insertelement_int(i32 %x) {
10; RV32V-LABEL: 'insertelement_int'
11; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0
12; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0
13; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v8i1_0 = insertelement <8 x i1> undef, i1 undef, i32 0
14; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v16i1_0 = insertelement <16 x i1> undef, i1 undef, i32 0
15; RV32V-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %v32i1_0 = insertelement <32 x i1> undef, i1 undef, i32 0
16; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv2i1_0 = insertelement <vscale x 2 x i1> undef, i1 undef, i32 0
17; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv4i1_0 = insertelement <vscale x 4 x i1> undef, i1 undef, i32 0
18; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv8i1_0 = insertelement <vscale x 8 x i1> undef, i1 undef, i32 0
19; RV32V-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %nxv16i1_0 = insertelement <vscale x 16 x i1> undef, i1 undef, i32 0
20; RV32V-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %nxv32i1_0 = insertelement <vscale x 32 x i1> undef, i1 undef, i32 0
21; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0
22; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> undef, i8 undef, i32 0
23; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = insertelement <8 x i8> undef, i8 undef, i32 0
24; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = insertelement <16 x i8> undef, i8 undef, i32 0
25; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = insertelement <32 x i8> undef, i8 undef, i32 0
26; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = insertelement <64 x i8> undef, i8 undef, i32 0
27; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v128i8_0 = insertelement <128 x i8> undef, i8 undef, i32 0
28; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8_0 = insertelement <vscale x 2 x i8> undef, i8 undef, i32 0
29; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8_0 = insertelement <vscale x 4 x i8> undef, i8 undef, i32 0
30; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8_0 = insertelement <vscale x 8 x i8> undef, i8 undef, i32 0
31; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8_0 = insertelement <vscale x 16 x i8> undef, i8 undef, i32 0
32; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_0 = insertelement <vscale x 32 x i8> undef, i8 undef, i32 0
33; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv64i8_0 = insertelement <vscale x 64 x i8> undef, i8 undef, i32 0
34; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_0 = insertelement <vscale x 128 x i8> undef, i8 undef, i32 0
35; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 undef, i32 0
36; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = insertelement <4 x i16> undef, i16 undef, i32 0
37; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = insertelement <8 x i16> undef, i16 undef, i32 0
38; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = insertelement <16 x i16> undef, i16 undef, i32 0
39; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = insertelement <32 x i16> undef, i16 undef, i32 0
40; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i16_0 = insertelement <64 x i16> undef, i16 undef, i32 0
41; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16_0 = insertelement <vscale x 2 x i16> undef, i16 undef, i32 0
42; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16_0 = insertelement <vscale x 4 x i16> undef, i16 undef, i32 0
43; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16_0 = insertelement <vscale x 8 x i16> undef, i16 undef, i32 0
44; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_0 = insertelement <vscale x 16 x i16> undef, i16 undef, i32 0
45; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32i16_0 = insertelement <vscale x 32 x i16> undef, i16 undef, i32 0
46; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_0 = insertelement <vscale x 64 x i16> undef, i16 undef, i32 0
47; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 undef, i32 0
48; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = insertelement <4 x i32> undef, i32 undef, i32 0
49; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = insertelement <8 x i32> undef, i32 undef, i32 0
50; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = insertelement <16 x i32> undef, i32 undef, i32 0
51; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_0 = insertelement <32 x i32> undef, i32 undef, i32 0
52; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32_0 = insertelement <vscale x 2 x i32> undef, i32 undef, i32 0
53; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32_0 = insertelement <vscale x 4 x i32> undef, i32 undef, i32 0
54; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = insertelement <vscale x 8 x i32> undef, i32 undef, i32 0
55; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = insertelement <vscale x 16 x i32> undef, i32 undef, i32 0
56; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_0 = insertelement <vscale x 32 x i32> undef, i32 undef, i32 0
57; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0
58; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i64_0 = insertelement <4 x i64> undef, i64 undef, i32 0
59; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i64_0 = insertelement <8 x i64> undef, i64 undef, i32 0
60; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i64_0 = insertelement <16 x i64> undef, i64 undef, i32 0
61; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i64_0 = insertelement <vscale x 2 x i64> undef, i64 undef, i32 0
62; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i64_0 = insertelement <vscale x 4 x i64> undef, i64 undef, i32 0
63; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i64_0 = insertelement <vscale x 8 x i64> undef, i64 undef, i32 0
64; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i64_0 = insertelement <vscale x 16 x i64> undef, i64 undef, i32 0
65; RV32V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1
66; RV32V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v4i1_1 = insertelement <4 x i1> undef, i1 undef, i32 1
67; RV32V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v8i1_1 = insertelement <8 x i1> undef, i1 undef, i32 1
68; RV32V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v16i1_1 = insertelement <16 x i1> undef, i1 undef, i32 1
69; RV32V-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %v32i1_1 = insertelement <32 x i1> undef, i1 undef, i32 1
70; RV32V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %nxv2i1_1 = insertelement <vscale x 2 x i1> undef, i1 undef, i32 1
71; RV32V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %nxv4i1_1 = insertelement <vscale x 4 x i1> undef, i1 undef, i32 1
72; RV32V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %nxv8i1_1 = insertelement <vscale x 8 x i1> undef, i1 undef, i32 1
73; RV32V-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %nxv16i1_1 = insertelement <vscale x 16 x i1> undef, i1 undef, i32 1
74; RV32V-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %nxv32i1_1 = insertelement <vscale x 32 x i1> undef, i1 undef, i32 1
75; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1
76; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 undef, i32 1
77; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = insertelement <8 x i8> undef, i8 undef, i32 1
78; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1
79; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_1 = insertelement <32 x i8> undef, i8 undef, i32 1
80; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_1 = insertelement <64 x i8> undef, i8 undef, i32 1
81; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_1 = insertelement <128 x i8> undef, i8 undef, i32 1
82; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_1 = insertelement <vscale x 2 x i8> undef, i8 undef, i32 1
83; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_1 = insertelement <vscale x 4 x i8> undef, i8 undef, i32 1
84; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_1 = insertelement <vscale x 8 x i8> undef, i8 undef, i32 1
85; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = insertelement <vscale x 16 x i8> undef, i8 undef, i32 1
86; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = insertelement <vscale x 32 x i8> undef, i8 undef, i32 1
87; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_1 = insertelement <vscale x 64 x i8> undef, i8 undef, i32 1
88; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv128i8_1 = insertelement <vscale x 128 x i8> undef, i8 undef, i32 1
89; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1
90; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 undef, i32 1
91; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = insertelement <8 x i16> undef, i16 undef, i32 1
92; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = insertelement <16 x i16> undef, i16 undef, i32 1
93; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_1 = insertelement <32 x i16> undef, i16 undef, i32 1
94; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i16_1 = insertelement <64 x i16> undef, i16 undef, i32 1
95; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_1 = insertelement <vscale x 2 x i16> undef, i16 undef, i32 1
96; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_1 = insertelement <vscale x 4 x i16> undef, i16 undef, i32 1
97; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = insertelement <vscale x 8 x i16> undef, i16 undef, i32 1
98; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = insertelement <vscale x 16 x i16> undef, i16 undef, i32 1
99; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_1 = insertelement <vscale x 32 x i16> undef, i16 undef, i32 1
100; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_1 = insertelement <vscale x 64 x i16> undef, i16 undef, i32 1
101; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1
102; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 undef, i32 1
103; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = insertelement <8 x i32> undef, i32 undef, i32 1
104; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = insertelement <16 x i32> undef, i32 undef, i32 1
105; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_1 = insertelement <32 x i32> undef, i32 undef, i32 1
106; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_1 = insertelement <vscale x 2 x i32> undef, i32 undef, i32 1
107; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = insertelement <vscale x 4 x i32> undef, i32 undef, i32 1
108; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = insertelement <vscale x 8 x i32> undef, i32 undef, i32 1
109; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = insertelement <vscale x 16 x i32> undef, i32 undef, i32 1
110; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32i32_1 = insertelement <vscale x 32 x i32> undef, i32 undef, i32 1
111; RV32V-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1
112; RV32V-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 undef, i32 1
113; RV32V-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v8i64_1 = insertelement <8 x i64> undef, i64 undef, i32 1
114; RV32V-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v16i64_1 = insertelement <16 x i64> undef, i64 undef, i32 1
115; RV32V-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %nxv2i64_1 = insertelement <vscale x 2 x i64> undef, i64 undef, i32 1
116; RV32V-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %nxv4i64_1 = insertelement <vscale x 4 x i64> undef, i64 undef, i32 1
117; RV32V-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %nxv8i64_1 = insertelement <vscale x 8 x i64> undef, i64 undef, i32 1
118; RV32V-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %nxv16i64_1 = insertelement <vscale x 16 x i64> undef, i64 undef, i32 1
119; RV32V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v2i1_x = insertelement <2 x i1> undef, i1 undef, i32 %x
120; RV32V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v4i1_x = insertelement <4 x i1> undef, i1 undef, i32 %x
121; RV32V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v8i1_x = insertelement <8 x i1> undef, i1 undef, i32 %x
122; RV32V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v16i1_x = insertelement <16 x i1> undef, i1 undef, i32 %x
123; RV32V-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %v32i1_x = insertelement <32 x i1> undef, i1 undef, i32 %x
124; RV32V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %nxv2i1_x = insertelement <vscale x 2 x i1> undef, i1 undef, i32 %x
125; RV32V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %nxv4i1_x = insertelement <vscale x 4 x i1> undef, i1 undef, i32 %x
126; RV32V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %nxv8i1_x = insertelement <vscale x 8 x i1> undef, i1 undef, i32 %x
127; RV32V-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %nxv16i1_x = insertelement <vscale x 16 x i1> undef, i1 undef, i32 %x
128; RV32V-NEXT:  Cost Model: Found an estimated cost of 19 for instruction: %nxv32i1_x = insertelement <vscale x 32 x i1> undef, i1 undef, i32 %x
129; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i8_x = insertelement <2 x i8> undef, i8 undef, i32 %x
130; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i8_x = insertelement <4 x i8> undef, i8 undef, i32 %x
131; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i8_x = insertelement <8 x i8> undef, i8 undef, i32 %x
132; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i8_x = insertelement <16 x i8> undef, i8 undef, i32 %x
133; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i8_x = insertelement <32 x i8> undef, i8 undef, i32 %x
134; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v64i8_x = insertelement <64 x i8> undef, i8 undef, i32 %x
135; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v128i8_x = insertelement <128 x i8> undef, i8 undef, i32 %x
136; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i8_x = insertelement <vscale x 2 x i8> undef, i8 undef, i32 %x
137; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i8_x = insertelement <vscale x 4 x i8> undef, i8 undef, i32 %x
138; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i8_x = insertelement <vscale x 8 x i8> undef, i8 undef, i32 %x
139; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i8_x = insertelement <vscale x 16 x i8> undef, i8 undef, i32 %x
140; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv32i8_x = insertelement <vscale x 32 x i8> undef, i8 undef, i32 %x
141; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv64i8_x = insertelement <vscale x 64 x i8> undef, i8 undef, i32 %x
142; RV32V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv128i8_x = insertelement <vscale x 128 x i8> undef, i8 undef, i32 %x
143; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i16_x = insertelement <2 x i16> undef, i16 undef, i32 %x
144; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i16_x = insertelement <4 x i16> undef, i16 undef, i32 %x
145; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i16_x = insertelement <8 x i16> undef, i16 undef, i32 %x
146; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i16_x = insertelement <16 x i16> undef, i16 undef, i32 %x
147; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i16_x = insertelement <32 x i16> undef, i16 undef, i32 %x
148; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v64i16_x = insertelement <64 x i16> undef, i16 undef, i32 %x
149; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i16_x = insertelement <vscale x 2 x i16> undef, i16 undef, i32 %x
150; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i16_x = insertelement <vscale x 4 x i16> undef, i16 undef, i32 %x
151; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i16_x = insertelement <vscale x 8 x i16> undef, i16 undef, i32 %x
152; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i16_x = insertelement <vscale x 16 x i16> undef, i16 undef, i32 %x
153; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv32i16_x = insertelement <vscale x 32 x i16> undef, i16 undef, i32 %x
154; RV32V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv64i16_x = insertelement <vscale x 64 x i16> undef, i16 undef, i32 %x
155; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i32_x = insertelement <2 x i32> undef, i32 undef, i32 %x
156; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i32_x = insertelement <4 x i32> undef, i32 undef, i32 %x
157; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i32_x = insertelement <8 x i32> undef, i32 undef, i32 %x
158; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i32_x = insertelement <16 x i32> undef, i32 undef, i32 %x
159; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i32_x = insertelement <32 x i32> undef, i32 undef, i32 %x
160; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i32_x = insertelement <vscale x 2 x i32> undef, i32 undef, i32 %x
161; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i32_x = insertelement <vscale x 4 x i32> undef, i32 undef, i32 %x
162; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i32_x = insertelement <vscale x 8 x i32> undef, i32 undef, i32 %x
163; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i32_x = insertelement <vscale x 16 x i32> undef, i32 undef, i32 %x
164; RV32V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv32i32_x = insertelement <vscale x 32 x i32> undef, i32 undef, i32 %x
165; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v2i64_x = insertelement <2 x i64> undef, i64 undef, i32 %x
166; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v4i64_x = insertelement <4 x i64> undef, i64 undef, i32 %x
167; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v8i64_x = insertelement <8 x i64> undef, i64 undef, i32 %x
168; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v16i64_x = insertelement <16 x i64> undef, i64 undef, i32 %x
169; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv2i64_x = insertelement <vscale x 2 x i64> undef, i64 undef, i32 %x
170; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_x = insertelement <vscale x 4 x i64> undef, i64 undef, i32 %x
171; RV32V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_x = insertelement <vscale x 8 x i64> undef, i64 undef, i32 %x
172; RV32V-NEXT:  Cost Model: Found an estimated cost of 35 for instruction: %nxv16i64_x = insertelement <vscale x 16 x i64> undef, i64 undef, i32 %x
173; RV32V-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
174;
175; RV64V-LABEL: 'insertelement_int'
176; RV64V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0
177; RV64V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0
178; RV64V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v8i1_0 = insertelement <8 x i1> undef, i1 undef, i32 0
179; RV64V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v16i1_0 = insertelement <16 x i1> undef, i1 undef, i32 0
180; RV64V-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %v32i1_0 = insertelement <32 x i1> undef, i1 undef, i32 0
181; RV64V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv2i1_0 = insertelement <vscale x 2 x i1> undef, i1 undef, i32 0
182; RV64V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv4i1_0 = insertelement <vscale x 4 x i1> undef, i1 undef, i32 0
183; RV64V-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv8i1_0 = insertelement <vscale x 8 x i1> undef, i1 undef, i32 0
184; RV64V-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %nxv16i1_0 = insertelement <vscale x 16 x i1> undef, i1 undef, i32 0
185; RV64V-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %nxv32i1_0 = insertelement <vscale x 32 x i1> undef, i1 undef, i32 0
186; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0
187; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> undef, i8 undef, i32 0
188; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = insertelement <8 x i8> undef, i8 undef, i32 0
189; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = insertelement <16 x i8> undef, i8 undef, i32 0
190; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = insertelement <32 x i8> undef, i8 undef, i32 0
191; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = insertelement <64 x i8> undef, i8 undef, i32 0
192; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v128i8_0 = insertelement <128 x i8> undef, i8 undef, i32 0
193; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8_0 = insertelement <vscale x 2 x i8> undef, i8 undef, i32 0
194; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8_0 = insertelement <vscale x 4 x i8> undef, i8 undef, i32 0
195; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8_0 = insertelement <vscale x 8 x i8> undef, i8 undef, i32 0
196; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8_0 = insertelement <vscale x 16 x i8> undef, i8 undef, i32 0
197; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_0 = insertelement <vscale x 32 x i8> undef, i8 undef, i32 0
198; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv64i8_0 = insertelement <vscale x 64 x i8> undef, i8 undef, i32 0
199; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_0 = insertelement <vscale x 128 x i8> undef, i8 undef, i32 0
200; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 undef, i32 0
201; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = insertelement <4 x i16> undef, i16 undef, i32 0
202; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = insertelement <8 x i16> undef, i16 undef, i32 0
203; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = insertelement <16 x i16> undef, i16 undef, i32 0
204; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = insertelement <32 x i16> undef, i16 undef, i32 0
205; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i16_0 = insertelement <64 x i16> undef, i16 undef, i32 0
206; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16_0 = insertelement <vscale x 2 x i16> undef, i16 undef, i32 0
207; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16_0 = insertelement <vscale x 4 x i16> undef, i16 undef, i32 0
208; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16_0 = insertelement <vscale x 8 x i16> undef, i16 undef, i32 0
209; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_0 = insertelement <vscale x 16 x i16> undef, i16 undef, i32 0
210; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32i16_0 = insertelement <vscale x 32 x i16> undef, i16 undef, i32 0
211; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_0 = insertelement <vscale x 64 x i16> undef, i16 undef, i32 0
212; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 undef, i32 0
213; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = insertelement <4 x i32> undef, i32 undef, i32 0
214; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = insertelement <8 x i32> undef, i32 undef, i32 0
215; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = insertelement <16 x i32> undef, i32 undef, i32 0
216; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_0 = insertelement <32 x i32> undef, i32 undef, i32 0
217; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32_0 = insertelement <vscale x 2 x i32> undef, i32 undef, i32 0
218; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32_0 = insertelement <vscale x 4 x i32> undef, i32 undef, i32 0
219; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = insertelement <vscale x 8 x i32> undef, i32 undef, i32 0
220; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = insertelement <vscale x 16 x i32> undef, i32 undef, i32 0
221; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_0 = insertelement <vscale x 32 x i32> undef, i32 undef, i32 0
222; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0
223; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = insertelement <4 x i64> undef, i64 undef, i32 0
224; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = insertelement <8 x i64> undef, i64 undef, i32 0
225; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i64_0 = insertelement <16 x i64> undef, i64 undef, i32 0
226; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64_0 = insertelement <vscale x 2 x i64> undef, i64 undef, i32 0
227; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64_0 = insertelement <vscale x 4 x i64> undef, i64 undef, i32 0
228; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64_0 = insertelement <vscale x 8 x i64> undef, i64 undef, i32 0
229; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_0 = insertelement <vscale x 16 x i64> undef, i64 undef, i32 0
230; RV64V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1
231; RV64V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v4i1_1 = insertelement <4 x i1> undef, i1 undef, i32 1
232; RV64V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v8i1_1 = insertelement <8 x i1> undef, i1 undef, i32 1
233; RV64V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v16i1_1 = insertelement <16 x i1> undef, i1 undef, i32 1
234; RV64V-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %v32i1_1 = insertelement <32 x i1> undef, i1 undef, i32 1
235; RV64V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %nxv2i1_1 = insertelement <vscale x 2 x i1> undef, i1 undef, i32 1
236; RV64V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %nxv4i1_1 = insertelement <vscale x 4 x i1> undef, i1 undef, i32 1
237; RV64V-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %nxv8i1_1 = insertelement <vscale x 8 x i1> undef, i1 undef, i32 1
238; RV64V-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %nxv16i1_1 = insertelement <vscale x 16 x i1> undef, i1 undef, i32 1
239; RV64V-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %nxv32i1_1 = insertelement <vscale x 32 x i1> undef, i1 undef, i32 1
240; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1
241; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 undef, i32 1
242; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = insertelement <8 x i8> undef, i8 undef, i32 1
243; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1
244; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_1 = insertelement <32 x i8> undef, i8 undef, i32 1
245; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_1 = insertelement <64 x i8> undef, i8 undef, i32 1
246; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_1 = insertelement <128 x i8> undef, i8 undef, i32 1
247; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_1 = insertelement <vscale x 2 x i8> undef, i8 undef, i32 1
248; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_1 = insertelement <vscale x 4 x i8> undef, i8 undef, i32 1
249; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_1 = insertelement <vscale x 8 x i8> undef, i8 undef, i32 1
250; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = insertelement <vscale x 16 x i8> undef, i8 undef, i32 1
251; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = insertelement <vscale x 32 x i8> undef, i8 undef, i32 1
252; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_1 = insertelement <vscale x 64 x i8> undef, i8 undef, i32 1
253; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv128i8_1 = insertelement <vscale x 128 x i8> undef, i8 undef, i32 1
254; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1
255; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 undef, i32 1
256; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = insertelement <8 x i16> undef, i16 undef, i32 1
257; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = insertelement <16 x i16> undef, i16 undef, i32 1
258; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_1 = insertelement <32 x i16> undef, i16 undef, i32 1
259; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i16_1 = insertelement <64 x i16> undef, i16 undef, i32 1
260; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_1 = insertelement <vscale x 2 x i16> undef, i16 undef, i32 1
261; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_1 = insertelement <vscale x 4 x i16> undef, i16 undef, i32 1
262; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = insertelement <vscale x 8 x i16> undef, i16 undef, i32 1
263; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = insertelement <vscale x 16 x i16> undef, i16 undef, i32 1
264; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_1 = insertelement <vscale x 32 x i16> undef, i16 undef, i32 1
265; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_1 = insertelement <vscale x 64 x i16> undef, i16 undef, i32 1
266; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1
267; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 undef, i32 1
268; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = insertelement <8 x i32> undef, i32 undef, i32 1
269; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = insertelement <16 x i32> undef, i32 undef, i32 1
270; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_1 = insertelement <32 x i32> undef, i32 undef, i32 1
271; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_1 = insertelement <vscale x 2 x i32> undef, i32 undef, i32 1
272; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = insertelement <vscale x 4 x i32> undef, i32 undef, i32 1
273; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = insertelement <vscale x 8 x i32> undef, i32 undef, i32 1
274; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = insertelement <vscale x 16 x i32> undef, i32 undef, i32 1
275; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32i32_1 = insertelement <vscale x 32 x i32> undef, i32 undef, i32 1
276; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1
277; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 undef, i32 1
278; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_1 = insertelement <8 x i64> undef, i64 undef, i32 1
279; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i64_1 = insertelement <16 x i64> undef, i64 undef, i32 1
280; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_1 = insertelement <vscale x 2 x i64> undef, i64 undef, i32 1
281; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_1 = insertelement <vscale x 4 x i64> undef, i64 undef, i32 1
282; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_1 = insertelement <vscale x 8 x i64> undef, i64 undef, i32 1
283; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_1 = insertelement <vscale x 16 x i64> undef, i64 undef, i32 1
284; RV64V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v2i1_x = insertelement <2 x i1> undef, i1 undef, i32 %x
285; RV64V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v4i1_x = insertelement <4 x i1> undef, i1 undef, i32 %x
286; RV64V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v8i1_x = insertelement <8 x i1> undef, i1 undef, i32 %x
287; RV64V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v16i1_x = insertelement <16 x i1> undef, i1 undef, i32 %x
288; RV64V-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %v32i1_x = insertelement <32 x i1> undef, i1 undef, i32 %x
289; RV64V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %nxv2i1_x = insertelement <vscale x 2 x i1> undef, i1 undef, i32 %x
290; RV64V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %nxv4i1_x = insertelement <vscale x 4 x i1> undef, i1 undef, i32 %x
291; RV64V-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %nxv8i1_x = insertelement <vscale x 8 x i1> undef, i1 undef, i32 %x
292; RV64V-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %nxv16i1_x = insertelement <vscale x 16 x i1> undef, i1 undef, i32 %x
293; RV64V-NEXT:  Cost Model: Found an estimated cost of 19 for instruction: %nxv32i1_x = insertelement <vscale x 32 x i1> undef, i1 undef, i32 %x
294; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i8_x = insertelement <2 x i8> undef, i8 undef, i32 %x
295; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i8_x = insertelement <4 x i8> undef, i8 undef, i32 %x
296; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i8_x = insertelement <8 x i8> undef, i8 undef, i32 %x
297; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i8_x = insertelement <16 x i8> undef, i8 undef, i32 %x
298; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i8_x = insertelement <32 x i8> undef, i8 undef, i32 %x
299; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v64i8_x = insertelement <64 x i8> undef, i8 undef, i32 %x
300; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v128i8_x = insertelement <128 x i8> undef, i8 undef, i32 %x
301; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i8_x = insertelement <vscale x 2 x i8> undef, i8 undef, i32 %x
302; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i8_x = insertelement <vscale x 4 x i8> undef, i8 undef, i32 %x
303; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i8_x = insertelement <vscale x 8 x i8> undef, i8 undef, i32 %x
304; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i8_x = insertelement <vscale x 16 x i8> undef, i8 undef, i32 %x
305; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv32i8_x = insertelement <vscale x 32 x i8> undef, i8 undef, i32 %x
306; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv64i8_x = insertelement <vscale x 64 x i8> undef, i8 undef, i32 %x
307; RV64V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv128i8_x = insertelement <vscale x 128 x i8> undef, i8 undef, i32 %x
308; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i16_x = insertelement <2 x i16> undef, i16 undef, i32 %x
309; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i16_x = insertelement <4 x i16> undef, i16 undef, i32 %x
310; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i16_x = insertelement <8 x i16> undef, i16 undef, i32 %x
311; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i16_x = insertelement <16 x i16> undef, i16 undef, i32 %x
312; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i16_x = insertelement <32 x i16> undef, i16 undef, i32 %x
313; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v64i16_x = insertelement <64 x i16> undef, i16 undef, i32 %x
314; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i16_x = insertelement <vscale x 2 x i16> undef, i16 undef, i32 %x
315; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i16_x = insertelement <vscale x 4 x i16> undef, i16 undef, i32 %x
316; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i16_x = insertelement <vscale x 8 x i16> undef, i16 undef, i32 %x
317; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i16_x = insertelement <vscale x 16 x i16> undef, i16 undef, i32 %x
318; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv32i16_x = insertelement <vscale x 32 x i16> undef, i16 undef, i32 %x
319; RV64V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv64i16_x = insertelement <vscale x 64 x i16> undef, i16 undef, i32 %x
320; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i32_x = insertelement <2 x i32> undef, i32 undef, i32 %x
321; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i32_x = insertelement <4 x i32> undef, i32 undef, i32 %x
322; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i32_x = insertelement <8 x i32> undef, i32 undef, i32 %x
323; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i32_x = insertelement <16 x i32> undef, i32 undef, i32 %x
324; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i32_x = insertelement <32 x i32> undef, i32 undef, i32 %x
325; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i32_x = insertelement <vscale x 2 x i32> undef, i32 undef, i32 %x
326; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i32_x = insertelement <vscale x 4 x i32> undef, i32 undef, i32 %x
327; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i32_x = insertelement <vscale x 8 x i32> undef, i32 undef, i32 %x
328; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i32_x = insertelement <vscale x 16 x i32> undef, i32 undef, i32 %x
329; RV64V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv32i32_x = insertelement <vscale x 32 x i32> undef, i32 undef, i32 %x
330; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i64_x = insertelement <2 x i64> undef, i64 undef, i32 %x
331; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i64_x = insertelement <4 x i64> undef, i64 undef, i32 %x
332; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i64_x = insertelement <8 x i64> undef, i64 undef, i32 %x
333; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i64_x = insertelement <16 x i64> undef, i64 undef, i32 %x
334; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i64_x = insertelement <vscale x 2 x i64> undef, i64 undef, i32 %x
335; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i64_x = insertelement <vscale x 4 x i64> undef, i64 undef, i32 %x
336; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i64_x = insertelement <vscale x 8 x i64> undef, i64 undef, i32 %x
337; RV64V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv16i64_x = insertelement <vscale x 16 x i64> undef, i64 undef, i32 %x
338; RV64V-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
339;
340; RV32ZVE64X-LABEL: 'insertelement_int'
341; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0
342; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0
343; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v8i1_0 = insertelement <8 x i1> undef, i1 undef, i32 0
344; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %v16i1_0 = insertelement <16 x i1> undef, i1 undef, i32 0
345; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %v32i1_0 = insertelement <32 x i1> undef, i1 undef, i32 0
346; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv2i1_0 = insertelement <vscale x 2 x i1> undef, i1 undef, i32 0
347; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv4i1_0 = insertelement <vscale x 4 x i1> undef, i1 undef, i32 0
348; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv8i1_0 = insertelement <vscale x 8 x i1> undef, i1 undef, i32 0
349; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %nxv16i1_0 = insertelement <vscale x 16 x i1> undef, i1 undef, i32 0
350; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %nxv32i1_0 = insertelement <vscale x 32 x i1> undef, i1 undef, i32 0
351; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0
352; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> undef, i8 undef, i32 0
353; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = insertelement <8 x i8> undef, i8 undef, i32 0
354; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = insertelement <16 x i8> undef, i8 undef, i32 0
355; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = insertelement <32 x i8> undef, i8 undef, i32 0
356; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = insertelement <64 x i8> undef, i8 undef, i32 0
357; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v128i8_0 = insertelement <128 x i8> undef, i8 undef, i32 0
358; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8_0 = insertelement <vscale x 2 x i8> undef, i8 undef, i32 0
359; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8_0 = insertelement <vscale x 4 x i8> undef, i8 undef, i32 0
360; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8_0 = insertelement <vscale x 8 x i8> undef, i8 undef, i32 0
361; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8_0 = insertelement <vscale x 16 x i8> undef, i8 undef, i32 0
362; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_0 = insertelement <vscale x 32 x i8> undef, i8 undef, i32 0
363; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv64i8_0 = insertelement <vscale x 64 x i8> undef, i8 undef, i32 0
364; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_0 = insertelement <vscale x 128 x i8> undef, i8 undef, i32 0
365; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 undef, i32 0
366; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = insertelement <4 x i16> undef, i16 undef, i32 0
367; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = insertelement <8 x i16> undef, i16 undef, i32 0
368; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = insertelement <16 x i16> undef, i16 undef, i32 0
369; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = insertelement <32 x i16> undef, i16 undef, i32 0
370; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i16_0 = insertelement <64 x i16> undef, i16 undef, i32 0
371; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16_0 = insertelement <vscale x 2 x i16> undef, i16 undef, i32 0
372; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16_0 = insertelement <vscale x 4 x i16> undef, i16 undef, i32 0
373; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16_0 = insertelement <vscale x 8 x i16> undef, i16 undef, i32 0
374; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_0 = insertelement <vscale x 16 x i16> undef, i16 undef, i32 0
375; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32i16_0 = insertelement <vscale x 32 x i16> undef, i16 undef, i32 0
376; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_0 = insertelement <vscale x 64 x i16> undef, i16 undef, i32 0
377; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 undef, i32 0
378; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = insertelement <4 x i32> undef, i32 undef, i32 0
379; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = insertelement <8 x i32> undef, i32 undef, i32 0
380; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = insertelement <16 x i32> undef, i32 undef, i32 0
381; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_0 = insertelement <32 x i32> undef, i32 undef, i32 0
382; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32_0 = insertelement <vscale x 2 x i32> undef, i32 undef, i32 0
383; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32_0 = insertelement <vscale x 4 x i32> undef, i32 undef, i32 0
384; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = insertelement <vscale x 8 x i32> undef, i32 undef, i32 0
385; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = insertelement <vscale x 16 x i32> undef, i32 undef, i32 0
386; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_0 = insertelement <vscale x 32 x i32> undef, i32 undef, i32 0
387; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0
388; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i64_0 = insertelement <4 x i64> undef, i64 undef, i32 0
389; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i64_0 = insertelement <8 x i64> undef, i64 undef, i32 0
390; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i64_0 = insertelement <16 x i64> undef, i64 undef, i32 0
391; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i64_0 = insertelement <vscale x 2 x i64> undef, i64 undef, i32 0
392; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i64_0 = insertelement <vscale x 4 x i64> undef, i64 undef, i32 0
393; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i64_0 = insertelement <vscale x 8 x i64> undef, i64 undef, i32 0
394; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i64_0 = insertelement <vscale x 16 x i64> undef, i64 undef, i32 0
395; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1
396; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v4i1_1 = insertelement <4 x i1> undef, i1 undef, i32 1
397; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v8i1_1 = insertelement <8 x i1> undef, i1 undef, i32 1
398; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %v16i1_1 = insertelement <16 x i1> undef, i1 undef, i32 1
399; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %v32i1_1 = insertelement <32 x i1> undef, i1 undef, i32 1
400; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %nxv2i1_1 = insertelement <vscale x 2 x i1> undef, i1 undef, i32 1
401; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %nxv4i1_1 = insertelement <vscale x 4 x i1> undef, i1 undef, i32 1
402; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %nxv8i1_1 = insertelement <vscale x 8 x i1> undef, i1 undef, i32 1
403; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %nxv16i1_1 = insertelement <vscale x 16 x i1> undef, i1 undef, i32 1
404; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %nxv32i1_1 = insertelement <vscale x 32 x i1> undef, i1 undef, i32 1
405; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1
406; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 undef, i32 1
407; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = insertelement <8 x i8> undef, i8 undef, i32 1
408; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1
409; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_1 = insertelement <32 x i8> undef, i8 undef, i32 1
410; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_1 = insertelement <64 x i8> undef, i8 undef, i32 1
411; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_1 = insertelement <128 x i8> undef, i8 undef, i32 1
412; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_1 = insertelement <vscale x 2 x i8> undef, i8 undef, i32 1
413; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_1 = insertelement <vscale x 4 x i8> undef, i8 undef, i32 1
414; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_1 = insertelement <vscale x 8 x i8> undef, i8 undef, i32 1
415; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = insertelement <vscale x 16 x i8> undef, i8 undef, i32 1
416; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = insertelement <vscale x 32 x i8> undef, i8 undef, i32 1
417; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_1 = insertelement <vscale x 64 x i8> undef, i8 undef, i32 1
418; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv128i8_1 = insertelement <vscale x 128 x i8> undef, i8 undef, i32 1
419; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1
420; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 undef, i32 1
421; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = insertelement <8 x i16> undef, i16 undef, i32 1
422; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = insertelement <16 x i16> undef, i16 undef, i32 1
423; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_1 = insertelement <32 x i16> undef, i16 undef, i32 1
424; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i16_1 = insertelement <64 x i16> undef, i16 undef, i32 1
425; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_1 = insertelement <vscale x 2 x i16> undef, i16 undef, i32 1
426; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_1 = insertelement <vscale x 4 x i16> undef, i16 undef, i32 1
427; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = insertelement <vscale x 8 x i16> undef, i16 undef, i32 1
428; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = insertelement <vscale x 16 x i16> undef, i16 undef, i32 1
429; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_1 = insertelement <vscale x 32 x i16> undef, i16 undef, i32 1
430; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_1 = insertelement <vscale x 64 x i16> undef, i16 undef, i32 1
431; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1
432; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 undef, i32 1
433; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = insertelement <8 x i32> undef, i32 undef, i32 1
434; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = insertelement <16 x i32> undef, i32 undef, i32 1
435; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_1 = insertelement <32 x i32> undef, i32 undef, i32 1
436; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_1 = insertelement <vscale x 2 x i32> undef, i32 undef, i32 1
437; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = insertelement <vscale x 4 x i32> undef, i32 undef, i32 1
438; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = insertelement <vscale x 8 x i32> undef, i32 undef, i32 1
439; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = insertelement <vscale x 16 x i32> undef, i32 undef, i32 1
440; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32i32_1 = insertelement <vscale x 32 x i32> undef, i32 undef, i32 1
441; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1
442; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 undef, i32 1
443; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v8i64_1 = insertelement <8 x i64> undef, i64 undef, i32 1
444; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v16i64_1 = insertelement <16 x i64> undef, i64 undef, i32 1
445; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %nxv2i64_1 = insertelement <vscale x 2 x i64> undef, i64 undef, i32 1
446; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %nxv4i64_1 = insertelement <vscale x 4 x i64> undef, i64 undef, i32 1
447; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %nxv8i64_1 = insertelement <vscale x 8 x i64> undef, i64 undef, i32 1
448; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %nxv16i64_1 = insertelement <vscale x 16 x i64> undef, i64 undef, i32 1
449; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v2i1_x = insertelement <2 x i1> undef, i1 undef, i32 %x
450; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v4i1_x = insertelement <4 x i1> undef, i1 undef, i32 %x
451; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v8i1_x = insertelement <8 x i1> undef, i1 undef, i32 %x
452; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %v16i1_x = insertelement <16 x i1> undef, i1 undef, i32 %x
453; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 19 for instruction: %v32i1_x = insertelement <32 x i1> undef, i1 undef, i32 %x
454; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %nxv2i1_x = insertelement <vscale x 2 x i1> undef, i1 undef, i32 %x
455; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %nxv4i1_x = insertelement <vscale x 4 x i1> undef, i1 undef, i32 %x
456; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %nxv8i1_x = insertelement <vscale x 8 x i1> undef, i1 undef, i32 %x
457; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %nxv16i1_x = insertelement <vscale x 16 x i1> undef, i1 undef, i32 %x
458; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 19 for instruction: %nxv32i1_x = insertelement <vscale x 32 x i1> undef, i1 undef, i32 %x
459; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i8_x = insertelement <2 x i8> undef, i8 undef, i32 %x
460; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i8_x = insertelement <4 x i8> undef, i8 undef, i32 %x
461; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i8_x = insertelement <8 x i8> undef, i8 undef, i32 %x
462; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i8_x = insertelement <16 x i8> undef, i8 undef, i32 %x
463; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i8_x = insertelement <32 x i8> undef, i8 undef, i32 %x
464; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v64i8_x = insertelement <64 x i8> undef, i8 undef, i32 %x
465; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v128i8_x = insertelement <128 x i8> undef, i8 undef, i32 %x
466; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i8_x = insertelement <vscale x 2 x i8> undef, i8 undef, i32 %x
467; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i8_x = insertelement <vscale x 4 x i8> undef, i8 undef, i32 %x
468; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i8_x = insertelement <vscale x 8 x i8> undef, i8 undef, i32 %x
469; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i8_x = insertelement <vscale x 16 x i8> undef, i8 undef, i32 %x
470; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv32i8_x = insertelement <vscale x 32 x i8> undef, i8 undef, i32 %x
471; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv64i8_x = insertelement <vscale x 64 x i8> undef, i8 undef, i32 %x
472; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv128i8_x = insertelement <vscale x 128 x i8> undef, i8 undef, i32 %x
473; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i16_x = insertelement <2 x i16> undef, i16 undef, i32 %x
474; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i16_x = insertelement <4 x i16> undef, i16 undef, i32 %x
475; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i16_x = insertelement <8 x i16> undef, i16 undef, i32 %x
476; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i16_x = insertelement <16 x i16> undef, i16 undef, i32 %x
477; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i16_x = insertelement <32 x i16> undef, i16 undef, i32 %x
478; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v64i16_x = insertelement <64 x i16> undef, i16 undef, i32 %x
479; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i16_x = insertelement <vscale x 2 x i16> undef, i16 undef, i32 %x
480; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i16_x = insertelement <vscale x 4 x i16> undef, i16 undef, i32 %x
481; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i16_x = insertelement <vscale x 8 x i16> undef, i16 undef, i32 %x
482; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i16_x = insertelement <vscale x 16 x i16> undef, i16 undef, i32 %x
483; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv32i16_x = insertelement <vscale x 32 x i16> undef, i16 undef, i32 %x
484; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv64i16_x = insertelement <vscale x 64 x i16> undef, i16 undef, i32 %x
485; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i32_x = insertelement <2 x i32> undef, i32 undef, i32 %x
486; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i32_x = insertelement <4 x i32> undef, i32 undef, i32 %x
487; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i32_x = insertelement <8 x i32> undef, i32 undef, i32 %x
488; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i32_x = insertelement <16 x i32> undef, i32 undef, i32 %x
489; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v32i32_x = insertelement <32 x i32> undef, i32 undef, i32 %x
490; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i32_x = insertelement <vscale x 2 x i32> undef, i32 undef, i32 %x
491; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i32_x = insertelement <vscale x 4 x i32> undef, i32 undef, i32 %x
492; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i32_x = insertelement <vscale x 8 x i32> undef, i32 undef, i32 %x
493; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i32_x = insertelement <vscale x 16 x i32> undef, i32 undef, i32 %x
494; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv32i32_x = insertelement <vscale x 32 x i32> undef, i32 undef, i32 %x
495; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v2i64_x = insertelement <2 x i64> undef, i64 undef, i32 %x
496; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v4i64_x = insertelement <4 x i64> undef, i64 undef, i32 %x
497; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v8i64_x = insertelement <8 x i64> undef, i64 undef, i32 %x
498; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 35 for instruction: %v16i64_x = insertelement <16 x i64> undef, i64 undef, i32 %x
499; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv2i64_x = insertelement <vscale x 2 x i64> undef, i64 undef, i32 %x
500; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_x = insertelement <vscale x 4 x i64> undef, i64 undef, i32 %x
501; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_x = insertelement <vscale x 8 x i64> undef, i64 undef, i32 %x
502; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 35 for instruction: %nxv16i64_x = insertelement <vscale x 16 x i64> undef, i64 undef, i32 %x
503; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
504;
505; RV64ZVE64X-LABEL: 'insertelement_int'
506; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0
507; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0
508; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v8i1_0 = insertelement <8 x i1> undef, i1 undef, i32 0
509; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %v16i1_0 = insertelement <16 x i1> undef, i1 undef, i32 0
510; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %v32i1_0 = insertelement <32 x i1> undef, i1 undef, i32 0
511; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv2i1_0 = insertelement <vscale x 2 x i1> undef, i1 undef, i32 0
512; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv4i1_0 = insertelement <vscale x 4 x i1> undef, i1 undef, i32 0
513; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %nxv8i1_0 = insertelement <vscale x 8 x i1> undef, i1 undef, i32 0
514; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %nxv16i1_0 = insertelement <vscale x 16 x i1> undef, i1 undef, i32 0
515; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %nxv32i1_0 = insertelement <vscale x 32 x i1> undef, i1 undef, i32 0
516; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0
517; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> undef, i8 undef, i32 0
518; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = insertelement <8 x i8> undef, i8 undef, i32 0
519; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = insertelement <16 x i8> undef, i8 undef, i32 0
520; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = insertelement <32 x i8> undef, i8 undef, i32 0
521; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = insertelement <64 x i8> undef, i8 undef, i32 0
522; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v128i8_0 = insertelement <128 x i8> undef, i8 undef, i32 0
523; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8_0 = insertelement <vscale x 2 x i8> undef, i8 undef, i32 0
524; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8_0 = insertelement <vscale x 4 x i8> undef, i8 undef, i32 0
525; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8_0 = insertelement <vscale x 8 x i8> undef, i8 undef, i32 0
526; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8_0 = insertelement <vscale x 16 x i8> undef, i8 undef, i32 0
527; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_0 = insertelement <vscale x 32 x i8> undef, i8 undef, i32 0
528; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv64i8_0 = insertelement <vscale x 64 x i8> undef, i8 undef, i32 0
529; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_0 = insertelement <vscale x 128 x i8> undef, i8 undef, i32 0
530; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 undef, i32 0
531; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = insertelement <4 x i16> undef, i16 undef, i32 0
532; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = insertelement <8 x i16> undef, i16 undef, i32 0
533; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = insertelement <16 x i16> undef, i16 undef, i32 0
534; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = insertelement <32 x i16> undef, i16 undef, i32 0
535; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64i16_0 = insertelement <64 x i16> undef, i16 undef, i32 0
536; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16_0 = insertelement <vscale x 2 x i16> undef, i16 undef, i32 0
537; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16_0 = insertelement <vscale x 4 x i16> undef, i16 undef, i32 0
538; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16_0 = insertelement <vscale x 8 x i16> undef, i16 undef, i32 0
539; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_0 = insertelement <vscale x 16 x i16> undef, i16 undef, i32 0
540; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32i16_0 = insertelement <vscale x 32 x i16> undef, i16 undef, i32 0
541; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_0 = insertelement <vscale x 64 x i16> undef, i16 undef, i32 0
542; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 undef, i32 0
543; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = insertelement <4 x i32> undef, i32 undef, i32 0
544; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = insertelement <8 x i32> undef, i32 undef, i32 0
545; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = insertelement <16 x i32> undef, i32 undef, i32 0
546; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_0 = insertelement <32 x i32> undef, i32 undef, i32 0
547; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32_0 = insertelement <vscale x 2 x i32> undef, i32 undef, i32 0
548; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32_0 = insertelement <vscale x 4 x i32> undef, i32 undef, i32 0
549; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = insertelement <vscale x 8 x i32> undef, i32 undef, i32 0
550; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = insertelement <vscale x 16 x i32> undef, i32 undef, i32 0
551; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_0 = insertelement <vscale x 32 x i32> undef, i32 undef, i32 0
552; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0
553; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = insertelement <4 x i64> undef, i64 undef, i32 0
554; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = insertelement <8 x i64> undef, i64 undef, i32 0
555; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16i64_0 = insertelement <16 x i64> undef, i64 undef, i32 0
556; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64_0 = insertelement <vscale x 2 x i64> undef, i64 undef, i32 0
557; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64_0 = insertelement <vscale x 4 x i64> undef, i64 undef, i32 0
558; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64_0 = insertelement <vscale x 8 x i64> undef, i64 undef, i32 0
559; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_0 = insertelement <vscale x 16 x i64> undef, i64 undef, i32 0
560; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1
561; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v4i1_1 = insertelement <4 x i1> undef, i1 undef, i32 1
562; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %v8i1_1 = insertelement <8 x i1> undef, i1 undef, i32 1
563; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %v16i1_1 = insertelement <16 x i1> undef, i1 undef, i32 1
564; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %v32i1_1 = insertelement <32 x i1> undef, i1 undef, i32 1
565; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %nxv2i1_1 = insertelement <vscale x 2 x i1> undef, i1 undef, i32 1
566; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %nxv4i1_1 = insertelement <vscale x 4 x i1> undef, i1 undef, i32 1
567; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %nxv8i1_1 = insertelement <vscale x 8 x i1> undef, i1 undef, i32 1
568; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %nxv16i1_1 = insertelement <vscale x 16 x i1> undef, i1 undef, i32 1
569; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %nxv32i1_1 = insertelement <vscale x 32 x i1> undef, i1 undef, i32 1
570; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1
571; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 undef, i32 1
572; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = insertelement <8 x i8> undef, i8 undef, i32 1
573; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1
574; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i8_1 = insertelement <32 x i8> undef, i8 undef, i32 1
575; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i8_1 = insertelement <64 x i8> undef, i8 undef, i32 1
576; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_1 = insertelement <128 x i8> undef, i8 undef, i32 1
577; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_1 = insertelement <vscale x 2 x i8> undef, i8 undef, i32 1
578; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_1 = insertelement <vscale x 4 x i8> undef, i8 undef, i32 1
579; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_1 = insertelement <vscale x 8 x i8> undef, i8 undef, i32 1
580; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = insertelement <vscale x 16 x i8> undef, i8 undef, i32 1
581; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = insertelement <vscale x 32 x i8> undef, i8 undef, i32 1
582; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_1 = insertelement <vscale x 64 x i8> undef, i8 undef, i32 1
583; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv128i8_1 = insertelement <vscale x 128 x i8> undef, i8 undef, i32 1
584; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1
585; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 undef, i32 1
586; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = insertelement <8 x i16> undef, i16 undef, i32 1
587; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = insertelement <16 x i16> undef, i16 undef, i32 1
588; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i16_1 = insertelement <32 x i16> undef, i16 undef, i32 1
589; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i16_1 = insertelement <64 x i16> undef, i16 undef, i32 1
590; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_1 = insertelement <vscale x 2 x i16> undef, i16 undef, i32 1
591; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_1 = insertelement <vscale x 4 x i16> undef, i16 undef, i32 1
592; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = insertelement <vscale x 8 x i16> undef, i16 undef, i32 1
593; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = insertelement <vscale x 16 x i16> undef, i16 undef, i32 1
594; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_1 = insertelement <vscale x 32 x i16> undef, i16 undef, i32 1
595; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_1 = insertelement <vscale x 64 x i16> undef, i16 undef, i32 1
596; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1
597; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 undef, i32 1
598; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = insertelement <8 x i32> undef, i32 undef, i32 1
599; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = insertelement <16 x i32> undef, i32 undef, i32 1
600; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_1 = insertelement <32 x i32> undef, i32 undef, i32 1
601; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_1 = insertelement <vscale x 2 x i32> undef, i32 undef, i32 1
602; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = insertelement <vscale x 4 x i32> undef, i32 undef, i32 1
603; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = insertelement <vscale x 8 x i32> undef, i32 undef, i32 1
604; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = insertelement <vscale x 16 x i32> undef, i32 undef, i32 1
605; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32i32_1 = insertelement <vscale x 32 x i32> undef, i32 undef, i32 1
606; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1
607; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 undef, i32 1
608; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8i64_1 = insertelement <8 x i64> undef, i64 undef, i32 1
609; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16i64_1 = insertelement <16 x i64> undef, i64 undef, i32 1
610; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_1 = insertelement <vscale x 2 x i64> undef, i64 undef, i32 1
611; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_1 = insertelement <vscale x 4 x i64> undef, i64 undef, i32 1
612; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_1 = insertelement <vscale x 8 x i64> undef, i64 undef, i32 1
613; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_1 = insertelement <vscale x 16 x i64> undef, i64 undef, i32 1
614; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v2i1_x = insertelement <2 x i1> undef, i1 undef, i32 %x
615; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v4i1_x = insertelement <4 x i1> undef, i1 undef, i32 %x
616; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %v8i1_x = insertelement <8 x i1> undef, i1 undef, i32 %x
617; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %v16i1_x = insertelement <16 x i1> undef, i1 undef, i32 %x
618; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 19 for instruction: %v32i1_x = insertelement <32 x i1> undef, i1 undef, i32 %x
619; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %nxv2i1_x = insertelement <vscale x 2 x i1> undef, i1 undef, i32 %x
620; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %nxv4i1_x = insertelement <vscale x 4 x i1> undef, i1 undef, i32 %x
621; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %nxv8i1_x = insertelement <vscale x 8 x i1> undef, i1 undef, i32 %x
622; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %nxv16i1_x = insertelement <vscale x 16 x i1> undef, i1 undef, i32 %x
623; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 19 for instruction: %nxv32i1_x = insertelement <vscale x 32 x i1> undef, i1 undef, i32 %x
624; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i8_x = insertelement <2 x i8> undef, i8 undef, i32 %x
625; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i8_x = insertelement <4 x i8> undef, i8 undef, i32 %x
626; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i8_x = insertelement <8 x i8> undef, i8 undef, i32 %x
627; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i8_x = insertelement <16 x i8> undef, i8 undef, i32 %x
628; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i8_x = insertelement <32 x i8> undef, i8 undef, i32 %x
629; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v64i8_x = insertelement <64 x i8> undef, i8 undef, i32 %x
630; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v128i8_x = insertelement <128 x i8> undef, i8 undef, i32 %x
631; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i8_x = insertelement <vscale x 2 x i8> undef, i8 undef, i32 %x
632; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i8_x = insertelement <vscale x 4 x i8> undef, i8 undef, i32 %x
633; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i8_x = insertelement <vscale x 8 x i8> undef, i8 undef, i32 %x
634; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i8_x = insertelement <vscale x 16 x i8> undef, i8 undef, i32 %x
635; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv32i8_x = insertelement <vscale x 32 x i8> undef, i8 undef, i32 %x
636; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv64i8_x = insertelement <vscale x 64 x i8> undef, i8 undef, i32 %x
637; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv128i8_x = insertelement <vscale x 128 x i8> undef, i8 undef, i32 %x
638; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i16_x = insertelement <2 x i16> undef, i16 undef, i32 %x
639; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i16_x = insertelement <4 x i16> undef, i16 undef, i32 %x
640; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i16_x = insertelement <8 x i16> undef, i16 undef, i32 %x
641; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i16_x = insertelement <16 x i16> undef, i16 undef, i32 %x
642; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i16_x = insertelement <32 x i16> undef, i16 undef, i32 %x
643; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v64i16_x = insertelement <64 x i16> undef, i16 undef, i32 %x
644; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i16_x = insertelement <vscale x 2 x i16> undef, i16 undef, i32 %x
645; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i16_x = insertelement <vscale x 4 x i16> undef, i16 undef, i32 %x
646; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i16_x = insertelement <vscale x 8 x i16> undef, i16 undef, i32 %x
647; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i16_x = insertelement <vscale x 16 x i16> undef, i16 undef, i32 %x
648; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv32i16_x = insertelement <vscale x 32 x i16> undef, i16 undef, i32 %x
649; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv64i16_x = insertelement <vscale x 64 x i16> undef, i16 undef, i32 %x
650; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i32_x = insertelement <2 x i32> undef, i32 undef, i32 %x
651; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i32_x = insertelement <4 x i32> undef, i32 undef, i32 %x
652; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i32_x = insertelement <8 x i32> undef, i32 undef, i32 %x
653; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16i32_x = insertelement <16 x i32> undef, i32 undef, i32 %x
654; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v32i32_x = insertelement <32 x i32> undef, i32 undef, i32 %x
655; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i32_x = insertelement <vscale x 2 x i32> undef, i32 undef, i32 %x
656; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i32_x = insertelement <vscale x 4 x i32> undef, i32 undef, i32 %x
657; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i32_x = insertelement <vscale x 8 x i32> undef, i32 undef, i32 %x
658; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16i32_x = insertelement <vscale x 16 x i32> undef, i32 undef, i32 %x
659; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv32i32_x = insertelement <vscale x 32 x i32> undef, i32 undef, i32 %x
660; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2i64_x = insertelement <2 x i64> undef, i64 undef, i32 %x
661; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4i64_x = insertelement <4 x i64> undef, i64 undef, i32 %x
662; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8i64_x = insertelement <8 x i64> undef, i64 undef, i32 %x
663; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v16i64_x = insertelement <16 x i64> undef, i64 undef, i32 %x
664; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2i64_x = insertelement <vscale x 2 x i64> undef, i64 undef, i32 %x
665; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4i64_x = insertelement <vscale x 4 x i64> undef, i64 undef, i32 %x
666; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8i64_x = insertelement <vscale x 8 x i64> undef, i64 undef, i32 %x
667; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv16i64_x = insertelement <vscale x 16 x i64> undef, i64 undef, i32 %x
668; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
669;
670  %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0
671  %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0
672  %v8i1_0 = insertelement <8 x i1> undef, i1 undef, i32 0
673  %v16i1_0 = insertelement <16 x i1> undef, i1 undef, i32 0
674  %v32i1_0 = insertelement <32 x i1> undef, i1 undef, i32 0
675
676  %nxv2i1_0 = insertelement <vscale x 2 x i1> undef, i1 undef, i32 0
677  %nxv4i1_0 = insertelement <vscale x 4 x i1> undef, i1 undef, i32 0
678  %nxv8i1_0 = insertelement <vscale x 8 x i1> undef, i1 undef, i32 0
679  %nxv16i1_0 = insertelement <vscale x 16 x i1> undef, i1 undef, i32 0
680  %nxv32i1_0 = insertelement <vscale x 32 x i1> undef, i1 undef, i32 0
681
682  %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0
683  %v4i8_0 = insertelement <4 x i8> undef, i8 undef, i32 0
684  %v8i8_0 = insertelement <8 x i8> undef, i8 undef, i32 0
685  %v16i8_0 = insertelement <16 x i8> undef, i8 undef, i32 0
686  %v32i8_0 = insertelement <32 x i8> undef, i8 undef, i32 0
687  %v64i8_0 = insertelement <64 x i8> undef, i8 undef, i32 0
688  %v128i8_0 = insertelement <128 x i8> undef, i8 undef, i32 0
689
690  %nxv2i8_0 = insertelement <vscale x 2 x i8> undef, i8 undef, i32 0
691  %nxv4i8_0 = insertelement <vscale x 4 x i8> undef, i8 undef, i32 0
692  %nxv8i8_0 = insertelement <vscale x 8 x i8> undef, i8 undef, i32 0
693  %nxv16i8_0 = insertelement <vscale x 16 x i8> undef, i8 undef, i32 0
694  %nxv32i8_0 = insertelement <vscale x 32 x i8> undef, i8 undef, i32 0
695  %nxv64i8_0 = insertelement <vscale x 64 x i8> undef, i8 undef, i32 0
696  %nxv128i8_0 = insertelement <vscale x 128 x i8> undef, i8 undef, i32 0
697
698  %v2i16_0 = insertelement <2 x i16> undef, i16 undef, i32 0
699  %v4i16_0 = insertelement <4 x i16> undef, i16 undef, i32 0
700  %v8i16_0 = insertelement <8 x i16> undef, i16 undef, i32 0
701  %v16i16_0 = insertelement <16 x i16> undef, i16 undef, i32 0
702  %v32i16_0 = insertelement <32 x i16> undef, i16 undef, i32 0
703  %v64i16_0 = insertelement <64 x i16> undef, i16 undef, i32 0
704
705  %nxv2i16_0 = insertelement <vscale x 2 x i16> undef, i16 undef, i32 0
706  %nxv4i16_0 = insertelement <vscale x 4 x i16> undef, i16 undef, i32 0
707  %nxv8i16_0 = insertelement <vscale x 8 x i16> undef, i16 undef, i32 0
708  %nxv16i16_0 = insertelement <vscale x 16 x i16> undef, i16 undef, i32 0
709  %nxv32i16_0 = insertelement <vscale x 32 x i16> undef, i16 undef, i32 0
710  %nxv64i16_0 = insertelement <vscale x 64 x i16> undef, i16 undef, i32 0
711
712  %v2i32_0 = insertelement <2 x i32> undef, i32 undef, i32 0
713  %v4i32_0 = insertelement <4 x i32> undef, i32 undef, i32 0
714  %v8i32_0 = insertelement <8 x i32> undef, i32 undef, i32 0
715  %v16i32_0 = insertelement <16 x i32> undef, i32 undef, i32 0
716  %v32i32_0 = insertelement <32 x i32> undef, i32 undef, i32 0
717
718  %nxv2i32_0 = insertelement <vscale x 2 x i32> undef, i32 undef, i32 0
719  %nxv4i32_0 = insertelement <vscale x 4 x i32> undef, i32 undef, i32 0
720  %nxv8i32_0 = insertelement <vscale x 8 x i32> undef, i32 undef, i32 0
721  %nxv16i32_0 = insertelement <vscale x 16 x i32> undef, i32 undef, i32 0
722  %nxv32i32_0 = insertelement <vscale x 32 x i32> undef, i32 undef, i32 0
723
724  %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0
725  %v4i64_0 = insertelement <4 x i64> undef, i64 undef, i32 0
726  %v8i64_0 = insertelement <8 x i64> undef, i64 undef, i32 0
727  %v16i64_0 = insertelement <16 x i64> undef, i64 undef, i32 0
728
729  %nxv2i64_0 = insertelement <vscale x 2 x i64> undef, i64 undef, i32 0
730  %nxv4i64_0 = insertelement <vscale x 4 x i64> undef, i64 undef, i32 0
731  %nxv8i64_0 = insertelement <vscale x 8 x i64> undef, i64 undef, i32 0
732  %nxv16i64_0 = insertelement <vscale x 16 x i64> undef, i64 undef, i32 0
733
734  %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1
735  %v4i1_1 = insertelement <4 x i1> undef, i1 undef, i32 1
736  %v8i1_1 = insertelement <8 x i1> undef, i1 undef, i32 1
737  %v16i1_1 = insertelement <16 x i1> undef, i1 undef, i32 1
738  %v32i1_1 = insertelement <32 x i1> undef, i1 undef, i32 1
739
740  %nxv2i1_1 = insertelement <vscale x 2 x i1> undef, i1 undef, i32 1
741  %nxv4i1_1 = insertelement <vscale x 4 x i1> undef, i1 undef, i32 1
742  %nxv8i1_1 = insertelement <vscale x 8 x i1> undef, i1 undef, i32 1
743  %nxv16i1_1 = insertelement <vscale x 16 x i1> undef, i1 undef, i32 1
744  %nxv32i1_1 = insertelement <vscale x 32 x i1> undef, i1 undef, i32 1
745
746  %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1
747  %v4i8_1 = insertelement <4 x i8> undef, i8 undef, i32 1
748  %v8i8_1 = insertelement <8 x i8> undef, i8 undef, i32 1
749  %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1
750  %v32i8_1 = insertelement <32 x i8> undef, i8 undef, i32 1
751  %v64i8_1 = insertelement <64 x i8> undef, i8 undef, i32 1
752  %v128i8_1 = insertelement <128 x i8> undef, i8 undef, i32 1
753
754  %nxv2i8_1 = insertelement <vscale x 2 x i8> undef, i8 undef, i32 1
755  %nxv4i8_1 = insertelement <vscale x 4 x i8> undef, i8 undef, i32 1
756  %nxv8i8_1 = insertelement <vscale x 8 x i8> undef, i8 undef, i32 1
757  %nxv16i8_1 = insertelement <vscale x 16 x i8> undef, i8 undef, i32 1
758  %nxv32i8_1 = insertelement <vscale x 32 x i8> undef, i8 undef, i32 1
759  %nxv64i8_1 = insertelement <vscale x 64 x i8> undef, i8 undef, i32 1
760  %nxv128i8_1 = insertelement <vscale x 128 x i8> undef, i8 undef, i32 1
761
762  %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1
763  %v4i16_1 = insertelement <4 x i16> undef, i16 undef, i32 1
764  %v8i16_1 = insertelement <8 x i16> undef, i16 undef, i32 1
765  %v16i16_1 = insertelement <16 x i16> undef, i16 undef, i32 1
766  %v32i16_1 = insertelement <32 x i16> undef, i16 undef, i32 1
767  %v64i16_1 = insertelement <64 x i16> undef, i16 undef, i32 1
768
769  %nxv2i16_1 = insertelement <vscale x 2 x i16> undef, i16 undef, i32 1
770  %nxv4i16_1 = insertelement <vscale x 4 x i16> undef, i16 undef, i32 1
771  %nxv8i16_1 = insertelement <vscale x 8 x i16> undef, i16 undef, i32 1
772  %nxv16i16_1 = insertelement <vscale x 16 x i16> undef, i16 undef, i32 1
773  %nxv32i16_1 = insertelement <vscale x 32 x i16> undef, i16 undef, i32 1
774  %nxv64i16_1 = insertelement <vscale x 64 x i16> undef, i16 undef, i32 1
775
776  %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1
777  %v4i32_1 = insertelement <4 x i32> undef, i32 undef, i32 1
778  %v8i32_1 = insertelement <8 x i32> undef, i32 undef, i32 1
779  %v16i32_1 = insertelement <16 x i32> undef, i32 undef, i32 1
780  %v32i32_1 = insertelement <32 x i32> undef, i32 undef, i32 1
781
782  %nxv2i32_1 = insertelement <vscale x 2 x i32> undef, i32 undef, i32 1
783  %nxv4i32_1 = insertelement <vscale x 4 x i32> undef, i32 undef, i32 1
784  %nxv8i32_1 = insertelement <vscale x 8 x i32> undef, i32 undef, i32 1
785  %nxv16i32_1 = insertelement <vscale x 16 x i32> undef, i32 undef, i32 1
786  %nxv32i32_1 = insertelement <vscale x 32 x i32> undef, i32 undef, i32 1
787
788  %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1
789  %v4i64_1 = insertelement <4 x i64> undef, i64 undef, i32 1
790  %v8i64_1 = insertelement <8 x i64> undef, i64 undef, i32 1
791  %v16i64_1 = insertelement <16 x i64> undef, i64 undef, i32 1
792
793  %nxv2i64_1 = insertelement <vscale x 2 x i64> undef, i64 undef, i32 1
794  %nxv4i64_1 = insertelement <vscale x 4 x i64> undef, i64 undef, i32 1
795  %nxv8i64_1 = insertelement <vscale x 8 x i64> undef, i64 undef, i32 1
796  %nxv16i64_1 = insertelement <vscale x 16 x i64> undef, i64 undef, i32 1
797
798  %v2i1_x = insertelement <2 x i1> undef, i1 undef, i32 %x
799  %v4i1_x = insertelement <4 x i1> undef, i1 undef, i32 %x
800  %v8i1_x = insertelement <8 x i1> undef, i1 undef, i32 %x
801  %v16i1_x = insertelement <16 x i1> undef, i1 undef, i32 %x
802  %v32i1_x = insertelement <32 x i1> undef, i1 undef, i32 %x
803
804  %nxv2i1_x = insertelement <vscale x 2 x i1> undef, i1 undef, i32 %x
805  %nxv4i1_x = insertelement <vscale x 4 x i1> undef, i1 undef, i32 %x
806  %nxv8i1_x = insertelement <vscale x 8 x i1> undef, i1 undef, i32 %x
807  %nxv16i1_x = insertelement <vscale x 16 x i1> undef, i1 undef, i32 %x
808  %nxv32i1_x = insertelement <vscale x 32 x i1> undef, i1 undef, i32 %x
809
810  %v2i8_x = insertelement <2 x i8> undef, i8 undef, i32 %x
811  %v4i8_x = insertelement <4 x i8> undef, i8 undef, i32 %x
812  %v8i8_x = insertelement <8 x i8> undef, i8 undef, i32 %x
813  %v16i8_x = insertelement <16 x i8> undef, i8 undef, i32 %x
814  %v32i8_x = insertelement <32 x i8> undef, i8 undef, i32 %x
815  %v64i8_x = insertelement <64 x i8> undef, i8 undef, i32 %x
816  %v128i8_x = insertelement <128 x i8> undef, i8 undef, i32 %x
817
818  %nxv2i8_x = insertelement <vscale x 2 x i8> undef, i8 undef, i32 %x
819  %nxv4i8_x = insertelement <vscale x 4 x i8> undef, i8 undef, i32 %x
820  %nxv8i8_x = insertelement <vscale x 8 x i8> undef, i8 undef, i32 %x
821  %nxv16i8_x = insertelement <vscale x 16 x i8> undef, i8 undef, i32 %x
822  %nxv32i8_x = insertelement <vscale x 32 x i8> undef, i8 undef, i32 %x
823  %nxv64i8_x = insertelement <vscale x 64 x i8> undef, i8 undef, i32 %x
824  %nxv128i8_x = insertelement <vscale x 128 x i8> undef, i8 undef, i32 %x
825
826  %v2i16_x = insertelement <2 x i16> undef, i16 undef, i32 %x
827  %v4i16_x = insertelement <4 x i16> undef, i16 undef, i32 %x
828  %v8i16_x = insertelement <8 x i16> undef, i16 undef, i32 %x
829  %v16i16_x = insertelement <16 x i16> undef, i16 undef, i32 %x
830  %v32i16_x = insertelement <32 x i16> undef, i16 undef, i32 %x
831  %v64i16_x = insertelement <64 x i16> undef, i16 undef, i32 %x
832
833  %nxv2i16_x = insertelement <vscale x 2 x i16> undef, i16 undef, i32 %x
834  %nxv4i16_x = insertelement <vscale x 4 x i16> undef, i16 undef, i32 %x
835  %nxv8i16_x = insertelement <vscale x 8 x i16> undef, i16 undef, i32 %x
836  %nxv16i16_x = insertelement <vscale x 16 x i16> undef, i16 undef, i32 %x
837  %nxv32i16_x = insertelement <vscale x 32 x i16> undef, i16 undef, i32 %x
838  %nxv64i16_x = insertelement <vscale x 64 x i16> undef, i16 undef, i32 %x
839
840  %v2i32_x = insertelement <2 x i32> undef, i32 undef, i32 %x
841  %v4i32_x = insertelement <4 x i32> undef, i32 undef, i32 %x
842  %v8i32_x = insertelement <8 x i32> undef, i32 undef, i32 %x
843  %v16i32_x = insertelement <16 x i32> undef, i32 undef, i32 %x
844  %v32i32_x = insertelement <32 x i32> undef, i32 undef, i32 %x
845
846  %nxv2i32_x = insertelement <vscale x 2 x i32> undef, i32 undef, i32 %x
847  %nxv4i32_x = insertelement <vscale x 4 x i32> undef, i32 undef, i32 %x
848  %nxv8i32_x = insertelement <vscale x 8 x i32> undef, i32 undef, i32 %x
849  %nxv16i32_x = insertelement <vscale x 16 x i32> undef, i32 undef, i32 %x
850  %nxv32i32_x = insertelement <vscale x 32 x i32> undef, i32 undef, i32 %x
851
852  %v2i64_x = insertelement <2 x i64> undef, i64 undef, i32 %x
853  %v4i64_x = insertelement <4 x i64> undef, i64 undef, i32 %x
854  %v8i64_x = insertelement <8 x i64> undef, i64 undef, i32 %x
855  %v16i64_x = insertelement <16 x i64> undef, i64 undef, i32 %x
856
857  %nxv2i64_x = insertelement <vscale x 2 x i64> undef, i64 undef, i32 %x
858  %nxv4i64_x = insertelement <vscale x 4 x i64> undef, i64 undef, i32 %x
859  %nxv8i64_x = insertelement <vscale x 8 x i64> undef, i64 undef, i32 %x
860  %nxv16i64_x = insertelement <vscale x 16 x i64> undef, i64 undef, i32 %x
861
862  ret void
863}
864
865; Cover high lmul extracts and types which require splitting
866define void @insertelement_int_lmul(i32 %x) {
867; RV32V-LABEL: 'insertelement_int_lmul'
868; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31
869; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_63 = insertelement <128 x i8> undef, i8 undef, i32 63
870; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_127 = insertelement <128 x i8> undef, i8 undef, i32 127
871; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v256i8_127 = insertelement <256 x i8> undef, i8 undef, i32 127
872; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v256i8_255 = insertelement <256 x i8> undef, i8 undef, i32 255
873; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_3 = insertelement <32 x i32> undef, i32 undef, i32 3
874; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_7 = insertelement <32 x i32> undef, i32 undef, i32 7
875; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_15 = insertelement <32 x i32> undef, i32 undef, i32 15
876; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_31 = insertelement <32 x i32> undef, i32 undef, i32 31
877; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i32_63 = insertelement <64 x i32> undef, i32 undef, i32 63
878; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v128i8 = insertelement <128 x i8> undef, i8 undef, i32 %x
879; RV32V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x
880; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x
881; RV32V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x
882; RV32V-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
883;
884; RV64V-LABEL: 'insertelement_int_lmul'
885; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31
886; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_63 = insertelement <128 x i8> undef, i8 undef, i32 63
887; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_127 = insertelement <128 x i8> undef, i8 undef, i32 127
888; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v256i8_127 = insertelement <256 x i8> undef, i8 undef, i32 127
889; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v256i8_255 = insertelement <256 x i8> undef, i8 undef, i32 255
890; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_3 = insertelement <32 x i32> undef, i32 undef, i32 3
891; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_7 = insertelement <32 x i32> undef, i32 undef, i32 7
892; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_15 = insertelement <32 x i32> undef, i32 undef, i32 15
893; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_31 = insertelement <32 x i32> undef, i32 undef, i32 31
894; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i32_63 = insertelement <64 x i32> undef, i32 undef, i32 63
895; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v128i8 = insertelement <128 x i8> undef, i8 undef, i32 %x
896; RV64V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x
897; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x
898; RV64V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x
899; RV64V-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
900;
901; RV32ZVE64X-LABEL: 'insertelement_int_lmul'
902; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31
903; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_63 = insertelement <128 x i8> undef, i8 undef, i32 63
904; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_127 = insertelement <128 x i8> undef, i8 undef, i32 127
905; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v256i8_127 = insertelement <256 x i8> undef, i8 undef, i32 127
906; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v256i8_255 = insertelement <256 x i8> undef, i8 undef, i32 255
907; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_3 = insertelement <32 x i32> undef, i32 undef, i32 3
908; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_7 = insertelement <32 x i32> undef, i32 undef, i32 7
909; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_15 = insertelement <32 x i32> undef, i32 undef, i32 15
910; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_31 = insertelement <32 x i32> undef, i32 undef, i32 31
911; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i32_63 = insertelement <64 x i32> undef, i32 undef, i32 63
912; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v128i8 = insertelement <128 x i8> undef, i8 undef, i32 %x
913; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 66 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x
914; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x
915; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 66 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x
916; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
917;
918; RV64ZVE64X-LABEL: 'insertelement_int_lmul'
919; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31
920; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_63 = insertelement <128 x i8> undef, i8 undef, i32 63
921; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v128i8_127 = insertelement <128 x i8> undef, i8 undef, i32 127
922; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v256i8_127 = insertelement <256 x i8> undef, i8 undef, i32 127
923; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v256i8_255 = insertelement <256 x i8> undef, i8 undef, i32 255
924; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_3 = insertelement <32 x i32> undef, i32 undef, i32 3
925; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_7 = insertelement <32 x i32> undef, i32 undef, i32 7
926; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_15 = insertelement <32 x i32> undef, i32 undef, i32 15
927; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_31 = insertelement <32 x i32> undef, i32 undef, i32 31
928; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64i32_63 = insertelement <64 x i32> undef, i32 undef, i32 63
929; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v128i8 = insertelement <128 x i8> undef, i8 undef, i32 %x
930; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 66 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x
931; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x
932; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 66 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x
933; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
934;
935  %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31
936  %v128i8_63 = insertelement <128 x i8> undef, i8 undef, i32 63
937  %v128i8_127 = insertelement <128 x i8> undef, i8 undef, i32 127
938  %v256i8_127 = insertelement <256 x i8> undef, i8 undef, i32 127
939  %v256i8_255 = insertelement <256 x i8> undef, i8 undef, i32 255
940
941  %v32i32_3 = insertelement <32 x i32> undef, i32 undef, i32 3
942  %v32i32_7 = insertelement <32 x i32> undef, i32 undef, i32 7
943  %v32i32_15 = insertelement <32 x i32> undef, i32 undef, i32 15
944  %v32i32_31 = insertelement <32 x i32> undef, i32 undef, i32 31
945  %v64i32_63 = insertelement <64 x i32> undef, i32 undef, i32 63
946
947
948  %v128i8 = insertelement <128 x i8> undef, i8 undef, i32 %x
949  %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x
950
951  %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x
952  %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x
953
954  ret void
955}
956
957define void @insertelement_fp(i32 %x) {
958; RV32V-LABEL: 'insertelement_fp'
959; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0
960; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4f16_0 = insertelement <4 x half> undef, half undef, i32 0
961; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f16_0 = insertelement <8 x half> undef, half undef, i32 0
962; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16f16_0 = insertelement <16 x half> undef, half undef, i32 0
963; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32f16_0 = insertelement <32 x half> undef, half undef, i32 0
964; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64f16_0 = insertelement <64 x half> undef, half undef, i32 0
965; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16_0 = insertelement <vscale x 2 x half> undef, half undef, i32 0
966; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16_0 = insertelement <vscale x 4 x half> undef, half undef, i32 0
967; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16_0 = insertelement <vscale x 8 x half> undef, half undef, i32 0
968; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16_0 = insertelement <vscale x 16 x half> undef, half undef, i32 0
969; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32f16_0 = insertelement <vscale x 32 x half> undef, half undef, i32 0
970; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_0 = insertelement <vscale x 64 x half> undef, half undef, i32 0
971; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2f32_0 = insertelement <2 x float> undef, float undef, i32 0
972; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4f32_0 = insertelement <4 x float> undef, float undef, i32 0
973; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f32_0 = insertelement <8 x float> undef, float undef, i32 0
974; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16f32_0 = insertelement <16 x float> undef, float undef, i32 0
975; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32f32_0 = insertelement <32 x float> undef, float undef, i32 0
976; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32_0 = insertelement <vscale x 2 x float> undef, float undef, i32 0
977; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32_0 = insertelement <vscale x 4 x float> undef, float undef, i32 0
978; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32_0 = insertelement <vscale x 8 x float> undef, float undef, i32 0
979; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32_0 = insertelement <vscale x 16 x float> undef, float undef, i32 0
980; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_0 = insertelement <vscale x 32 x float> undef, float undef, i32 0
981; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2f64_0 = insertelement <2 x double> undef, double undef, i32 0
982; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4f64_0 = insertelement <4 x double> undef, double undef, i32 0
983; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f64_0 = insertelement <8 x double> undef, double undef, i32 0
984; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16f64_0 = insertelement <16 x double> undef, double undef, i32 0
985; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64_0 = insertelement <vscale x 2 x double> undef, double undef, i32 0
986; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64_0 = insertelement <vscale x 4 x double> undef, double undef, i32 0
987; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64_0 = insertelement <vscale x 8 x double> undef, double undef, i32 0
988; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_0 = insertelement <vscale x 16 x double> undef, double undef, i32 0
989; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2f16_1 = insertelement <2 x half> undef, half undef, i32 1
990; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4f16_1 = insertelement <4 x half> undef, half undef, i32 1
991; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f16_1 = insertelement <8 x half> undef, half undef, i32 1
992; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16f16_1 = insertelement <16 x half> undef, half undef, i32 1
993; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32f16_1 = insertelement <32 x half> undef, half undef, i32 1
994; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64f16_1 = insertelement <64 x half> undef, half undef, i32 1
995; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2f16_1 = insertelement <vscale x 2 x half> undef, half undef, i32 1
996; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4f16_1 = insertelement <vscale x 4 x half> undef, half undef, i32 1
997; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8f16_1 = insertelement <vscale x 8 x half> undef, half undef, i32 1
998; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16f16_1 = insertelement <vscale x 16 x half> undef, half undef, i32 1
999; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32f16_1 = insertelement <vscale x 32 x half> undef, half undef, i32 1
1000; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv64f16_1 = insertelement <vscale x 64 x half> undef, half undef, i32 1
1001; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2f32_1 = insertelement <2 x float> undef, float undef, i32 1
1002; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4f32_1 = insertelement <4 x float> undef, float undef, i32 1
1003; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f32_1 = insertelement <8 x float> undef, float undef, i32 1
1004; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16f32_1 = insertelement <16 x float> undef, float undef, i32 1
1005; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32f32_1 = insertelement <32 x float> undef, float undef, i32 1
1006; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2f32_1 = insertelement <vscale x 2 x float> undef, float undef, i32 1
1007; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4f32_1 = insertelement <vscale x 4 x float> undef, float undef, i32 1
1008; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8f32_1 = insertelement <vscale x 8 x float> undef, float undef, i32 1
1009; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16f32_1 = insertelement <vscale x 16 x float> undef, float undef, i32 1
1010; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32f32_1 = insertelement <vscale x 32 x float> undef, float undef, i32 1
1011; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2f64_1 = insertelement <2 x double> undef, double undef, i32 1
1012; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4f64_1 = insertelement <4 x double> undef, double undef, i32 1
1013; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f64_1 = insertelement <8 x double> undef, double undef, i32 1
1014; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16f64_1 = insertelement <16 x double> undef, double undef, i32 1
1015; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2f64_1 = insertelement <vscale x 2 x double> undef, double undef, i32 1
1016; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4f64_1 = insertelement <vscale x 4 x double> undef, double undef, i32 1
1017; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8f64_1 = insertelement <vscale x 8 x double> undef, double undef, i32 1
1018; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16f64_1 = insertelement <vscale x 16 x double> undef, double undef, i32 1
1019; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2f16_x = insertelement <2 x half> undef, half undef, i32 %x
1020; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4f16_x = insertelement <4 x half> undef, half undef, i32 %x
1021; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8f16_x = insertelement <8 x half> undef, half undef, i32 %x
1022; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16f16_x = insertelement <16 x half> undef, half undef, i32 %x
1023; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32f16_x = insertelement <32 x half> undef, half undef, i32 %x
1024; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v64f16_x = insertelement <64 x half> undef, half undef, i32 %x
1025; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2f16_x = insertelement <vscale x 2 x half> undef, half undef, i32 %x
1026; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4f16_x = insertelement <vscale x 4 x half> undef, half undef, i32 %x
1027; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8f16_x = insertelement <vscale x 8 x half> undef, half undef, i32 %x
1028; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16f16_x = insertelement <vscale x 16 x half> undef, half undef, i32 %x
1029; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv32f16_x = insertelement <vscale x 32 x half> undef, half undef, i32 %x
1030; RV32V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv64f16_x = insertelement <vscale x 64 x half> undef, half undef, i32 %x
1031; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2f32_x = insertelement <2 x float> undef, float undef, i32 %x
1032; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4f32_x = insertelement <4 x float> undef, float undef, i32 %x
1033; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8f32_x = insertelement <8 x float> undef, float undef, i32 %x
1034; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16f32_x = insertelement <16 x float> undef, float undef, i32 %x
1035; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32f32_x = insertelement <32 x float> undef, float undef, i32 %x
1036; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2f32_x = insertelement <vscale x 2 x float> undef, float undef, i32 %x
1037; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4f32_x = insertelement <vscale x 4 x float> undef, float undef, i32 %x
1038; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8f32_x = insertelement <vscale x 8 x float> undef, float undef, i32 %x
1039; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16f32_x = insertelement <vscale x 16 x float> undef, float undef, i32 %x
1040; RV32V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv32f32_x = insertelement <vscale x 32 x float> undef, float undef, i32 %x
1041; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2f64_x = insertelement <2 x double> undef, double undef, i32 %x
1042; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4f64_x = insertelement <4 x double> undef, double undef, i32 %x
1043; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8f64_x = insertelement <8 x double> undef, double undef, i32 %x
1044; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16f64_x = insertelement <16 x double> undef, double undef, i32 %x
1045; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2f64_x = insertelement <vscale x 2 x double> undef, double undef, i32 %x
1046; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4f64_x = insertelement <vscale x 4 x double> undef, double undef, i32 %x
1047; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8f64_x = insertelement <vscale x 8 x double> undef, double undef, i32 %x
1048; RV32V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv16f64_x = insertelement <vscale x 16 x double> undef, double undef, i32 %x
1049; RV32V-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1050;
1051; RV64V-LABEL: 'insertelement_fp'
1052; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0
1053; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4f16_0 = insertelement <4 x half> undef, half undef, i32 0
1054; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f16_0 = insertelement <8 x half> undef, half undef, i32 0
1055; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16f16_0 = insertelement <16 x half> undef, half undef, i32 0
1056; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32f16_0 = insertelement <32 x half> undef, half undef, i32 0
1057; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v64f16_0 = insertelement <64 x half> undef, half undef, i32 0
1058; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16_0 = insertelement <vscale x 2 x half> undef, half undef, i32 0
1059; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16_0 = insertelement <vscale x 4 x half> undef, half undef, i32 0
1060; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16_0 = insertelement <vscale x 8 x half> undef, half undef, i32 0
1061; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16_0 = insertelement <vscale x 16 x half> undef, half undef, i32 0
1062; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32f16_0 = insertelement <vscale x 32 x half> undef, half undef, i32 0
1063; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_0 = insertelement <vscale x 64 x half> undef, half undef, i32 0
1064; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2f32_0 = insertelement <2 x float> undef, float undef, i32 0
1065; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4f32_0 = insertelement <4 x float> undef, float undef, i32 0
1066; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f32_0 = insertelement <8 x float> undef, float undef, i32 0
1067; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16f32_0 = insertelement <16 x float> undef, float undef, i32 0
1068; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32f32_0 = insertelement <32 x float> undef, float undef, i32 0
1069; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32_0 = insertelement <vscale x 2 x float> undef, float undef, i32 0
1070; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32_0 = insertelement <vscale x 4 x float> undef, float undef, i32 0
1071; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32_0 = insertelement <vscale x 8 x float> undef, float undef, i32 0
1072; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32_0 = insertelement <vscale x 16 x float> undef, float undef, i32 0
1073; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_0 = insertelement <vscale x 32 x float> undef, float undef, i32 0
1074; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2f64_0 = insertelement <2 x double> undef, double undef, i32 0
1075; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4f64_0 = insertelement <4 x double> undef, double undef, i32 0
1076; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8f64_0 = insertelement <8 x double> undef, double undef, i32 0
1077; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16f64_0 = insertelement <16 x double> undef, double undef, i32 0
1078; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64_0 = insertelement <vscale x 2 x double> undef, double undef, i32 0
1079; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64_0 = insertelement <vscale x 4 x double> undef, double undef, i32 0
1080; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64_0 = insertelement <vscale x 8 x double> undef, double undef, i32 0
1081; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_0 = insertelement <vscale x 16 x double> undef, double undef, i32 0
1082; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2f16_1 = insertelement <2 x half> undef, half undef, i32 1
1083; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4f16_1 = insertelement <4 x half> undef, half undef, i32 1
1084; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f16_1 = insertelement <8 x half> undef, half undef, i32 1
1085; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16f16_1 = insertelement <16 x half> undef, half undef, i32 1
1086; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32f16_1 = insertelement <32 x half> undef, half undef, i32 1
1087; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v64f16_1 = insertelement <64 x half> undef, half undef, i32 1
1088; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2f16_1 = insertelement <vscale x 2 x half> undef, half undef, i32 1
1089; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4f16_1 = insertelement <vscale x 4 x half> undef, half undef, i32 1
1090; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8f16_1 = insertelement <vscale x 8 x half> undef, half undef, i32 1
1091; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16f16_1 = insertelement <vscale x 16 x half> undef, half undef, i32 1
1092; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32f16_1 = insertelement <vscale x 32 x half> undef, half undef, i32 1
1093; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv64f16_1 = insertelement <vscale x 64 x half> undef, half undef, i32 1
1094; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2f32_1 = insertelement <2 x float> undef, float undef, i32 1
1095; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4f32_1 = insertelement <4 x float> undef, float undef, i32 1
1096; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f32_1 = insertelement <8 x float> undef, float undef, i32 1
1097; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16f32_1 = insertelement <16 x float> undef, float undef, i32 1
1098; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32f32_1 = insertelement <32 x float> undef, float undef, i32 1
1099; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2f32_1 = insertelement <vscale x 2 x float> undef, float undef, i32 1
1100; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4f32_1 = insertelement <vscale x 4 x float> undef, float undef, i32 1
1101; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8f32_1 = insertelement <vscale x 8 x float> undef, float undef, i32 1
1102; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16f32_1 = insertelement <vscale x 16 x float> undef, float undef, i32 1
1103; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv32f32_1 = insertelement <vscale x 32 x float> undef, float undef, i32 1
1104; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2f64_1 = insertelement <2 x double> undef, double undef, i32 1
1105; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v4f64_1 = insertelement <4 x double> undef, double undef, i32 1
1106; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v8f64_1 = insertelement <8 x double> undef, double undef, i32 1
1107; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v16f64_1 = insertelement <16 x double> undef, double undef, i32 1
1108; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv2f64_1 = insertelement <vscale x 2 x double> undef, double undef, i32 1
1109; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv4f64_1 = insertelement <vscale x 4 x double> undef, double undef, i32 1
1110; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv8f64_1 = insertelement <vscale x 8 x double> undef, double undef, i32 1
1111; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %nxv16f64_1 = insertelement <vscale x 16 x double> undef, double undef, i32 1
1112; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2f16_x = insertelement <2 x half> undef, half undef, i32 %x
1113; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4f16_x = insertelement <4 x half> undef, half undef, i32 %x
1114; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8f16_x = insertelement <8 x half> undef, half undef, i32 %x
1115; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16f16_x = insertelement <16 x half> undef, half undef, i32 %x
1116; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32f16_x = insertelement <32 x half> undef, half undef, i32 %x
1117; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v64f16_x = insertelement <64 x half> undef, half undef, i32 %x
1118; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2f16_x = insertelement <vscale x 2 x half> undef, half undef, i32 %x
1119; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4f16_x = insertelement <vscale x 4 x half> undef, half undef, i32 %x
1120; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8f16_x = insertelement <vscale x 8 x half> undef, half undef, i32 %x
1121; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16f16_x = insertelement <vscale x 16 x half> undef, half undef, i32 %x
1122; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv32f16_x = insertelement <vscale x 32 x half> undef, half undef, i32 %x
1123; RV64V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv64f16_x = insertelement <vscale x 64 x half> undef, half undef, i32 %x
1124; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2f32_x = insertelement <2 x float> undef, float undef, i32 %x
1125; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4f32_x = insertelement <4 x float> undef, float undef, i32 %x
1126; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8f32_x = insertelement <8 x float> undef, float undef, i32 %x
1127; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16f32_x = insertelement <16 x float> undef, float undef, i32 %x
1128; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v32f32_x = insertelement <32 x float> undef, float undef, i32 %x
1129; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2f32_x = insertelement <vscale x 2 x float> undef, float undef, i32 %x
1130; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4f32_x = insertelement <vscale x 4 x float> undef, float undef, i32 %x
1131; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8f32_x = insertelement <vscale x 8 x float> undef, float undef, i32 %x
1132; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv16f32_x = insertelement <vscale x 16 x float> undef, float undef, i32 %x
1133; RV64V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv32f32_x = insertelement <vscale x 32 x float> undef, float undef, i32 %x
1134; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2f64_x = insertelement <2 x double> undef, double undef, i32 %x
1135; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v4f64_x = insertelement <4 x double> undef, double undef, i32 %x
1136; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v8f64_x = insertelement <8 x double> undef, double undef, i32 %x
1137; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v16f64_x = insertelement <16 x double> undef, double undef, i32 %x
1138; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv2f64_x = insertelement <vscale x 2 x double> undef, double undef, i32 %x
1139; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv4f64_x = insertelement <vscale x 4 x double> undef, double undef, i32 %x
1140; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %nxv8f64_x = insertelement <vscale x 8 x double> undef, double undef, i32 %x
1141; RV64V-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %nxv16f64_x = insertelement <vscale x 16 x double> undef, double undef, i32 %x
1142; RV64V-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1143;
1144; RV32ZVE64X-LABEL: 'insertelement_fp'
1145; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0
1146; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f16_0 = insertelement <4 x half> undef, half undef, i32 0
1147; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f16_0 = insertelement <8 x half> undef, half undef, i32 0
1148; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f16_0 = insertelement <16 x half> undef, half undef, i32 0
1149; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32f16_0 = insertelement <32 x half> undef, half undef, i32 0
1150; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v64f16_0 = insertelement <64 x half> undef, half undef, i32 0
1151; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f16_0 = insertelement <vscale x 2 x half> undef, half undef, i32 0
1152; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f16_0 = insertelement <vscale x 4 x half> undef, half undef, i32 0
1153; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f16_0 = insertelement <vscale x 8 x half> undef, half undef, i32 0
1154; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f16_0 = insertelement <vscale x 16 x half> undef, half undef, i32 0
1155; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv32f16_0 = insertelement <vscale x 32 x half> undef, half undef, i32 0
1156; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv64f16_0 = insertelement <vscale x 64 x half> undef, half undef, i32 0
1157; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f32_0 = insertelement <2 x float> undef, float undef, i32 0
1158; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f32_0 = insertelement <4 x float> undef, float undef, i32 0
1159; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f32_0 = insertelement <8 x float> undef, float undef, i32 0
1160; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f32_0 = insertelement <16 x float> undef, float undef, i32 0
1161; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32f32_0 = insertelement <32 x float> undef, float undef, i32 0
1162; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f32_0 = insertelement <vscale x 2 x float> undef, float undef, i32 0
1163; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f32_0 = insertelement <vscale x 4 x float> undef, float undef, i32 0
1164; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f32_0 = insertelement <vscale x 8 x float> undef, float undef, i32 0
1165; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f32_0 = insertelement <vscale x 16 x float> undef, float undef, i32 0
1166; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv32f32_0 = insertelement <vscale x 32 x float> undef, float undef, i32 0
1167; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f64_0 = insertelement <2 x double> undef, double undef, i32 0
1168; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f64_0 = insertelement <4 x double> undef, double undef, i32 0
1169; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f64_0 = insertelement <8 x double> undef, double undef, i32 0
1170; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f64_0 = insertelement <16 x double> undef, double undef, i32 0
1171; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f64_0 = insertelement <vscale x 2 x double> undef, double undef, i32 0
1172; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f64_0 = insertelement <vscale x 4 x double> undef, double undef, i32 0
1173; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f64_0 = insertelement <vscale x 8 x double> undef, double undef, i32 0
1174; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f64_0 = insertelement <vscale x 16 x double> undef, double undef, i32 0
1175; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f16_1 = insertelement <2 x half> undef, half undef, i32 1
1176; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f16_1 = insertelement <4 x half> undef, half undef, i32 1
1177; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f16_1 = insertelement <8 x half> undef, half undef, i32 1
1178; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f16_1 = insertelement <16 x half> undef, half undef, i32 1
1179; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32f16_1 = insertelement <32 x half> undef, half undef, i32 1
1180; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v64f16_1 = insertelement <64 x half> undef, half undef, i32 1
1181; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f16_1 = insertelement <vscale x 2 x half> undef, half undef, i32 1
1182; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f16_1 = insertelement <vscale x 4 x half> undef, half undef, i32 1
1183; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f16_1 = insertelement <vscale x 8 x half> undef, half undef, i32 1
1184; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f16_1 = insertelement <vscale x 16 x half> undef, half undef, i32 1
1185; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv32f16_1 = insertelement <vscale x 32 x half> undef, half undef, i32 1
1186; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv64f16_1 = insertelement <vscale x 64 x half> undef, half undef, i32 1
1187; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f32_1 = insertelement <2 x float> undef, float undef, i32 1
1188; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f32_1 = insertelement <4 x float> undef, float undef, i32 1
1189; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f32_1 = insertelement <8 x float> undef, float undef, i32 1
1190; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f32_1 = insertelement <16 x float> undef, float undef, i32 1
1191; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32f32_1 = insertelement <32 x float> undef, float undef, i32 1
1192; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f32_1 = insertelement <vscale x 2 x float> undef, float undef, i32 1
1193; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f32_1 = insertelement <vscale x 4 x float> undef, float undef, i32 1
1194; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f32_1 = insertelement <vscale x 8 x float> undef, float undef, i32 1
1195; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f32_1 = insertelement <vscale x 16 x float> undef, float undef, i32 1
1196; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv32f32_1 = insertelement <vscale x 32 x float> undef, float undef, i32 1
1197; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f64_1 = insertelement <2 x double> undef, double undef, i32 1
1198; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f64_1 = insertelement <4 x double> undef, double undef, i32 1
1199; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f64_1 = insertelement <8 x double> undef, double undef, i32 1
1200; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f64_1 = insertelement <16 x double> undef, double undef, i32 1
1201; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f64_1 = insertelement <vscale x 2 x double> undef, double undef, i32 1
1202; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f64_1 = insertelement <vscale x 4 x double> undef, double undef, i32 1
1203; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f64_1 = insertelement <vscale x 8 x double> undef, double undef, i32 1
1204; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f64_1 = insertelement <vscale x 16 x double> undef, double undef, i32 1
1205; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v2f16_x = insertelement <2 x half> undef, half undef, i32 %x
1206; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %v4f16_x = insertelement <4 x half> undef, half undef, i32 %x
1207; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %v8f16_x = insertelement <8 x half> undef, half undef, i32 %x
1208; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %v16f16_x = insertelement <16 x half> undef, half undef, i32 %x
1209; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 65 for instruction: %v32f16_x = insertelement <32 x half> undef, half undef, i32 %x
1210; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 129 for instruction: %v64f16_x = insertelement <64 x half> undef, half undef, i32 %x
1211; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f16_x = insertelement <vscale x 2 x half> undef, half undef, i32 %x
1212; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f16_x = insertelement <vscale x 4 x half> undef, half undef, i32 %x
1213; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f16_x = insertelement <vscale x 8 x half> undef, half undef, i32 %x
1214; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f16_x = insertelement <vscale x 16 x half> undef, half undef, i32 %x
1215; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv32f16_x = insertelement <vscale x 32 x half> undef, half undef, i32 %x
1216; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv64f16_x = insertelement <vscale x 64 x half> undef, half undef, i32 %x
1217; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v2f32_x = insertelement <2 x float> undef, float undef, i32 %x
1218; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %v4f32_x = insertelement <4 x float> undef, float undef, i32 %x
1219; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %v8f32_x = insertelement <8 x float> undef, float undef, i32 %x
1220; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %v16f32_x = insertelement <16 x float> undef, float undef, i32 %x
1221; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 65 for instruction: %v32f32_x = insertelement <32 x float> undef, float undef, i32 %x
1222; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f32_x = insertelement <vscale x 2 x float> undef, float undef, i32 %x
1223; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f32_x = insertelement <vscale x 4 x float> undef, float undef, i32 %x
1224; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f32_x = insertelement <vscale x 8 x float> undef, float undef, i32 %x
1225; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f32_x = insertelement <vscale x 16 x float> undef, float undef, i32 %x
1226; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv32f32_x = insertelement <vscale x 32 x float> undef, float undef, i32 %x
1227; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %v2f64_x = insertelement <2 x double> undef, double undef, i32 %x
1228; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %v4f64_x = insertelement <4 x double> undef, double undef, i32 %x
1229; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %v8f64_x = insertelement <8 x double> undef, double undef, i32 %x
1230; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 66 for instruction: %v16f64_x = insertelement <16 x double> undef, double undef, i32 %x
1231; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f64_x = insertelement <vscale x 2 x double> undef, double undef, i32 %x
1232; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f64_x = insertelement <vscale x 4 x double> undef, double undef, i32 %x
1233; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f64_x = insertelement <vscale x 8 x double> undef, double undef, i32 %x
1234; RV32ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f64_x = insertelement <vscale x 16 x double> undef, double undef, i32 %x
1235; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1236;
1237; RV64ZVE64X-LABEL: 'insertelement_fp'
1238; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0
1239; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f16_0 = insertelement <4 x half> undef, half undef, i32 0
1240; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f16_0 = insertelement <8 x half> undef, half undef, i32 0
1241; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f16_0 = insertelement <16 x half> undef, half undef, i32 0
1242; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32f16_0 = insertelement <32 x half> undef, half undef, i32 0
1243; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v64f16_0 = insertelement <64 x half> undef, half undef, i32 0
1244; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f16_0 = insertelement <vscale x 2 x half> undef, half undef, i32 0
1245; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f16_0 = insertelement <vscale x 4 x half> undef, half undef, i32 0
1246; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f16_0 = insertelement <vscale x 8 x half> undef, half undef, i32 0
1247; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f16_0 = insertelement <vscale x 16 x half> undef, half undef, i32 0
1248; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv32f16_0 = insertelement <vscale x 32 x half> undef, half undef, i32 0
1249; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv64f16_0 = insertelement <vscale x 64 x half> undef, half undef, i32 0
1250; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f32_0 = insertelement <2 x float> undef, float undef, i32 0
1251; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f32_0 = insertelement <4 x float> undef, float undef, i32 0
1252; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f32_0 = insertelement <8 x float> undef, float undef, i32 0
1253; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f32_0 = insertelement <16 x float> undef, float undef, i32 0
1254; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32f32_0 = insertelement <32 x float> undef, float undef, i32 0
1255; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f32_0 = insertelement <vscale x 2 x float> undef, float undef, i32 0
1256; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f32_0 = insertelement <vscale x 4 x float> undef, float undef, i32 0
1257; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f32_0 = insertelement <vscale x 8 x float> undef, float undef, i32 0
1258; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f32_0 = insertelement <vscale x 16 x float> undef, float undef, i32 0
1259; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv32f32_0 = insertelement <vscale x 32 x float> undef, float undef, i32 0
1260; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f64_0 = insertelement <2 x double> undef, double undef, i32 0
1261; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f64_0 = insertelement <4 x double> undef, double undef, i32 0
1262; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f64_0 = insertelement <8 x double> undef, double undef, i32 0
1263; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f64_0 = insertelement <16 x double> undef, double undef, i32 0
1264; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f64_0 = insertelement <vscale x 2 x double> undef, double undef, i32 0
1265; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f64_0 = insertelement <vscale x 4 x double> undef, double undef, i32 0
1266; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f64_0 = insertelement <vscale x 8 x double> undef, double undef, i32 0
1267; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f64_0 = insertelement <vscale x 16 x double> undef, double undef, i32 0
1268; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f16_1 = insertelement <2 x half> undef, half undef, i32 1
1269; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f16_1 = insertelement <4 x half> undef, half undef, i32 1
1270; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f16_1 = insertelement <8 x half> undef, half undef, i32 1
1271; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f16_1 = insertelement <16 x half> undef, half undef, i32 1
1272; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32f16_1 = insertelement <32 x half> undef, half undef, i32 1
1273; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v64f16_1 = insertelement <64 x half> undef, half undef, i32 1
1274; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f16_1 = insertelement <vscale x 2 x half> undef, half undef, i32 1
1275; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f16_1 = insertelement <vscale x 4 x half> undef, half undef, i32 1
1276; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f16_1 = insertelement <vscale x 8 x half> undef, half undef, i32 1
1277; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f16_1 = insertelement <vscale x 16 x half> undef, half undef, i32 1
1278; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv32f16_1 = insertelement <vscale x 32 x half> undef, half undef, i32 1
1279; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv64f16_1 = insertelement <vscale x 64 x half> undef, half undef, i32 1
1280; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f32_1 = insertelement <2 x float> undef, float undef, i32 1
1281; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f32_1 = insertelement <4 x float> undef, float undef, i32 1
1282; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f32_1 = insertelement <8 x float> undef, float undef, i32 1
1283; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f32_1 = insertelement <16 x float> undef, float undef, i32 1
1284; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32f32_1 = insertelement <32 x float> undef, float undef, i32 1
1285; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f32_1 = insertelement <vscale x 2 x float> undef, float undef, i32 1
1286; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f32_1 = insertelement <vscale x 4 x float> undef, float undef, i32 1
1287; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f32_1 = insertelement <vscale x 8 x float> undef, float undef, i32 1
1288; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f32_1 = insertelement <vscale x 16 x float> undef, float undef, i32 1
1289; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv32f32_1 = insertelement <vscale x 32 x float> undef, float undef, i32 1
1290; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2f64_1 = insertelement <2 x double> undef, double undef, i32 1
1291; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4f64_1 = insertelement <4 x double> undef, double undef, i32 1
1292; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v8f64_1 = insertelement <8 x double> undef, double undef, i32 1
1293; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v16f64_1 = insertelement <16 x double> undef, double undef, i32 1
1294; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f64_1 = insertelement <vscale x 2 x double> undef, double undef, i32 1
1295; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f64_1 = insertelement <vscale x 4 x double> undef, double undef, i32 1
1296; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f64_1 = insertelement <vscale x 8 x double> undef, double undef, i32 1
1297; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f64_1 = insertelement <vscale x 16 x double> undef, double undef, i32 1
1298; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v2f16_x = insertelement <2 x half> undef, half undef, i32 %x
1299; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %v4f16_x = insertelement <4 x half> undef, half undef, i32 %x
1300; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %v8f16_x = insertelement <8 x half> undef, half undef, i32 %x
1301; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %v16f16_x = insertelement <16 x half> undef, half undef, i32 %x
1302; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 65 for instruction: %v32f16_x = insertelement <32 x half> undef, half undef, i32 %x
1303; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 129 for instruction: %v64f16_x = insertelement <64 x half> undef, half undef, i32 %x
1304; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f16_x = insertelement <vscale x 2 x half> undef, half undef, i32 %x
1305; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f16_x = insertelement <vscale x 4 x half> undef, half undef, i32 %x
1306; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f16_x = insertelement <vscale x 8 x half> undef, half undef, i32 %x
1307; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f16_x = insertelement <vscale x 16 x half> undef, half undef, i32 %x
1308; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv32f16_x = insertelement <vscale x 32 x half> undef, half undef, i32 %x
1309; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv64f16_x = insertelement <vscale x 64 x half> undef, half undef, i32 %x
1310; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v2f32_x = insertelement <2 x float> undef, float undef, i32 %x
1311; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %v4f32_x = insertelement <4 x float> undef, float undef, i32 %x
1312; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %v8f32_x = insertelement <8 x float> undef, float undef, i32 %x
1313; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %v16f32_x = insertelement <16 x float> undef, float undef, i32 %x
1314; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 65 for instruction: %v32f32_x = insertelement <32 x float> undef, float undef, i32 %x
1315; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f32_x = insertelement <vscale x 2 x float> undef, float undef, i32 %x
1316; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f32_x = insertelement <vscale x 4 x float> undef, float undef, i32 %x
1317; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f32_x = insertelement <vscale x 8 x float> undef, float undef, i32 %x
1318; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f32_x = insertelement <vscale x 16 x float> undef, float undef, i32 %x
1319; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv32f32_x = insertelement <vscale x 32 x float> undef, float undef, i32 %x
1320; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %v2f64_x = insertelement <2 x double> undef, double undef, i32 %x
1321; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %v4f64_x = insertelement <4 x double> undef, double undef, i32 %x
1322; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %v8f64_x = insertelement <8 x double> undef, double undef, i32 %x
1323; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %v16f64_x = insertelement <16 x double> undef, double undef, i32 %x
1324; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv2f64_x = insertelement <vscale x 2 x double> undef, double undef, i32 %x
1325; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv4f64_x = insertelement <vscale x 4 x double> undef, double undef, i32 %x
1326; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv8f64_x = insertelement <vscale x 8 x double> undef, double undef, i32 %x
1327; RV64ZVE64X-NEXT:  Cost Model: Invalid cost for instruction: %nxv16f64_x = insertelement <vscale x 16 x double> undef, double undef, i32 %x
1328; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1329;
1330  %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0
1331  %v4f16_0 = insertelement <4 x half> undef, half undef, i32 0
1332  %v8f16_0 = insertelement <8 x half> undef, half undef, i32 0
1333  %v16f16_0 = insertelement <16 x half> undef, half undef, i32 0
1334  %v32f16_0 = insertelement <32 x half> undef, half undef, i32 0
1335  %v64f16_0 = insertelement <64 x half> undef, half undef, i32 0
1336
1337  %nxv2f16_0 = insertelement <vscale x 2 x half> undef, half undef, i32 0
1338  %nxv4f16_0 = insertelement <vscale x 4 x half> undef, half undef, i32 0
1339  %nxv8f16_0 = insertelement <vscale x 8 x half> undef, half undef, i32 0
1340  %nxv16f16_0 = insertelement <vscale x 16 x half> undef, half undef, i32 0
1341  %nxv32f16_0 = insertelement <vscale x 32 x half> undef, half undef, i32 0
1342  %nxv64f16_0 = insertelement <vscale x 64 x half> undef, half undef, i32 0
1343
1344  %v2f32_0 = insertelement <2 x float> undef, float undef, i32 0
1345  %v4f32_0 = insertelement <4 x float> undef, float undef, i32 0
1346  %v8f32_0 = insertelement <8 x float> undef, float undef, i32 0
1347  %v16f32_0 = insertelement <16 x float> undef, float undef, i32 0
1348  %v32f32_0 = insertelement <32 x float> undef, float undef, i32 0
1349
1350  %nxv2f32_0 = insertelement <vscale x 2 x float> undef, float undef, i32 0
1351  %nxv4f32_0 = insertelement <vscale x 4 x float> undef, float undef, i32 0
1352  %nxv8f32_0 = insertelement <vscale x 8 x float> undef, float undef, i32 0
1353  %nxv16f32_0 = insertelement <vscale x 16 x float> undef, float undef, i32 0
1354  %nxv32f32_0 = insertelement <vscale x 32 x float> undef, float undef, i32 0
1355
1356  %v2f64_0 = insertelement <2 x double> undef, double undef, i32 0
1357  %v4f64_0 = insertelement <4 x double> undef, double undef, i32 0
1358  %v8f64_0 = insertelement <8 x double> undef, double undef, i32 0
1359  %v16f64_0 = insertelement <16 x double> undef, double undef, i32 0
1360
1361  %nxv2f64_0 = insertelement <vscale x 2 x double> undef, double undef, i32 0
1362  %nxv4f64_0 = insertelement <vscale x 4 x double> undef, double undef, i32 0
1363  %nxv8f64_0 = insertelement <vscale x 8 x double> undef, double undef, i32 0
1364  %nxv16f64_0 = insertelement <vscale x 16 x double> undef, double undef, i32 0
1365
1366  %v2f16_1 = insertelement <2 x half> undef, half undef, i32 1
1367  %v4f16_1 = insertelement <4 x half> undef, half undef, i32 1
1368  %v8f16_1 = insertelement <8 x half> undef, half undef, i32 1
1369  %v16f16_1 = insertelement <16 x half> undef, half undef, i32 1
1370  %v32f16_1 = insertelement <32 x half> undef, half undef, i32 1
1371  %v64f16_1 = insertelement <64 x half> undef, half undef, i32 1
1372
1373  %nxv2f16_1 = insertelement <vscale x 2 x half> undef, half undef, i32 1
1374  %nxv4f16_1 = insertelement <vscale x 4 x half> undef, half undef, i32 1
1375  %nxv8f16_1 = insertelement <vscale x 8 x half> undef, half undef, i32 1
1376  %nxv16f16_1 = insertelement <vscale x 16 x half> undef, half undef, i32 1
1377  %nxv32f16_1 = insertelement <vscale x 32 x half> undef, half undef, i32 1
1378  %nxv64f16_1 = insertelement <vscale x 64 x half> undef, half undef, i32 1
1379
1380  %v2f32_1 = insertelement <2 x float> undef, float undef, i32 1
1381  %v4f32_1 = insertelement <4 x float> undef, float undef, i32 1
1382  %v8f32_1 = insertelement <8 x float> undef, float undef, i32 1
1383  %v16f32_1 = insertelement <16 x float> undef, float undef, i32 1
1384  %v32f32_1 = insertelement <32 x float> undef, float undef, i32 1
1385
1386  %nxv2f32_1 = insertelement <vscale x 2 x float> undef, float undef, i32 1
1387  %nxv4f32_1 = insertelement <vscale x 4 x float> undef, float undef, i32 1
1388  %nxv8f32_1 = insertelement <vscale x 8 x float> undef, float undef, i32 1
1389  %nxv16f32_1 = insertelement <vscale x 16 x float> undef, float undef, i32 1
1390  %nxv32f32_1 = insertelement <vscale x 32 x float> undef, float undef, i32 1
1391
1392  %v2f64_1 = insertelement <2 x double> undef, double undef, i32 1
1393  %v4f64_1 = insertelement <4 x double> undef, double undef, i32 1
1394  %v8f64_1 = insertelement <8 x double> undef, double undef, i32 1
1395  %v16f64_1 = insertelement <16 x double> undef, double undef, i32 1
1396
1397  %nxv2f64_1 = insertelement <vscale x 2 x double> undef, double undef, i32 1
1398  %nxv4f64_1 = insertelement <vscale x 4 x double> undef, double undef, i32 1
1399  %nxv8f64_1 = insertelement <vscale x 8 x double> undef, double undef, i32 1
1400  %nxv16f64_1 = insertelement <vscale x 16 x double> undef, double undef, i32 1
1401
1402  %v2f16_x = insertelement <2 x half> undef, half undef, i32 %x
1403  %v4f16_x = insertelement <4 x half> undef, half undef, i32 %x
1404  %v8f16_x = insertelement <8 x half> undef, half undef, i32 %x
1405  %v16f16_x = insertelement <16 x half> undef, half undef, i32 %x
1406  %v32f16_x = insertelement <32 x half> undef, half undef, i32 %x
1407  %v64f16_x = insertelement <64 x half> undef, half undef, i32 %x
1408
1409  %nxv2f16_x = insertelement <vscale x 2 x half> undef, half undef, i32 %x
1410  %nxv4f16_x = insertelement <vscale x 4 x half> undef, half undef, i32 %x
1411  %nxv8f16_x = insertelement <vscale x 8 x half> undef, half undef, i32 %x
1412  %nxv16f16_x = insertelement <vscale x 16 x half> undef, half undef, i32 %x
1413  %nxv32f16_x = insertelement <vscale x 32 x half> undef, half undef, i32 %x
1414  %nxv64f16_x = insertelement <vscale x 64 x half> undef, half undef, i32 %x
1415
1416  %v2f32_x = insertelement <2 x float> undef, float undef, i32 %x
1417  %v4f32_x = insertelement <4 x float> undef, float undef, i32 %x
1418  %v8f32_x = insertelement <8 x float> undef, float undef, i32 %x
1419  %v16f32_x = insertelement <16 x float> undef, float undef, i32 %x
1420  %v32f32_x = insertelement <32 x float> undef, float undef, i32 %x
1421
1422  %nxv2f32_x = insertelement <vscale x 2 x float> undef, float undef, i32 %x
1423  %nxv4f32_x = insertelement <vscale x 4 x float> undef, float undef, i32 %x
1424  %nxv8f32_x = insertelement <vscale x 8 x float> undef, float undef, i32 %x
1425  %nxv16f32_x = insertelement <vscale x 16 x float> undef, float undef, i32 %x
1426  %nxv32f32_x = insertelement <vscale x 32 x float> undef, float undef, i32 %x
1427
1428  %v2f64_x = insertelement <2 x double> undef, double undef, i32 %x
1429  %v4f64_x = insertelement <4 x double> undef, double undef, i32 %x
1430  %v8f64_x = insertelement <8 x double> undef, double undef, i32 %x
1431  %v16f64_x = insertelement <16 x double> undef, double undef, i32 %x
1432
1433  %nxv2f64_x = insertelement <vscale x 2 x double> undef, double undef, i32 %x
1434  %nxv4f64_x = insertelement <vscale x 4 x double> undef, double undef, i32 %x
1435  %nxv8f64_x = insertelement <vscale x 8 x double> undef, double undef, i32 %x
1436  %nxv16f64_x = insertelement <vscale x 16 x double> undef, double undef, i32 %x
1437
1438  ret void
1439}
1440
1441
1442define void @insertelement_int_nonpoweroftwo(i32 %x) {
1443; RV32V-LABEL: 'insertelement_int_nonpoweroftwo'
1444; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i8 = insertelement <3 x i8> undef, i8 undef, i32 %x
1445; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v7i8 = insertelement <7 x i8> undef, i8 undef, i32 %x
1446; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v15i8 = insertelement <15 x i8> undef, i8 undef, i32 %x
1447; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v3i32_0 = insertelement <3 x i32> undef, i32 undef, i32 0
1448; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = insertelement <3 x i32> undef, i32 undef, i32 %x
1449; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v7i32 = insertelement <7 x i32> undef, i32 undef, i32 %x
1450; RV32V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v15i32 = insertelement <15 x i32> undef, i32 undef, i32 %x
1451; RV32V-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1452;
1453; RV64V-LABEL: 'insertelement_int_nonpoweroftwo'
1454; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i8 = insertelement <3 x i8> undef, i8 undef, i32 %x
1455; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v7i8 = insertelement <7 x i8> undef, i8 undef, i32 %x
1456; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v15i8 = insertelement <15 x i8> undef, i8 undef, i32 %x
1457; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v3i32_0 = insertelement <3 x i32> undef, i32 undef, i32 0
1458; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = insertelement <3 x i32> undef, i32 undef, i32 %x
1459; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v7i32 = insertelement <7 x i32> undef, i32 undef, i32 %x
1460; RV64V-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v15i32 = insertelement <15 x i32> undef, i32 undef, i32 %x
1461; RV64V-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1462;
1463; RV32ZVE64X-LABEL: 'insertelement_int_nonpoweroftwo'
1464; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i8 = insertelement <3 x i8> undef, i8 undef, i32 %x
1465; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v7i8 = insertelement <7 x i8> undef, i8 undef, i32 %x
1466; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v15i8 = insertelement <15 x i8> undef, i8 undef, i32 %x
1467; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v3i32_0 = insertelement <3 x i32> undef, i32 undef, i32 0
1468; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = insertelement <3 x i32> undef, i32 undef, i32 %x
1469; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v7i32 = insertelement <7 x i32> undef, i32 undef, i32 %x
1470; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v15i32 = insertelement <15 x i32> undef, i32 undef, i32 %x
1471; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1472;
1473; RV64ZVE64X-LABEL: 'insertelement_int_nonpoweroftwo'
1474; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i8 = insertelement <3 x i8> undef, i8 undef, i32 %x
1475; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v7i8 = insertelement <7 x i8> undef, i8 undef, i32 %x
1476; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v15i8 = insertelement <15 x i8> undef, i8 undef, i32 %x
1477; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v3i32_0 = insertelement <3 x i32> undef, i32 undef, i32 0
1478; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = insertelement <3 x i32> undef, i32 undef, i32 %x
1479; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v7i32 = insertelement <7 x i32> undef, i32 undef, i32 %x
1480; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v15i32 = insertelement <15 x i32> undef, i32 undef, i32 %x
1481; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1482;
1483  %v3i8 = insertelement <3 x i8> undef, i8 undef, i32 %x
1484  %v7i8 = insertelement <7 x i8> undef, i8 undef, i32 %x
1485  %v15i8 = insertelement <15 x i8> undef, i8 undef, i32 %x
1486
1487  %v3i32_0 = insertelement <3 x i32> undef, i32 undef, i32 0
1488  %v3i32 = insertelement <3 x i32> undef, i32 undef, i32 %x
1489  %v7i32 = insertelement <7 x i32> undef, i32 undef, i32 %x
1490  %v15i32 = insertelement <15 x i32> undef, i32 undef, i32 %x
1491
1492  ret void
1493}
1494
1495define void @insertelement_vls(i32 %x) vscale_range(2,2) {
1496; RV32V-LABEL: 'insertelement_vls'
1497; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_0 = insertelement <32 x i32> undef, i32 undef, i32 0
1498; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_4 = insertelement <32 x i32> undef, i32 undef, i32 4
1499; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_5 = insertelement <32 x i32> undef, i32 undef, i32 5
1500; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_8 = insertelement <32 x i32> undef, i32 undef, i32 8
1501; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_9 = insertelement <32 x i32> undef, i32 undef, i32 9
1502; RV32V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_11 = insertelement <32 x i32> undef, i32 undef, i32 11
1503; RV32V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_12 = insertelement <32 x i32> undef, i32 undef, i32 12
1504; RV32V-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1505;
1506; RV64V-LABEL: 'insertelement_vls'
1507; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_0 = insertelement <32 x i32> undef, i32 undef, i32 0
1508; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_4 = insertelement <32 x i32> undef, i32 undef, i32 4
1509; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_5 = insertelement <32 x i32> undef, i32 undef, i32 5
1510; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_8 = insertelement <32 x i32> undef, i32 undef, i32 8
1511; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_9 = insertelement <32 x i32> undef, i32 undef, i32 9
1512; RV64V-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_11 = insertelement <32 x i32> undef, i32 undef, i32 11
1513; RV64V-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_12 = insertelement <32 x i32> undef, i32 undef, i32 12
1514; RV64V-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1515;
1516; RV32ZVE64X-LABEL: 'insertelement_vls'
1517; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_0 = insertelement <32 x i32> undef, i32 undef, i32 0
1518; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_4 = insertelement <32 x i32> undef, i32 undef, i32 4
1519; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_5 = insertelement <32 x i32> undef, i32 undef, i32 5
1520; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_8 = insertelement <32 x i32> undef, i32 undef, i32 8
1521; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_9 = insertelement <32 x i32> undef, i32 undef, i32 9
1522; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_11 = insertelement <32 x i32> undef, i32 undef, i32 11
1523; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_12 = insertelement <32 x i32> undef, i32 undef, i32 12
1524; RV32ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1525;
1526; RV64ZVE64X-LABEL: 'insertelement_vls'
1527; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_0 = insertelement <32 x i32> undef, i32 undef, i32 0
1528; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_4 = insertelement <32 x i32> undef, i32 undef, i32 4
1529; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_5 = insertelement <32 x i32> undef, i32 undef, i32 5
1530; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_8 = insertelement <32 x i32> undef, i32 undef, i32 8
1531; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_9 = insertelement <32 x i32> undef, i32 undef, i32 9
1532; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v32i32_11 = insertelement <32 x i32> undef, i32 undef, i32 11
1533; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v32i32_12 = insertelement <32 x i32> undef, i32 undef, i32 12
1534; RV64ZVE64X-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1535;
1536  %v32i32_0 = insertelement <32 x i32> undef, i32 undef, i32 0
1537  %v32i32_4 = insertelement <32 x i32> undef, i32 undef, i32 4
1538  %v32i32_5 = insertelement <32 x i32> undef, i32 undef, i32 5
1539  %v32i32_8 = insertelement <32 x i32> undef, i32 undef, i32 8
1540  %v32i32_9 = insertelement <32 x i32> undef, i32 undef, i32 9
1541  %v32i32_11 = insertelement <32 x i32> undef, i32 undef, i32 11
1542  %v32i32_12 = insertelement <32 x i32> undef, i32 undef, i32 12
1543
1544  ret void
1545}
1546