[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86InstrX86-64.td X86RegisterInfo.cpp
Evan Cheng
evan.cheng at apple.com
Thu Dec 14 13:55:54 PST 2006
Changes in directory llvm/lib/Target/X86:
X86ISelLowering.cpp updated: 1.305 -> 1.306
X86InstrX86-64.td updated: 1.12 -> 1.13
X86RegisterInfo.cpp updated: 1.185 -> 1.186
---
Log message:
f64 <-> i64 bit_convert using movq in 64-bit mode.
---
Diffs of the changes: (+16 -4)
X86ISelLowering.cpp | 4 ----
X86InstrX86-64.td | 14 ++++++++++++++
X86RegisterInfo.cpp | 2 ++
3 files changed, 16 insertions(+), 4 deletions(-)
Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.305 llvm/lib/Target/X86/X86ISelLowering.cpp:1.306
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.305 Sun Dec 10 17:12:42 2006
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Thu Dec 14 15:55:39 2006
@@ -158,10 +158,6 @@
setOperationAction(ISD::BIT_CONVERT , MVT::f32 , Expand);
setOperationAction(ISD::BIT_CONVERT , MVT::i32 , Expand);
}
- if (Subtarget->is64Bit()) {
- setOperationAction(ISD::BIT_CONVERT , MVT::f64 , Expand);
- setOperationAction(ISD::BIT_CONVERT , MVT::i64 , Expand);
- }
setOperationAction(ISD::BR_JT , MVT::Other, Expand);
setOperationAction(ISD::BRCOND , MVT::Other, Custom);
Index: llvm/lib/Target/X86/X86InstrX86-64.td
diff -u llvm/lib/Target/X86/X86InstrX86-64.td:1.12 llvm/lib/Target/X86/X86InstrX86-64.td:1.13
--- llvm/lib/Target/X86/X86InstrX86-64.td:1.12 Thu Dec 14 13:46:06 2006
+++ llvm/lib/Target/X86/X86InstrX86-64.td Thu Dec 14 15:55:39 2006
@@ -1126,3 +1126,17 @@
"movq {$src, $dst|$dst, $src}",
[(store (i64 (vector_extract (v2i64 VR128:$src),
(iPTR 0))), addr:$dst)]>;
+
+def MOV64toSDrr : RPDI<0x6E, MRMSrcReg, (ops FR64:$dst, GR64:$src),
+ "movq {$src, $dst|$dst, $src}",
+ [(set FR64:$dst, (bitconvert GR64:$src))]>;
+def MOV64toSDrm : RPDI<0x6E, MRMSrcMem, (ops FR64:$dst, i64mem:$src),
+ "movq {$src, $dst|$dst, $src}",
+ [(set FR64:$dst, (bitconvert (loadi64 addr:$src)))]>;
+
+def MOVSDto64rr : RPDI<0x7E, MRMDestReg, (ops GR64:$dst, FR64:$src),
+ "movq {$src, $dst|$dst, $src}",
+ [(set GR64:$dst, (bitconvert FR64:$src))]>;
+def MOVSDto64mr : RPDI<0x7E, MRMDestMem, (ops i64mem:$dst, FR64:$src),
+ "movq {$src, $dst|$dst, $src}",
+ [(store (i64 (bitconvert FR64:$src)), addr:$dst)]>;
Index: llvm/lib/Target/X86/X86RegisterInfo.cpp
diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.185 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.186
--- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.185 Thu Dec 14 13:44:45 2006
+++ llvm/lib/Target/X86/X86RegisterInfo.cpp Thu Dec 14 15:55:39 2006
@@ -511,6 +511,7 @@
{ X86::MOVPQIto64rr,X86::MOVPQIto64mr },
{ X86::MOVPS2SSrr, X86::MOVPS2SSmr },
{ X86::MOVSDrr, X86::MOVSDmr },
+ { X86::MOVSDto64rr, X86::MOVSDto64mr },
{ X86::MOVSS2DIrr, X86::MOVSS2DImr },
{ X86::MOVSSrr, X86::MOVSSmr },
{ X86::MOVUPDrr, X86::MOVUPDmr },
@@ -608,6 +609,7 @@
{ X86::MOV32rr, X86::MOV32rm },
{ X86::MOV64rr, X86::MOV64rm },
{ X86::MOV64toPQIrr, X86::MOV64toPQIrm },
+ { X86::MOV64toSDrr, X86::MOV64toSDrm },
{ X86::MOV8rr, X86::MOV8rm },
{ X86::MOVAPDrr, X86::MOVAPDrm },
{ X86::MOVAPSrr, X86::MOVAPSrm },
More information about the llvm-commits
mailing list