diff options
author | Chris Lattner <sabre@nondot.org> | 2007-10-10 18:10:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-10-10 18:10:57 +0000 |
commit | 85d0aaa291f6984a29a3753d427a5f1be7ab7bd2 (patch) | |
tree | 7ecb6a69fdb945057a34a0b24f60d0f0dad4938c | |
parent | be24d91d824387cea4454bd16f63d5b2409c56e1 (diff) |
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
-rw-r--r-- | lib/Target/Sparc/SparcISelDAGToDAG.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/Sparc/SparcISelDAGToDAG.cpp b/lib/Target/Sparc/SparcISelDAGToDAG.cpp index e1628b995d..8a6c320435 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); |