|
7 | 7 | ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512F
|
8 | 8 | ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+avx512vl,+avx512dq | FileCheck %s --check-prefixes=AVX512DQ
|
9 | 9 | ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+avx512vl,+avx512bw | FileCheck %s --check-prefixes=AVX512BW
|
| 10 | +; |
| 11 | +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mcpu=slm | FileCheck %s --check-prefixes=SLM |
10 | 12 |
|
11 | 13 | ;
|
12 | 14 | ; bswap(X)
|
@@ -68,6 +70,13 @@ define void @cost_bswap_i64(i64 %a64, <2 x i64> %a128, <4 x i64> %a256, <8 x i64
|
68 | 70 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I64 = call <4 x i64> @llvm.bswap.v4i64(<4 x i64> %a256)
|
69 | 71 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I64 = call <8 x i64> @llvm.bswap.v8i64(<8 x i64> %a512)
|
70 | 72 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
|
| 73 | +; |
| 74 | +; SLM-LABEL: 'cost_bswap_i64' |
| 75 | +; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %I64 = call i64 @llvm.bswap.i64(i64 %a64) |
| 76 | +; SLM-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V2I64 = call <2 x i64> @llvm.bswap.v2i64(<2 x i64> %a128) |
| 77 | +; SLM-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V4I64 = call <4 x i64> @llvm.bswap.v4i64(<4 x i64> %a256) |
| 78 | +; SLM-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V8I64 = call <8 x i64> @llvm.bswap.v8i64(<8 x i64> %a512) |
| 79 | +; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void |
71 | 80 | ;
|
72 | 81 | %I64 = call i64 @llvm.bswap.i64(i64 %a64)
|
73 | 82 | %V2I64 = call <2 x i64> @llvm.bswap.v2i64(<2 x i64> %a128)
|
@@ -132,6 +141,13 @@ define void @cost_bswap_i32(i32 %a32, <4 x i32> %a128, <8 x i32> %a256, <16 x i3
|
132 | 141 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I32 = call <8 x i32> @llvm.bswap.v8i32(<8 x i32> %a256)
|
133 | 142 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I32 = call <16 x i32> @llvm.bswap.v16i32(<16 x i32> %a512)
|
134 | 143 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
|
| 144 | +; |
| 145 | +; SLM-LABEL: 'cost_bswap_i32' |
| 146 | +; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = call i32 @llvm.bswap.i32(i32 %a32) |
| 147 | +; SLM-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V2I32 = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> %a128) |
| 148 | +; SLM-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V4I32 = call <8 x i32> @llvm.bswap.v8i32(<8 x i32> %a256) |
| 149 | +; SLM-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V8I32 = call <16 x i32> @llvm.bswap.v16i32(<16 x i32> %a512) |
| 150 | +; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void |
135 | 151 | ;
|
136 | 152 | %I32 = call i32 @llvm.bswap.i32(i32 %a32)
|
137 | 153 | %V2I32 = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> %a128)
|
@@ -196,6 +212,13 @@ define void @cost_bswap_i16(i16 %a16, <8 x i16> %a128, <16 x i16> %a256, <32 x i
|
196 | 212 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16I16 = call <16 x i16> @llvm.bswap.v16i16(<16 x i16> %a256)
|
197 | 213 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V32I16 = call <32 x i16> @llvm.bswap.v32i16(<32 x i16> %a512)
|
198 | 214 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
|
| 215 | +; |
| 216 | +; SLM-LABEL: 'cost_bswap_i16' |
| 217 | +; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %I16 = call i16 @llvm.bswap.i16(i16 %a16) |
| 218 | +; SLM-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V8I16 = call <8 x i16> @llvm.bswap.v8i16(<8 x i16> %a128) |
| 219 | +; SLM-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V16I16 = call <16 x i16> @llvm.bswap.v16i16(<16 x i16> %a256) |
| 220 | +; SLM-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V32I16 = call <32 x i16> @llvm.bswap.v32i16(<32 x i16> %a512) |
| 221 | +; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void |
199 | 222 | ;
|
200 | 223 | %I16 = call i16 @llvm.bswap.i16(i16 %a16)
|
201 | 224 | %V8I16 = call <8 x i16> @llvm.bswap.v8i16(<8 x i16> %a128)
|
|
0 commit comments