You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llvm/test/Analysis/CostModel/RISCV/vp-intrinsics.ll
+106Lines changed: 106 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2125,6 +2125,112 @@ define void @vp_fdiv(){
2125
2125
retvoid
2126
2126
}
2127
2127
2128
+
definevoid@splat() {
2129
+
; CHECK-LABEL: 'splat'
2130
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = call <2 x i8> @llvm.experimental.vp.splat.v2i8(i8 undef, <2 x i1> undef, i32 undef)
2131
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %2 = call <4 x i8> @llvm.experimental.vp.splat.v4i8(i8 undef, <4 x i1> undef, i32 undef)
2132
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %3 = call <8 x i8> @llvm.experimental.vp.splat.v8i8(i8 undef, <8 x i1> undef, i32 undef)
2133
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %4 = call <16 x i8> @llvm.experimental.vp.splat.v16i8(i8 undef, <16 x i1> undef, i32 undef)
2134
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = call <2 x i16> @llvm.experimental.vp.splat.v2i16(i16 undef, <2 x i1> undef, i32 undef)
2135
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %6 = call <4 x i16> @llvm.experimental.vp.splat.v4i16(i16 undef, <4 x i1> undef, i32 undef)
2136
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %7 = call <8 x i16> @llvm.experimental.vp.splat.v8i16(i16 undef, <8 x i1> undef, i32 undef)
2137
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %8 = call <16 x i16> @llvm.experimental.vp.splat.v16i16(i16 undef, <16 x i1> undef, i32 undef)
2138
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %9 = call <2 x i32> @llvm.experimental.vp.splat.v2i32(i32 undef, <2 x i1> undef, i32 undef)
2139
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %10 = call <4 x i32> @llvm.experimental.vp.splat.v4i32(i32 undef, <4 x i1> undef, i32 undef)
2140
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %11 = call <8 x i32> @llvm.experimental.vp.splat.v8i32(i32 undef, <8 x i1> undef, i32 undef)
2141
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %12 = call <16 x i32> @llvm.experimental.vp.splat.v16i32(i32 undef, <16 x i1> undef, i32 undef)
2142
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %13 = call <2 x i64> @llvm.experimental.vp.splat.v2i64(i64 undef, <2 x i1> undef, i32 undef)
2143
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %14 = call <4 x i64> @llvm.experimental.vp.splat.v4i64(i64 undef, <4 x i1> undef, i32 undef)
2144
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %15 = call <8 x i64> @llvm.experimental.vp.splat.v8i64(i64 undef, <8 x i1> undef, i32 undef)
2145
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %16 = call <16 x i64> @llvm.experimental.vp.splat.v16i64(i64 undef, <16 x i1> undef, i32 undef)
2146
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call <vscale x 2 x i8> @llvm.experimental.vp.splat.nxv2i8(i8 undef, <vscale x 2 x i1> undef, i32 undef)
2147
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call <vscale x 4 x i8> @llvm.experimental.vp.splat.nxv4i8(i8 undef, <vscale x 4 x i1> undef, i32 undef)
2148
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %19 = call <vscale x 8 x i8> @llvm.experimental.vp.splat.nxv8i8(i8 undef, <vscale x 8 x i1> undef, i32 undef)
2149
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %20 = call <vscale x 16 x i8> @llvm.experimental.vp.splat.nxv16i8(i8 undef, <vscale x 16 x i1> undef, i32 undef)
2150
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %21 = call <vscale x 2 x i16> @llvm.experimental.vp.splat.nxv2i16(i16 undef, <vscale x 2 x i1> undef, i32 undef)
2151
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %22 = call <vscale x 4 x i16> @llvm.experimental.vp.splat.nxv4i16(i16 undef, <vscale x 4 x i1> undef, i32 undef)
2152
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %23 = call <vscale x 8 x i16> @llvm.experimental.vp.splat.nxv8i16(i16 undef, <vscale x 8 x i1> undef, i32 undef)
2153
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %24 = call <vscale x 16 x i16> @llvm.experimental.vp.splat.nxv16i16(i16 undef, <vscale x 16 x i1> undef, i32 undef)
2154
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %25 = call <vscale x 2 x i32> @llvm.experimental.vp.splat.nxv2i32(i32 undef, <vscale x 2 x i1> undef, i32 undef)
2155
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %26 = call <vscale x 4 x i32> @llvm.experimental.vp.splat.nxv4i32(i32 undef, <vscale x 4 x i1> undef, i32 undef)
2156
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %27 = call <vscale x 8 x i32> @llvm.experimental.vp.splat.nxv8i32(i32 undef, <vscale x 8 x i1> undef, i32 undef)
2157
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %28 = call <vscale x 16 x i32> @llvm.experimental.vp.splat.nxv16i32(i32 undef, <vscale x 16 x i1> undef, i32 undef)
2158
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %29 = call <vscale x 2 x i64> @llvm.experimental.vp.splat.nxv2i64(i64 undef, <vscale x 2 x i1> undef, i32 undef)
2159
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %30 = call <vscale x 4 x i64> @llvm.experimental.vp.splat.nxv4i64(i64 undef, <vscale x 4 x i1> undef, i32 undef)
2160
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %31 = call <vscale x 8 x i64> @llvm.experimental.vp.splat.nxv8i64(i64 undef, <vscale x 8 x i1> undef, i32 undef)
2161
+
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %32 = call <vscale x 16 x i64> @llvm.experimental.vp.splat.nxv16i64(i64 undef, <vscale x 16 x i1> undef, i32 undef)
2162
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
2163
+
;
2164
+
; TYPEBASED-LABEL: 'splat'
2165
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %1 = call <2 x i8> @llvm.experimental.vp.splat.v2i8(i8 undef, <2 x i1> undef, i32 undef)
2166
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %2 = call <4 x i8> @llvm.experimental.vp.splat.v4i8(i8 undef, <4 x i1> undef, i32 undef)
2167
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %3 = call <8 x i8> @llvm.experimental.vp.splat.v8i8(i8 undef, <8 x i1> undef, i32 undef)
2168
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %4 = call <16 x i8> @llvm.experimental.vp.splat.v16i8(i8 undef, <16 x i1> undef, i32 undef)
2169
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %5 = call <2 x i16> @llvm.experimental.vp.splat.v2i16(i16 undef, <2 x i1> undef, i32 undef)
2170
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %6 = call <4 x i16> @llvm.experimental.vp.splat.v4i16(i16 undef, <4 x i1> undef, i32 undef)
2171
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %7 = call <8 x i16> @llvm.experimental.vp.splat.v8i16(i16 undef, <8 x i1> undef, i32 undef)
2172
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 110 for instruction: %8 = call <16 x i16> @llvm.experimental.vp.splat.v16i16(i16 undef, <16 x i1> undef, i32 undef)
2173
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %9 = call <2 x i32> @llvm.experimental.vp.splat.v2i32(i32 undef, <2 x i1> undef, i32 undef)
2174
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %10 = call <4 x i32> @llvm.experimental.vp.splat.v4i32(i32 undef, <4 x i1> undef, i32 undef)
2175
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %11 = call <8 x i32> @llvm.experimental.vp.splat.v8i32(i32 undef, <8 x i1> undef, i32 undef)
2176
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 110 for instruction: %12 = call <16 x i32> @llvm.experimental.vp.splat.v16i32(i32 undef, <16 x i1> undef, i32 undef)
2177
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %13 = call <2 x i64> @llvm.experimental.vp.splat.v2i64(i64 undef, <2 x i1> undef, i32 undef)
2178
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %14 = call <4 x i64> @llvm.experimental.vp.splat.v4i64(i64 undef, <4 x i1> undef, i32 undef)
2179
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %15 = call <8 x i64> @llvm.experimental.vp.splat.v8i64(i64 undef, <8 x i1> undef, i32 undef)
2180
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 110 for instruction: %16 = call <16 x i64> @llvm.experimental.vp.splat.v16i64(i64 undef, <16 x i1> undef, i32 undef)
2181
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %17 = call <vscale x 2 x i8> @llvm.experimental.vp.splat.nxv2i8(i8 undef, <vscale x 2 x i1> undef, i32 undef)
2182
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %18 = call <vscale x 4 x i8> @llvm.experimental.vp.splat.nxv4i8(i8 undef, <vscale x 4 x i1> undef, i32 undef)
2183
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %19 = call <vscale x 8 x i8> @llvm.experimental.vp.splat.nxv8i8(i8 undef, <vscale x 8 x i1> undef, i32 undef)
2184
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %20 = call <vscale x 16 x i8> @llvm.experimental.vp.splat.nxv16i8(i8 undef, <vscale x 16 x i1> undef, i32 undef)
2185
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %21 = call <vscale x 2 x i16> @llvm.experimental.vp.splat.nxv2i16(i16 undef, <vscale x 2 x i1> undef, i32 undef)
2186
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %22 = call <vscale x 4 x i16> @llvm.experimental.vp.splat.nxv4i16(i16 undef, <vscale x 4 x i1> undef, i32 undef)
2187
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %23 = call <vscale x 8 x i16> @llvm.experimental.vp.splat.nxv8i16(i16 undef, <vscale x 8 x i1> undef, i32 undef)
2188
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %24 = call <vscale x 16 x i16> @llvm.experimental.vp.splat.nxv16i16(i16 undef, <vscale x 16 x i1> undef, i32 undef)
2189
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %25 = call <vscale x 2 x i32> @llvm.experimental.vp.splat.nxv2i32(i32 undef, <vscale x 2 x i1> undef, i32 undef)
2190
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %26 = call <vscale x 4 x i32> @llvm.experimental.vp.splat.nxv4i32(i32 undef, <vscale x 4 x i1> undef, i32 undef)
2191
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %27 = call <vscale x 8 x i32> @llvm.experimental.vp.splat.nxv8i32(i32 undef, <vscale x 8 x i1> undef, i32 undef)
2192
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %28 = call <vscale x 16 x i32> @llvm.experimental.vp.splat.nxv16i32(i32 undef, <vscale x 16 x i1> undef, i32 undef)
2193
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %29 = call <vscale x 2 x i64> @llvm.experimental.vp.splat.nxv2i64(i64 undef, <vscale x 2 x i1> undef, i32 undef)
2194
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %30 = call <vscale x 4 x i64> @llvm.experimental.vp.splat.nxv4i64(i64 undef, <vscale x 4 x i1> undef, i32 undef)
2195
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %31 = call <vscale x 8 x i64> @llvm.experimental.vp.splat.nxv8i64(i64 undef, <vscale x 8 x i1> undef, i32 undef)
2196
+
; TYPEBASED-NEXT: Cost Model: Invalid cost for instruction: %32 = call <vscale x 16 x i64> @llvm.experimental.vp.splat.nxv16i64(i64 undef, <vscale x 16 x i1> undef, i32 undef)
2197
+
; TYPEBASED-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
2198
+
;
2199
+
call <2 x i8> @llvm.experimental.vp.splat.v2i8(i8undef, <2 x i1> undef, i32undef)
2200
+
call <4 x i8> @llvm.experimental.vp.splat.v4i8(i8undef, <4 x i1> undef, i32undef)
2201
+
call <8 x i8> @llvm.experimental.vp.splat.v8i8(i8undef, <8 x i1> undef, i32undef)
2202
+
call <16 x i8> @llvm.experimental.vp.splat.v16i8(i8undef, <16 x i1> undef, i32undef)
2203
+
call <2 x i16> @llvm.experimental.vp.splat.v2i16(i16undef, <2 x i1> undef, i32undef)
2204
+
call <4 x i16> @llvm.experimental.vp.splat.v4i16(i16undef, <4 x i1> undef, i32undef)
2205
+
call <8 x i16> @llvm.experimental.vp.splat.v8i16(i16undef, <8 x i1> undef, i32undef)
2206
+
call <16 x i16> @llvm.experimental.vp.splat.v16i16(i16undef, <16 x i1> undef, i32undef)
2207
+
call <2 x i32> @llvm.experimental.vp.splat.v2i32(i32undef, <2 x i1> undef, i32undef)
2208
+
call <4 x i32> @llvm.experimental.vp.splat.v4i32(i32undef, <4 x i1> undef, i32undef)
2209
+
call <8 x i32> @llvm.experimental.vp.splat.v8i32(i32undef, <8 x i1> undef, i32undef)
2210
+
call <16 x i32> @llvm.experimental.vp.splat.v16i32(i32undef, <16 x i1> undef, i32undef)
2211
+
call <2 x i64> @llvm.experimental.vp.splat.v2i64(i64undef, <2 x i1> undef, i32undef)
2212
+
call <4 x i64> @llvm.experimental.vp.splat.v4i64(i64undef, <4 x i1> undef, i32undef)
2213
+
call <8 x i64> @llvm.experimental.vp.splat.v8i64(i64undef, <8 x i1> undef, i32undef)
2214
+
call <16 x i64> @llvm.experimental.vp.splat.v16i64(i64undef, <16 x i1> undef, i32undef)
2215
+
call <vscale x 2 x i8> @llvm.experimental.vp.splat.nxv2i8(i8undef, <vscale x 2 x i1> undef, i32undef)
2216
+
call <vscale x 4 x i8> @llvm.experimental.vp.splat.nxv4i8(i8undef, <vscale x 4 x i1> undef, i32undef)
2217
+
call <vscale x 8 x i8> @llvm.experimental.vp.splat.nxv8i8(i8undef, <vscale x 8 x i1> undef, i32undef)
2218
+
call <vscale x 16 x i8> @llvm.experimental.vp.splat.nxv16i8(i8undef, <vscale x 16 x i1> undef, i32undef)
2219
+
call <vscale x 2 x i16> @llvm.experimental.vp.splat.nxv2i16(i16undef, <vscale x 2 x i1> undef, i32undef)
2220
+
call <vscale x 4 x i16> @llvm.experimental.vp.splat.nxv4i16(i16undef, <vscale x 4 x i1> undef, i32undef)
2221
+
call <vscale x 8 x i16> @llvm.experimental.vp.splat.nxv8i16(i16undef, <vscale x 8 x i1> undef, i32undef)
2222
+
call <vscale x 16 x i16> @llvm.experimental.vp.splat.nxv16i16(i16undef, <vscale x 16 x i1> undef, i32undef)
2223
+
call <vscale x 2 x i32> @llvm.experimental.vp.splat.nxv2i32(i32undef, <vscale x 2 x i1> undef, i32undef)
2224
+
call <vscale x 4 x i32> @llvm.experimental.vp.splat.nxv4i32(i32undef, <vscale x 4 x i1> undef, i32undef)
2225
+
call <vscale x 8 x i32> @llvm.experimental.vp.splat.nxv8i32(i32undef, <vscale x 8 x i1> undef, i32undef)
2226
+
call <vscale x 16 x i32> @llvm.experimental.vp.splat.nxv16i32(i32undef, <vscale x 16 x i1> undef, i32undef)
2227
+
call <vscale x 2 x i64> @llvm.experimental.vp.splat.nxv2i64(i64undef, <vscale x 2 x i1> undef, i32undef)
2228
+
call <vscale x 4 x i64> @llvm.experimental.vp.splat.nxv4i64(i64undef, <vscale x 4 x i1> undef, i32undef)
2229
+
call <vscale x 8 x i64> @llvm.experimental.vp.splat.nxv8i64(i64undef, <vscale x 8 x i1> undef, i32undef)
2230
+
call <vscale x 16 x i64> @llvm.experimental.vp.splat.nxv16i64(i64undef, <vscale x 16 x i1> undef, i32undef)
2231
+
retvoid
2232
+
}
2233
+
2128
2234
declare <2 x i8> @llvm.vp.add.v2i8(<2 x i8>, <2 x i8>, <2 x i1>, i32)
2129
2235
declare <4 x i8> @llvm.vp.add.v4i8(<4 x i8>, <4 x i8>, <4 x i1>, i32)
2130
2236
declare <8 x i8> @llvm.vp.add.v8i8(<8 x i8>, <8 x i8>, <8 x i1>, i32)
0 commit comments