[llvm-commits] [llvm] r140397 - /llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
Akira Hatanaka
ahatanak at gmail.com
Fri Sep 23 11:28:39 PDT 2011
Author: ahatanak
Date: Fri Sep 23 13:28:39 2011
New Revision: 140397
URL: http://llvm.org/viewvc/llvm-project?rev=140397&view=rev
Log:
Make FGR64RegisterClass available if target is Mips64.
Modified:
llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=140397&r1=140396&r2=140397&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Fri Sep 23 13:28:39 2011
@@ -84,6 +84,7 @@
MipsTargetLowering(MipsTargetMachine &TM)
: TargetLowering(TM, new MipsTargetObjectFile()) {
Subtarget = &TM.getSubtarget<MipsSubtarget>();
+ bool HasMips64 = Subtarget->hasMips64();
// Mips does not have i1 type, so use i32 for
// setcc operations results (slt, sgt, ...).
@@ -95,8 +96,12 @@
addRegisterClass(MVT::f32, Mips::FGR32RegisterClass);
// When dealing with single precision only, use libcalls
- if (!Subtarget->isSingleFloat())
+ if (!Subtarget->isSingleFloat()) {
+ if (HasMips64)
+ addRegisterClass(MVT::f64, Mips::FGR64RegisterClass);
+ else
addRegisterClass(MVT::f64, Mips::AFGR64RegisterClass);
+ }
// Load extented operations for i1 types must be promoted
setLoadExtAction(ISD::EXTLOAD, MVT::i1, Promote);
More information about the llvm-commits
mailing list