1 ; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx | FileCheck %s
3 target 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"
4 target triple = "x86_64-apple-macosx10.8.0"
6 define i32 @add(i32 %arg) {
7 ;CHECK: cost of 1 {{.*}} add
8 %A = add <4 x i32> undef, undef
9 ;CHECK: cost of 4 {{.*}} add
10 %B = add <8 x i32> undef, undef
11 ;CHECK: cost of 1 {{.*}} add
12 %C = add <2 x i64> undef, undef
13 ;CHECK: cost of 4 {{.*}} add
14 %D = add <4 x i64> undef, undef
15 ;CHECK: cost of 8 {{.*}} add
16 %E = add <8 x i64> undef, undef
17 ;CHECK: cost of 0 {{.*}} ret
22 define i32 @xor(i32 %arg) {
23 ;CHECK: cost of 1 {{.*}} xor
24 %A = xor <4 x i32> undef, undef
25 ;CHECK: cost of 1 {{.*}} xor
26 %B = xor <8 x i32> undef, undef
27 ;CHECK: cost of 1 {{.*}} xor
28 %C = xor <2 x i64> undef, undef
29 ;CHECK: cost of 1 {{.*}} xor
30 %D = xor <4 x i64> undef, undef
31 ;CHECK: cost of 0 {{.*}} ret
36 define i32 @fmul(i32 %arg) {
37 ;CHECK: cost of 1 {{.*}} fmul
38 %A = fmul <4 x float> undef, undef
39 ;CHECK: cost of 1 {{.*}} fmul
40 %B = fmul <8 x float> undef, undef