1 ; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -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 elements should have a cost of two.
11 ; CHECK: cost of 2 {{.*}} extractelement <2 x i64> undef, i32 0
12 ; CHECK: cost of 2 {{.*}} extractelement <2 x i64> undef, i32 1
13 %t1 = extractelement <2 x i64> undef, i32 0
14 %t2 = extractelement <2 x i64> undef, i32 1
16 ; Vector inserts - inserting elements should have a cost of two.
18 ; CHECK: cost of 2 {{.*}} insertelement <2 x i64> poison, i64 undef, i32 0
19 ; CHECK: cost of 2 {{.*}} insertelement <2 x i64> poison, i64 undef, i32 1
20 %t3 = insertelement <2 x i64> poison, i64 undef, i32 0
21 %t4 = insertelement <2 x i64> poison, i64 undef, i32 1