Fix CodeGen/Generic/BasicInstrs.llx on sparc by marking divrem
authorChris Lattner <sabre@nondot.org>
Wed, 10 Oct 2007 18:10:57 +0000 (18:10 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 10 Oct 2007 18:10:57 +0000 (18:10 +0000)
illegal.  Thanks to gabor for pointing this out!

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

lib/Target/Sparc/SparcISelDAGToDAG.cpp

index e1628b995dffc99d8210d0a57321d64470d4dfb6..8a6c320435ea4a1bf8e5c5fcd81dff2ddaf42e52 100644 (file)
@@ -149,9 +149,11 @@ SparcTargetLowering::SparcTargetLowering(TargetMachine &TM)
   setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i8 , Expand);
   setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i1 , Expand);
 
-  // Sparc has no REM operation.
+  // Sparc has no REM or DIVREM operations.
   setOperationAction(ISD::UREM, MVT::i32, Expand);
   setOperationAction(ISD::SREM, MVT::i32, Expand);
+  setOperationAction(ISD::SDIVREM, MVT::i32, Expand);
+  setOperationAction(ISD::UDIVREM, MVT::i32, Expand);
 
   // Custom expand fp<->sint
   setOperationAction(ISD::FP_TO_SINT, MVT::i32, Custom);