Joe Ellis | 0383a1a | 2020-10-26 17:40:17 +0000 | [diff] [blame] | 1 | ; RUN: opt -cost-model -analyze -mtriple=aarch64--linux-gnu -mattr=+sve < %s 2>%t | FileCheck %s |
| 2 | ; RUN: FileCheck --check-prefix=WARN --allow-empty %s < %t |
| 3 | |
| 4 | ; This regression test is verifying that a GEP instruction performed on a |
| 5 | ; scalable vector does not produce a 'assumption that TypeSize is not scalable' |
| 6 | ; warning when performing cost analysis. |
| 7 | |
| 8 | ; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it. |
| 9 | ; WARN-NOT: warning: {{.*}}TypeSize is not scalable |
| 10 | |
| 11 | ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %retval = getelementptr |
| 12 | define <vscale x 16 x i8>* @gep_scalable_vector(<vscale x 16 x i8>* %ptr) { |
| 13 | %retval = getelementptr <vscale x 16 x i8>, <vscale x 16 x i8>* %ptr, i32 2 |
| 14 | ret <vscale x 16 x i8>* %retval |
| 15 | } |