[MMX] Use the appropriate instructions for GR64 <-> VR64 copies.
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 14 Jul 2015 20:09:34 +0000 (20:09 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 14 Jul 2015 20:09:34 +0000 (20:09 +0000)
commit9e6dea1df8eeb432b9f988e437202d1cd4897cfa
tree4cdaef307e56afe7e37d9d8333d91c1ddbe07579
parent38a50c0a1620bfee536d292207100678ce7ab471
[MMX] Use the appropriate instructions for GR64 <-> VR64 copies.

MOVSDto64rr and MOV64toSDrr are defined to convert between FR64 (%xmm)
<-> GR64 registers, not VR64 (%mm) <-> GR64. This is wrong.

I found this by inspection and could not find a suitable testcase for it
since (1) we don't handle MMX bitcasts in Peephole optimizer as to
generate COPYs that (2) could be expanded back to the appropriate x86
instruction in ExpandPostRA.

Switch to use the appropriate instructions: MMX_MOVD64from64rr and
MMX_MOVD64to64rr here.

llvm-svn: 242191
llvm/lib/Target/X86/X86InstrInfo.cpp