From 399610a2e601214520df42351b1287a142130058 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 5 Dec 2006 18:22:22 +0000 Subject: [PATCH] Fix PR1033 and CodeGen/X86/bitcast.ll, by expanding bitcast to a load/store pair. 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 040b480de21..13d606b064b 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -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);