1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 -mattr=+sse2,+mmx | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; originally from PR2687, but things don't work that way any more. 3*9880d681SAndroid Build Coastguard Worker; there are no MMX instructions here; we use XMM. 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Workerdefine <2 x double> @a(<2 x i32> %x) nounwind { 6*9880d681SAndroid Build Coastguard Workerentry: 7*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: a 8*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: unpcklpd 9*9880d681SAndroid Build Coastguard Worker %y = sitofp <2 x i32> %x to <2 x double> 10*9880d681SAndroid Build Coastguard Worker ret <2 x double> %y 11*9880d681SAndroid Build Coastguard Worker} 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Workerdefine <2 x i32> @b(<2 x double> %x) nounwind { 14*9880d681SAndroid Build Coastguard Workerentry: 15*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: b 16*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: unpckhpd 17*9880d681SAndroid Build Coastguard Worker %y = fptosi <2 x double> %x to <2 x i32> 18*9880d681SAndroid Build Coastguard Worker ret <2 x i32> %y 19*9880d681SAndroid Build Coastguard Worker} 20*9880d681SAndroid Build Coastguard Worker 21*9880d681SAndroid Build Coastguard Worker; This is how to get MMX instructions. 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Workerdefine <2 x double> @a2(x86_mmx %x) nounwind { 24*9880d681SAndroid Build Coastguard Workerentry: 25*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: a2 26*9880d681SAndroid Build Coastguard Worker; CHECK: cvtpi2pd 27*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: cvtpi2pd 28*9880d681SAndroid Build Coastguard Worker %y = tail call <2 x double> @llvm.x86.sse.cvtpi2pd(x86_mmx %x) 29*9880d681SAndroid Build Coastguard Worker ret <2 x double> %y 30*9880d681SAndroid Build Coastguard Worker} 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Workerdefine x86_mmx @b2(<2 x double> %x) nounwind { 33*9880d681SAndroid Build Coastguard Workerentry: 34*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: b2 35*9880d681SAndroid Build Coastguard Worker; CHECK: cvttpd2pi 36*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: cvttpd2pi 37*9880d681SAndroid Build Coastguard Worker %y = tail call x86_mmx @llvm.x86.sse.cvttpd2pi (<2 x double> %x) 38*9880d681SAndroid Build Coastguard Worker ret x86_mmx %y 39*9880d681SAndroid Build Coastguard Worker} 40*9880d681SAndroid Build Coastguard Worker 41*9880d681SAndroid Build Coastguard Workerdeclare <2 x double> @llvm.x86.sse.cvtpi2pd(x86_mmx) 42*9880d681SAndroid Build Coastguard Workerdeclare x86_mmx @llvm.x86.sse.cvttpd2pi(<2 x double>) 43