Fix PR1033 and CodeGen/X86/bitcast.ll, by expanding bitcast to a load/store pair.
authorChris Lattner <sabre@nondot.org>
Tue, 5 Dec 2006 18:22:22 +0000 (18:22 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 5 Dec 2006 18:22:22 +0000 (18:22 +0000)
This could be better, readme entry pending.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32228 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 040b480de21572971bcb3112a61eb760de3c4e1d..13d606b064b1206e151f64befebd9b69dfc18f60 100644 (file)
@@ -144,8 +144,13 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM)
       setOperationAction(ISD::FP_TO_UINT   , MVT::i32  , Promote);
   }
 
+  // TODO: when we have SSE, these could be more efficient, by using movd/movq.
   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);