[llvm-branch-commits] [llvm-branch] r104362 - /llvm/branches/Apple/whitney/lib/Target/X86/X86ISelLowering.cpp
Daniel Dunbar
daniel at zuster.org
Fri May 21 12:07:07 PDT 2010
Author: ddunbar
Date: Fri May 21 14:07:07 2010
New Revision: 104362
URL: http://llvm.org/viewvc/llvm-project?rev=104362&view=rev
Log:
Fix two bugs in 104348: Case where MMX is disabled wasn't handled right. MMX->MMX bitconverts are Legal.
Modified:
llvm/branches/Apple/whitney/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/branches/Apple/whitney/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/lib/Target/X86/X86ISelLowering.cpp?rev=104362&r1=104361&r2=104362&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/branches/Apple/whitney/lib/Target/X86/X86ISelLowering.cpp Fri May 21 14:07:07 2010
@@ -217,10 +217,13 @@
if (!X86ScalarSSEf64) {
setOperationAction(ISD::BIT_CONVERT , MVT::f32 , Expand);
setOperationAction(ISD::BIT_CONVERT , MVT::i32 , Expand);
- if (Subtarget->is64Bit() && Subtarget->hasMMX() && !DisableMMX) {
- // Without SSE, i64->f64 goes through memory; i64->MMX is legal.
- setOperationAction(ISD::BIT_CONVERT , MVT::i64 , Custom);
+ if (Subtarget->is64Bit()) {
setOperationAction(ISD::BIT_CONVERT , MVT::f64 , Expand);
+ // Without SSE, i64->f64 goes through memory; i64->MMX is Legal.
+ if (Subtarget->hasMMX() && !DisableMMX)
+ setOperationAction(ISD::BIT_CONVERT , MVT::i64 , Custom);
+ else
+ setOperationAction(ISD::BIT_CONVERT , MVT::i64 , Expand);
}
}
@@ -7486,6 +7489,9 @@
return Op;
if (DstVT==MVT::i64 && SrcVT.isVector())
return Op;
+ // MMX <=> MMX conversions are Legal.
+ if (SrcVT.isVector() && DstVT.isVector())
+ return Op;
// All other conversions need to be expanded.
return SDValue();
}
More information about the llvm-branch-commits
mailing list