source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/CostModel/X86/insert-extract-at-zero.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 1.5 KB
Line 
1; RUN: opt < %s  -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx | FileCheck %s
2
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 {{.*}} extract
8  %A = extractelement <4 x float> undef, i32 0
9  ;CHECK: cost of 1 {{.*}} extract
10  %B = extractelement <4 x i32> undef, i32 0
11  ;CHECK: cost of 1 {{.*}} extract
12  %C = extractelement <4 x float> undef, i32 1
13
14  ;CHECK: cost of 0 {{.*}} extract
15  %D = extractelement <8 x float> undef, i32 0
16  ;CHECK: cost of 1 {{.*}} extract
17  %E = extractelement <8 x float> undef, i32 1
18
19  ;CHECK: cost of 1 {{.*}} extract
20  %F = extractelement <8 x float> undef, i32 %arg
21
22  ;CHECK: cost of 0 {{.*}} insert
23  %G = insertelement <4 x float> undef, float %fl, i32 0
24  ;CHECK: cost of 1 {{.*}} insert
25  %H = insertelement <4 x float> undef, float %fl, i32 1
26  ;CHECK: cost of 1 {{.*}} insert
27  %I = insertelement <4 x i32> undef, i32 %arg, i32 0
28
29  ;CHECK: cost of 0 {{.*}} insert
30  %J = insertelement <4 x double> undef, double undef, i32 0
31
32  ;CHECK: cost of 0 {{.*}} insert
33  %K = insertelement <8 x double> undef, double undef, i32 4
34  ;CHECK: cost of 0 {{.*}} insert
35  %L = insertelement <16 x double> undef, double undef, i32 8
36  ;CHECK: cost of 1 {{.*}} insert
37  %M = insertelement <16 x double> undef, double undef, i32 9
38  ret i32 0
39}
40
Note: See TracBrowser for help on using the repository browser.