brintos

brintos / llvm-project-archived public Read only

0
0
Text · 928 B · ca1e665 Raw
25 lines · plain
1; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mcpu=kryo | FileCheck %s2 3target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"4target triple = "aarch64--linux-gnu"5 6; CHECK-LABEL: vectorInstrCost7define 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 012    ; CHECK: cost of 2 {{.*}} extractelement <2 x i64> undef, i32 113    %t1 = extractelement <2 x i64> undef, i32 014    %t2 = extractelement <2 x i64> undef, i32 115 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 019    ; CHECK: cost of 2 {{.*}} insertelement <2 x i64> poison, i64 undef, i32 120    %t3 = insertelement <2 x i64> poison, i64 undef, i32 021    %t4 = insertelement <2 x i64> poison, i64 undef, i32 122 23    ret void24}25