Use movd instead of movq

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77956 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2009-08-03 05:21:05 +00:00
parent 05084716c1
commit 8d632c1e98
2 changed files with 6 additions and 3 deletions

View File

@ -164,11 +164,14 @@ def MMX_MOVD64to64rr : MMXRI<0x6E, MRMSrcReg, (outs VR64:$dst), (ins GR64:$src),
[]>;
let neverHasSideEffects = 1 in {
// These are 64 bit moves, but since the OS X assembler doesn't
// recognize a register-register movq, we write them as
// movd.
def MMX_MOVD64from64rr : MMXRI<0x7E, MRMDestReg,
(outs GR64:$dst), (ins VR64:$src),
"movq\t{$src, $dst|$dst, $src}", []>;
"movd\t{$src, $dst|$dst, $src}", []>;
def MMX_MOVD64rrv164 : MMXI<0x6E, MRMSrcReg, (outs VR64:$dst), (ins GR64:$src),
"movq\t{$src, $dst|$dst, $src}",
"movd\t{$src, $dst|$dst, $src}",
[(set VR64:$dst, (v1i64 (scalar_to_vector GR64:$src)))]>;
}

View File

@ -1,4 +1,4 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep movq | count 8
; RUN: llvm-as < %s | llc -march=x86-64 | grep movd | count 4
define i64 @foo(<1 x i64>* %p) {
%t = load <1 x i64>* %p