• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
12define <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}
16