1; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -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 elements should have a cost of two. 10 ; 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 15 16 ; Vector inserts - inserting elements should have a cost of two. 17 ; 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 22 23 ret void 24} 25