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: cvtdq2pd %xmm0, %xmm0
13 %y = sitofp <2 x i32> %x to <2 x double>
17 define <2 x i32> @b(<2 x double> %x) nounwind {
19 ; CHECK: # %bb.0: # %entry
20 ; CHECK-NEXT: cvttpd2dq %xmm0, %xmm0
23 %y = fptosi <2 x double> %x to <2 x i32>
27 ; This is how to get MMX instructions.
29 define <2 x double> @a2(x86_mmx %x) nounwind {
31 ; CHECK: # %bb.0: # %entry
32 ; CHECK-NEXT: cvtpi2pd %mm0, %xmm0
35 %y = tail call <2 x double> @llvm.x86.sse.cvtpi2pd(x86_mmx %x)
39 define x86_mmx @b2(<2 x double> %x) nounwind {
41 ; CHECK: # %bb.0: # %entry
42 ; CHECK-NEXT: cvttpd2pi %xmm0, %mm0
45 %y = tail call x86_mmx @llvm.x86.sse.cvttpd2pi (<2 x double> %x)
49 declare <2 x double> @llvm.x86.sse.cvtpi2pd(x86_mmx)
50 declare x86_mmx @llvm.x86.sse.cvttpd2pi(<2 x double>)