1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=pentium4 | FileCheck --check-prefix=CHECK --check-prefix=SSE --check-prefix=SSE2 %s 2*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=yonah | FileCheck --check-prefix=CHECK --check-prefix=SSE --check-prefix=SSE3 %s 3*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=core2 | FileCheck --check-prefix=CHECK --check-prefix=SSE --check-prefix=SSSE3 %s 4*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=penryn | FileCheck --check-prefix=CHECK --check-prefix=SSE --check-prefix=SSE41 %s 5*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7 | FileCheck --check-prefix=CHECK --check-prefix=SSE --check-prefix=SSE42 %s 6*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx | FileCheck --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX1 %s 7*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=core-avx2 | FileCheck --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX2 %s 8*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=knl | FileCheck --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX512 %s 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Workertarget 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" 11*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-apple-macosx10.8.0" 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Workerdefine i32 @cmp(i32 %arg) { 14*9880d681SAndroid Build Coastguard Worker ; -- floats -- 15*9880d681SAndroid Build Coastguard Worker ;SSE2: cost of 3 {{.*}} fcmp 16*9880d681SAndroid Build Coastguard Worker ;SSE3: cost of 3 {{.*}} fcmp 17*9880d681SAndroid Build Coastguard Worker ;SSSE3: cost of 3 {{.*}} fcmp 18*9880d681SAndroid Build Coastguard Worker ;SSE41: cost of 3 {{.*}} fcmp 19*9880d681SAndroid Build Coastguard Worker ;SSE42: cost of 1 {{.*}} fcmp 20*9880d681SAndroid Build Coastguard Worker ;AVX: cost of 1 {{.*}} fcmp 21*9880d681SAndroid Build Coastguard Worker %A = fcmp olt <2 x float> undef, undef 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Worker ;SSE2: cost of 7 {{.*}} fcmp 24*9880d681SAndroid Build Coastguard Worker ;SSE3: cost of 7 {{.*}} fcmp 25*9880d681SAndroid Build Coastguard Worker ;SSSE3: cost of 7 {{.*}} fcmp 26*9880d681SAndroid Build Coastguard Worker ;SSE41: cost of 7 {{.*}} fcmp 27*9880d681SAndroid Build Coastguard Worker ;SSE42: cost of 1 {{.*}} fcmp 28*9880d681SAndroid Build Coastguard Worker ;AVX: cost of 1 {{.*}} fcmp 29*9880d681SAndroid Build Coastguard Worker %B = fcmp olt <4 x float> undef, undef 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Worker ;SSE2: cost of 14 {{.*}} fcmp 32*9880d681SAndroid Build Coastguard Worker ;SSE3: cost of 14 {{.*}} fcmp 33*9880d681SAndroid Build Coastguard Worker ;SSSE3: cost of 14 {{.*}} fcmp 34*9880d681SAndroid Build Coastguard Worker ;SSE41: cost of 14 {{.*}} fcmp 35*9880d681SAndroid Build Coastguard Worker ;SSE42: cost of 2 {{.*}} fcmp 36*9880d681SAndroid Build Coastguard Worker ;AVX: cost of 1 {{.*}} fcmp 37*9880d681SAndroid Build Coastguard Worker %C = fcmp olt <8 x float> undef, undef 38*9880d681SAndroid Build Coastguard Worker 39*9880d681SAndroid Build Coastguard Worker ;SSE2: cost of 3 {{.*}} fcmp 40*9880d681SAndroid Build Coastguard Worker ;SSE3: cost of 3 {{.*}} fcmp 41*9880d681SAndroid Build Coastguard Worker ;SSSE3: cost of 3 {{.*}} fcmp 42*9880d681SAndroid Build Coastguard Worker ;SSE41: cost of 3 {{.*}} fcmp 43*9880d681SAndroid Build Coastguard Worker ;SSE42: cost of 1 {{.*}} fcmp 44*9880d681SAndroid Build Coastguard Worker ;AVX: cost of 1 {{.*}} fcmp 45*9880d681SAndroid Build Coastguard Worker %D = fcmp olt <2 x double> undef, undef 46*9880d681SAndroid Build Coastguard Worker 47*9880d681SAndroid Build Coastguard Worker ;SSE2: cost of 6 {{.*}} fcmp 48*9880d681SAndroid Build Coastguard Worker ;SSE3: cost of 6 {{.*}} fcmp 49*9880d681SAndroid Build Coastguard Worker ;SSSE3: cost of 6 {{.*}} fcmp 50*9880d681SAndroid Build Coastguard Worker ;SSE41: cost of 6 {{.*}} fcmp 51*9880d681SAndroid Build Coastguard Worker ;SSE42: cost of 2 {{.*}} fcmp 52*9880d681SAndroid Build Coastguard Worker ;AVX: cost of 1 {{.*}} fcmp 53*9880d681SAndroid Build Coastguard Worker %E = fcmp olt <4 x double> undef, undef 54*9880d681SAndroid Build Coastguard Worker 55*9880d681SAndroid Build Coastguard Worker ; AVX512: cost of 1 {{.*}} %E1 = fcmp 56*9880d681SAndroid Build Coastguard Worker %E1 = fcmp olt <16 x float> undef, undef 57*9880d681SAndroid Build Coastguard Worker 58*9880d681SAndroid Build Coastguard Worker ; AVX512: cost of 1 {{.*}} %E2 = fcmp 59*9880d681SAndroid Build Coastguard Worker %E2 = fcmp olt <8 x double> undef, undef 60*9880d681SAndroid Build Coastguard Worker 61*9880d681SAndroid Build Coastguard Worker ; AVX512: cost of 2 {{.*}} %E3 = fcmp 62*9880d681SAndroid Build Coastguard Worker %E3 = fcmp olt <16 x double> undef, undef 63*9880d681SAndroid Build Coastguard Worker 64*9880d681SAndroid Build Coastguard Worker ; -- integers -- 65*9880d681SAndroid Build Coastguard Worker 66*9880d681SAndroid Build Coastguard Worker ;SSE2: cost of 1 {{.*}} icmp 67*9880d681SAndroid Build Coastguard Worker ;SSE3: cost of 1 {{.*}} icmp 68*9880d681SAndroid Build Coastguard Worker ;SSSE3: cost of 1 {{.*}} icmp 69*9880d681SAndroid Build Coastguard Worker ;SSE41: cost of 1 {{.*}} icmp 70*9880d681SAndroid Build Coastguard Worker ;SSE42: cost of 1 {{.*}} icmp 71*9880d681SAndroid Build Coastguard Worker ;AVX: cost of 1 {{.*}} icmp 72*9880d681SAndroid Build Coastguard Worker %F = icmp eq <16 x i8> undef, undef 73*9880d681SAndroid Build Coastguard Worker 74*9880d681SAndroid Build Coastguard Worker ;SSE2: cost of 1 {{.*}} icmp 75*9880d681SAndroid Build Coastguard Worker ;SSE3: cost of 1 {{.*}} icmp 76*9880d681SAndroid Build Coastguard Worker ;SSSE3: cost of 1 {{.*}} icmp 77*9880d681SAndroid Build Coastguard Worker ;SSE41: cost of 1 {{.*}} icmp 78*9880d681SAndroid Build Coastguard Worker ;SSE42: cost of 1 {{.*}} icmp 79*9880d681SAndroid Build Coastguard Worker ;AVX: cost of 1 {{.*}} icmp 80*9880d681SAndroid Build Coastguard Worker %G = icmp eq <8 x i16> undef, undef 81*9880d681SAndroid Build Coastguard Worker 82*9880d681SAndroid Build Coastguard Worker ;SSE2: cost of 1 {{.*}} icmp 83*9880d681SAndroid Build Coastguard Worker ;SSE3: cost of 1 {{.*}} icmp 84*9880d681SAndroid Build Coastguard Worker ;SSSE3: cost of 1 {{.*}} icmp 85*9880d681SAndroid Build Coastguard Worker ;SSE41: cost of 1 {{.*}} icmp 86*9880d681SAndroid Build Coastguard Worker ;SSE42: cost of 1 {{.*}} icmp 87*9880d681SAndroid Build Coastguard Worker ;AVX: cost of 1 {{.*}} icmp 88*9880d681SAndroid Build Coastguard Worker %H = icmp eq <4 x i32> undef, undef 89*9880d681SAndroid Build Coastguard Worker 90*9880d681SAndroid Build Coastguard Worker ;SSE2: cost of 8 {{.*}} icmp 91*9880d681SAndroid Build Coastguard Worker ;SSE3: cost of 8 {{.*}} icmp 92*9880d681SAndroid Build Coastguard Worker ;SSSE3: cost of 8 {{.*}} icmp 93*9880d681SAndroid Build Coastguard Worker ;SSE41: cost of 8 {{.*}} icmp 94*9880d681SAndroid Build Coastguard Worker ;SSE42: cost of 1 {{.*}} icmp 95*9880d681SAndroid Build Coastguard Worker ;AVX: cost of 1 {{.*}} icmp 96*9880d681SAndroid Build Coastguard Worker %I = icmp eq <2 x i64> undef, undef 97*9880d681SAndroid Build Coastguard Worker 98*9880d681SAndroid Build Coastguard Worker ;SSE2: cost of 16 {{.*}} icmp 99*9880d681SAndroid Build Coastguard Worker ;SSE3: cost of 16 {{.*}} icmp 100*9880d681SAndroid Build Coastguard Worker ;SSSE3: cost of 16 {{.*}} icmp 101*9880d681SAndroid Build Coastguard Worker ;SSE41: cost of 16 {{.*}} icmp 102*9880d681SAndroid Build Coastguard Worker ;SSE42: cost of 2 {{.*}} icmp 103*9880d681SAndroid Build Coastguard Worker ;AVX1: cost of 4 {{.*}} icmp 104*9880d681SAndroid Build Coastguard Worker ;AVX2: cost of 1 {{.*}} icmp 105*9880d681SAndroid Build Coastguard Worker %J = icmp eq <4 x i64> undef, undef 106*9880d681SAndroid Build Coastguard Worker 107*9880d681SAndroid Build Coastguard Worker ;SSE2: cost of 2 {{.*}} icmp 108*9880d681SAndroid Build Coastguard Worker ;SSE3: cost of 2 {{.*}} icmp 109*9880d681SAndroid Build Coastguard Worker ;SSSE3: cost of 2 {{.*}} icmp 110*9880d681SAndroid Build Coastguard Worker ;SSE41: cost of 2 {{.*}} icmp 111*9880d681SAndroid Build Coastguard Worker ;SSE42: cost of 2 {{.*}} icmp 112*9880d681SAndroid Build Coastguard Worker ;AVX1: cost of 4 {{.*}} icmp 113*9880d681SAndroid Build Coastguard Worker ;AVX2: cost of 1 {{.*}} icmp 114*9880d681SAndroid Build Coastguard Worker %K = icmp eq <8 x i32> undef, undef 115*9880d681SAndroid Build Coastguard Worker 116*9880d681SAndroid Build Coastguard Worker ;SSE2: cost of 2 {{.*}} icmp 117*9880d681SAndroid Build Coastguard Worker ;SSE3: cost of 2 {{.*}} icmp 118*9880d681SAndroid Build Coastguard Worker ;SSSE3: cost of 2 {{.*}} icmp 119*9880d681SAndroid Build Coastguard Worker ;SSE41: cost of 2 {{.*}} icmp 120*9880d681SAndroid Build Coastguard Worker ;SSE42: cost of 2 {{.*}} icmp 121*9880d681SAndroid Build Coastguard Worker ;AVX1: cost of 4 {{.*}} icmp 122*9880d681SAndroid Build Coastguard Worker ;AVX2: cost of 1 {{.*}} icmp 123*9880d681SAndroid Build Coastguard Worker %L = icmp eq <16 x i16> undef, undef 124*9880d681SAndroid Build Coastguard Worker 125*9880d681SAndroid Build Coastguard Worker ;SSE2: cost of 2 {{.*}} icmp 126*9880d681SAndroid Build Coastguard Worker ;SSE3: cost of 2 {{.*}} icmp 127*9880d681SAndroid Build Coastguard Worker ;SSSE3: cost of 2 {{.*}} icmp 128*9880d681SAndroid Build Coastguard Worker ;SSE41: cost of 2 {{.*}} icmp 129*9880d681SAndroid Build Coastguard Worker ;SSE42: cost of 2 {{.*}} icmp 130*9880d681SAndroid Build Coastguard Worker ;AVX1: cost of 4 {{.*}} icmp 131*9880d681SAndroid Build Coastguard Worker ;AVX2: cost of 1 {{.*}} icmp 132*9880d681SAndroid Build Coastguard Worker %M = icmp eq <32 x i8> undef, undef 133*9880d681SAndroid Build Coastguard Worker 134*9880d681SAndroid Build Coastguard Worker ; AVX512: cost of 1 {{.*}} %M1 = icmp 135*9880d681SAndroid Build Coastguard Worker %M1 = icmp eq <16 x i32> undef, undef 136*9880d681SAndroid Build Coastguard Worker 137*9880d681SAndroid Build Coastguard Worker ; AVX512: cost of 1 {{.*}} %M2 = icmp 138*9880d681SAndroid Build Coastguard Worker %M2 = icmp eq <8 x i64> undef, undef 139*9880d681SAndroid Build Coastguard Worker 140*9880d681SAndroid Build Coastguard Worker ; AVX512: cost of 2 {{.*}} %M3 = icmp 141*9880d681SAndroid Build Coastguard Worker %M3 = icmp eq <16 x i64> undef, undef 142*9880d681SAndroid Build Coastguard Worker 143*9880d681SAndroid Build Coastguard Worker ;CHECK: cost of 0 {{.*}} ret 144*9880d681SAndroid Build Coastguard Worker ret i32 undef 145*9880d681SAndroid Build Coastguard Worker} 146*9880d681SAndroid Build Coastguard Worker 147*9880d681SAndroid Build Coastguard Worker 148