1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown -mattr=+sse2,+mmx | FileCheck %s
4 ; Originally from PR2687, but things don't work that way any more.
5 ; there are no MMX instructions here; we use XMM.
7 define <2 x double> @a(<2 x i32> %x) nounwind {
9 ; CHECK: # %bb.0: # %entry
10 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
11 ; CHECK-NEXT: cvtdq2pd %xmm0, %xmm0
14 %y = sitofp <2 x i32> %x to <2 x double>
18 define <2 x i32> @b(<2 x double> %x) nounwind {
20 ; CHECK: # %bb.0: # %entry
21 ; CHECK-NEXT: cvttpd2dq %xmm0, %xmm0
22 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,1,1,3]
25 %y = fptosi <2 x double> %x to <2 x i32>
29 ; This is how to get MMX instructions.
31 define <2 x double> @a2(x86_mmx %x) nounwind {
33 ; CHECK: # %bb.0: # %entry
34 ; CHECK-NEXT: cvtpi2pd %mm0, %xmm0
37 %y = tail call <2 x double> @llvm.x86.sse.cvtpi2pd(x86_mmx %x)
41 define x86_mmx @b2(<2 x double> %x) nounwind {
43 ; CHECK: # %bb.0: # %entry
44 ; CHECK-NEXT: cvttpd2pi %xmm0, %mm0
47 %y = tail call x86_mmx @llvm.x86.sse.cvttpd2pi (<2 x double> %x)
51 declare <2 x double> @llvm.x86.sse.cvtpi2pd(x86_mmx)
52 declare x86_mmx @llvm.x86.sse.cvttpd2pi(<2 x double>)