Mips: Only set divrem i64 to custom on 64bit
authorJan Vesely <jan.vesely@rutgers.edu>
Fri, 17 Oct 2014 14:45:28 +0000 (14:45 +0000)
committerJan Vesely <jan.vesely@rutgers.edu>
Fri, 17 Oct 2014 14:45:28 +0000 (14:45 +0000)
Reviewed-by: Daniel Sanders <daniel.sanders@imgtec.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 220046

llvm/lib/Target/Mips/MipsSEISelLowering.cpp

index 9e7c63c..7417f6d 100644 (file)
@@ -128,6 +128,8 @@ MipsSETargetLowering::MipsSETargetLowering(const MipsTargetMachine &TM,
   if (Subtarget.isGP64bit()) {
     setOperationAction(ISD::MULHS,            MVT::i64, Custom);
     setOperationAction(ISD::MULHU,            MVT::i64, Custom);
+    setOperationAction(ISD::SDIVREM,          MVT::i64, Custom);
+    setOperationAction(ISD::UDIVREM,          MVT::i64, Custom);
   }
 
   setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i64, Custom);
@@ -135,8 +137,6 @@ MipsSETargetLowering::MipsSETargetLowering(const MipsTargetMachine &TM,
 
   setOperationAction(ISD::SDIVREM, MVT::i32, Custom);
   setOperationAction(ISD::UDIVREM, MVT::i32, Custom);
-  setOperationAction(ISD::SDIVREM, MVT::i64, Custom);
-  setOperationAction(ISD::UDIVREM, MVT::i64, Custom);
   setOperationAction(ISD::ATOMIC_FENCE,       MVT::Other, Custom);
   setOperationAction(ISD::LOAD,               MVT::i32, Custom);
   setOperationAction(ISD::STORE,              MVT::i32, Custom);