1; RUN: opt < %s -cost-model -analyze -mcpu=kryo | FileCheck %s 2 3target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128" 4target triple = "aarch64--linux-gnu" 5 6; CHECK-LABEL: vectorInstrCost 7define void @vectorInstrCost() { 8 9 ; Vector extracts - extracting the first element should have a zero cost; 10 ; all other elements should have a cost of two. 11 ; 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 16 17 ; Vector inserts - inserting the first element should have a zero cost; all 18 ; other elements should have a cost of two. 19 ; 20 ; CHECK: cost of 0 {{.*}} insertelement <2 x i64> undef, i64 undef, i32 0 21 ; CHECK: cost of 2 {{.*}} insertelement <2 x i64> undef, i64 undef, i32 1 22 %t3 = insertelement <2 x i64> undef, i64 undef, i32 0 23 %t4 = insertelement <2 x i64> undef, i64 undef, i32 1 24 25 ret void 26} 27