aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-10-10 18:10:57 +0000
committerChris Lattner <sabre@nondot.org>2007-10-10 18:10:57 +0000
commitd9c9c919daf81ddb1bc28aa948d55e265f067656 (patch)
tree6627cf11b035070f6c6cd9193049cd7ec97bcca3 /llvm/lib
parenta9839f73fb750a26deff0c2a9b12ba4a768bbe65 (diff)
downloadllvm-d9c9c919daf81ddb1bc28aa948d55e265f067656.zip
llvm-d9c9c919daf81ddb1bc28aa948d55e265f067656.tar.gz
llvm-d9c9c919daf81ddb1bc28aa948d55e265f067656.tar.bz2
Fix CodeGen/Generic/BasicInstrs.llx on sparc by marking divrem
illegal. Thanks to gabor for pointing this out! llvm-svn: 42832
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp b/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
index e1628b9..8a6c320 100644
--- a/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
+++ b/llvm/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);