1*9880d681SAndroid Build Coastguard Worker; RUN: opt -mtriple=x86_64-apple-darwin -mcpu=core2 -cost-model -analyze < %s | FileCheck --check-prefix=SSE2 %s 2*9880d681SAndroid Build Coastguard Worker; RUN: opt -mtriple=x86_64-apple-darwin -mcpu=core-avx2 -cost-model -analyze < %s | FileCheck --check-prefix=AVX2 %s 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Workerdefine void @div_sse() { 6*9880d681SAndroid Build Coastguard Worker ; SSE2: div_sse 7*9880d681SAndroid Build Coastguard Worker ; SSE2: cost of 320 {{.*}} sdiv 8*9880d681SAndroid Build Coastguard Worker %a0 = sdiv <16 x i8> undef, undef 9*9880d681SAndroid Build Coastguard Worker ; SSE2: cost of 160 {{.*}} sdiv 10*9880d681SAndroid Build Coastguard Worker %a1 = sdiv <8 x i16> undef, undef 11*9880d681SAndroid Build Coastguard Worker ; SSE2: cost of 80 {{.*}} sdiv 12*9880d681SAndroid Build Coastguard Worker %a2 = sdiv <4 x i32> undef, undef 13*9880d681SAndroid Build Coastguard Worker ; SSE2: cost of 40 {{.*}} sdiv 14*9880d681SAndroid Build Coastguard Worker %a3 = sdiv <2 x i32> undef, undef 15*9880d681SAndroid Build Coastguard Worker ret void 16*9880d681SAndroid Build Coastguard Worker} 17*9880d681SAndroid Build Coastguard Worker; SSE2: div_avx 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Workerdefine void @div_avx() { 20*9880d681SAndroid Build Coastguard Worker ; AVX2: div_avx 21*9880d681SAndroid Build Coastguard Worker ; AVX2: cost of 640 {{.*}} sdiv 22*9880d681SAndroid Build Coastguard Worker %a0 = sdiv <32 x i8> undef, undef 23*9880d681SAndroid Build Coastguard Worker ; AVX2: cost of 320 {{.*}} sdiv 24*9880d681SAndroid Build Coastguard Worker %a1 = sdiv <16 x i16> undef, undef 25*9880d681SAndroid Build Coastguard Worker ; AVX2: cost of 160 {{.*}} sdiv 26*9880d681SAndroid Build Coastguard Worker %a2 = sdiv <8 x i32> undef, undef 27*9880d681SAndroid Build Coastguard Worker ; AVX2: cost of 80 {{.*}} sdiv 28*9880d681SAndroid Build Coastguard Worker %a3 = sdiv <4 x i32> undef, undef 29*9880d681SAndroid Build Coastguard Worker ret void 30*9880d681SAndroid Build Coastguard Worker} 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Worker 33