|
7 | 7 |
|
8 | 8 | target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" |
9 | 9 |
|
10 | | -define ptr @gep_scalable_vector(ptr %ptr) { |
11 | | -; CHECK-LABEL: 'gep_scalable_vector' |
12 | | -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %retval = getelementptr <vscale x 16 x i8>, ptr %ptr, i32 2 |
13 | | -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret ptr %retval |
| 10 | +define void @gep_scalable_types(ptr %ptr) { |
| 11 | +; CHECK-LABEL: 'gep_scalable_types' |
| 12 | +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %gep1 = getelementptr <vscale x 16 x i8>, ptr %ptr, i32 2 |
| 13 | +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %gep2 = getelementptr [2 x <vscale x 16 x i8>], ptr %ptr, i32 2 |
| 14 | +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %gep3 = getelementptr target("aarch64.svcount"), ptr %ptr, i32 2 |
| 15 | +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %gep4 = getelementptr [2 x target("aarch64.svcount")], ptr %ptr, i32 2 |
| 16 | +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void |
14 | 17 | ; |
15 | | - %retval = getelementptr <vscale x 16 x i8>, ptr %ptr, i32 2 |
16 | | - ret ptr %retval |
| 18 | + %gep1 = getelementptr <vscale x 16 x i8>, ptr %ptr, i32 2 |
| 19 | + %gep2 = getelementptr [2 x <vscale x 16 x i8>], ptr %ptr, i32 2 |
| 20 | + %gep3 = getelementptr target("aarch64.svcount"), ptr %ptr, i32 2 |
| 21 | + %gep4 = getelementptr [2 x target("aarch64.svcount")], ptr %ptr, i32 2 |
| 22 | + ret void |
17 | 23 | } |
18 | 24 |
|
19 | 25 | define ptr @sext_gep(ptr %p, i32 %a) { |
|
0 commit comments