1 ; RUN: opt < %s -cost-model -analyze -mcpu=kryo | FileCheck %s
3 target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
4 target triple = "aarch64--linux-gnu"
6 ; CHECK-LABEL: vectorInstrCost
7 define void @vectorInstrCost() {
9 ; Vector extracts - extracting the first element should have a zero cost;
10 ; all other elements should have a cost of two.
12 ; CHECK: cost of 0 {{.*}} extractelement <2 x i64> undef, i32 0
13 ; CHECK: cost of 2 {{.*}} extractelement <2 x i64> undef, i32 1
14 %t1 = extractelement <2 x i64> undef, i32 0
15 %t2 = extractelement <2 x i64> undef, i32 1
17 ; Vector inserts - inserting the first element should have a zero cost; all
18 ; other elements should have a cost of two.
20 ; CHECK: cost of 0 {{.*}} insertelement <2 x i64> poison, i64 undef, i32 0
21 ; CHECK: cost of 2 {{.*}} insertelement <2 x i64> poison, i64 undef, i32 1
22 %t3 = insertelement <2 x i64> poison, i64 undef, i32 0
23 %t4 = insertelement <2 x i64> poison, i64 undef, i32 1