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 3 4; Originally from PR2687, but things don't work that way any more. 5; there are no MMX instructions here; we use XMM. 6 7define <2 x double> @a(<2 x i32> %x) nounwind { 8; CHECK-LABEL: a: 9; CHECK: # %bb.0: # %entry 10; CHECK-NEXT: cvtdq2pd %xmm0, %xmm0 11; CHECK-NEXT: retl 12entry: 13 %y = sitofp <2 x i32> %x to <2 x double> 14 ret <2 x double> %y 15} 16 17define <2 x i32> @b(<2 x double> %x) nounwind { 18; CHECK-LABEL: b: 19; CHECK: # %bb.0: # %entry 20; CHECK-NEXT: cvttpd2dq %xmm0, %xmm0 21; CHECK-NEXT: retl 22entry: 23 %y = fptosi <2 x double> %x to <2 x i32> 24 ret <2 x i32> %y 25} 26 27; This is how to get MMX instructions. 28 29define <2 x double> @a2(x86_mmx %x) nounwind { 30; CHECK-LABEL: a2: 31; CHECK: # %bb.0: # %entry 32; CHECK-NEXT: cvtpi2pd %mm0, %xmm0 33; CHECK-NEXT: retl 34entry: 35 %y = tail call <2 x double> @llvm.x86.sse.cvtpi2pd(x86_mmx %x) 36 ret <2 x double> %y 37} 38 39define x86_mmx @b2(<2 x double> %x) nounwind { 40; CHECK-LABEL: b2: 41; CHECK: # %bb.0: # %entry 42; CHECK-NEXT: cvttpd2pi %xmm0, %mm0 43; CHECK-NEXT: retl 44entry: 45 %y = tail call x86_mmx @llvm.x86.sse.cvttpd2pi (<2 x double> %x) 46 ret x86_mmx %y 47} 48 49declare <2 x double> @llvm.x86.sse.cvtpi2pd(x86_mmx) 50declare x86_mmx @llvm.x86.sse.cvttpd2pi(<2 x double>) 51