41 lines · plain
1; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx | FileCheck %s2 3target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"4target triple = "x86_64-apple-macosx10.8.0"5 6define i32 @insert-extract-at-zero-idx(i32 %arg, float %fl) {7 ;CHECK: cost of 0 {{.*}} extract8 %A = extractelement <4 x float> undef, i32 09 ;CHECK: cost of 1 {{.*}} extract10 %B = extractelement <4 x i32> undef, i32 011 ;CHECK: cost of 1 {{.*}} extract12 %C = extractelement <4 x float> undef, i32 113 14 ;CHECK: cost of 0 {{.*}} extract15 %D = extractelement <8 x float> undef, i32 016 ;CHECK: cost of 1 {{.*}} extract17 %E = extractelement <8 x float> undef, i32 118 19 ;CHECK: cost of 3 {{.*}} extract20 %F = extractelement <8 x float> undef, i32 %arg21 22 ;CHECK: cost of 0 {{.*}} insert23 %G = insertelement <4 x float> undef, float %fl, i32 024 ;CHECK: cost of 1 {{.*}} insert25 %H = insertelement <4 x float> undef, float %fl, i32 126 ;CHECK: cost of 1 {{.*}} insert27 %I = insertelement <4 x i32> undef, i32 %arg, i32 028 29 ;CHECK: cost of 0 {{.*}} insert30 %J = insertelement <4 x double> undef, double undef, i32 031 32 ;CHECK: cost of 0 {{.*}} insert33 %K = insertelement <8 x double> undef, double undef, i32 434 ;CHECK: cost of 0 {{.*}} insert35 %L = insertelement <16 x double> undef, double undef, i32 836 ;CHECK: cost of 1 {{.*}} insert37 %M = insertelement <16 x double> undef, double undef, i32 938 ret i32 039}40 41