From: Benjamin Kramer Date: Fri, 14 Jun 2013 09:31:41 +0000 (+0000) Subject: X86: cvtpi2ps is just an SSE instruction with MMX operands. It has no AVX equivalent. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d25ec760cbf93e8c8493eaab2265c8bb8cf1d233;p=oota-llvm.git X86: cvtpi2ps is just an SSE instruction with MMX operands. It has no AVX equivalent. Give it the right register format so we can also emit it when AVX is enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183971 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrMMX.td b/lib/Target/X86/X86InstrMMX.td index 07314a092c8..cb129562aa9 100644 --- a/lib/Target/X86/X86InstrMMX.td +++ b/lib/Target/X86/X86InstrMMX.td @@ -189,13 +189,14 @@ multiclass sse12_cvt_pint opc, RegisterClass SrcRC, RegisterClass DstRC, multiclass sse12_cvt_pint_3addr opc, RegisterClass SrcRC, RegisterClass DstRC, Intrinsic Int, X86MemOperand x86memop, PatFrag ld_frag, string asm, Domain d> { - def irr : PI; - def irm : PI; + def irr : MMXPI; + def irm : MMXPI; } //===----------------------------------------------------------------------===// diff --git a/test/CodeGen/X86/mmx-builtins.ll b/test/CodeGen/X86/mmx-builtins.ll index a8d33f43da0..f5b3f765fe6 100644 --- a/test/CodeGen/X86/mmx-builtins.ll +++ b/test/CodeGen/X86/mmx-builtins.ll @@ -1337,3 +1337,11 @@ entry: %7 = extractelement <1 x i64> %6, i32 0 ret i64 %7 } + +define <4 x float> @test89(<4 x float> %a, x86_mmx %b) nounwind { +; CHECK: cvtpi2ps + %c = tail call <4 x float> @llvm.x86.sse.cvtpi2ps(<4 x float> %a, x86_mmx %b) + ret <4 x float> %c +} + +declare <4 x float> @llvm.x86.sse.cvtpi2ps(<4 x float>, x86_mmx) nounwind readnone