1 ; RUN: opt -cost-model -analyze -mtriple=aarch64--linux-gnu -mattr=+sve < %s | FileCheck %s
3 ; This regression test is verifying that a GEP instruction performed on a
4 ; scalable vector does not produce a 'assumption that TypeSize is not scalable'
5 ; warning when performing cost analysis.
7 ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %retval = getelementptr
8 define <vscale x 16 x i8>* @gep_scalable_vector(<vscale x 16 x i8>* %ptr) {
9 %retval = getelementptr <vscale x 16 x i8>, <vscale x 16 x i8>* %ptr, i32 2
10 ret <vscale x 16 x i8>* %retval