From: Chris Lattner Date: Wed, 10 Oct 2007 18:10:57 +0000 (+0000) Subject: Fix CodeGen/Generic/BasicInstrs.llx on sparc by marking divrem X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=85d0aaa291f6984a29a3753d427a5f1be7ab7bd2;p=oota-llvm.git Fix CodeGen/Generic/BasicInstrs.llx on sparc by marking divrem 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 --- diff --git a/lib/Target/Sparc/SparcISelDAGToDAG.cpp b/lib/Target/Sparc/SparcISelDAGToDAG.cpp index e1628b995df..8a6c320435e 100644 --- a/lib/Target/Sparc/SparcISelDAGToDAG.cpp +++ b/lib/Target/Sparc/SparcISelDAGToDAG.cpp @@ -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);