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