summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 13:56:42 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 13:56:42 +0000
commitf0d7d6ce65371000aa2bcecca2c4f15b17fb2530 (patch)
tree0dc2e1e0fa4f92160b7edee17695132d390c3d01 /llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
parentd919010b6a37bad35a52edf2242a41420ef890de (diff)
downloadbcm5719-llvm-f0d7d6ce65371000aa2bcecca2c4f15b17fb2530.tar.gz
bcm5719-llvm-f0d7d6ce65371000aa2bcecca2c4f15b17fb2530.zip
Provide "wide" muls and divs/rems
llvm-svn: 75958
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZISelLowering.cpp')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZISelLowering.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
index a5999feaa3e..62bd46b011c 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -41,8 +41,9 @@ SystemZTargetLowering::SystemZTargetLowering(SystemZTargetMachine &tm) :
RegInfo = TM.getRegisterInfo();
// Set up the register classes.
- addRegisterClass(MVT::i32, SystemZ::GR32RegisterClass);
- addRegisterClass(MVT::i64, SystemZ::GR64RegisterClass);
+ addRegisterClass(MVT::i32, SystemZ::GR32RegisterClass);
+ addRegisterClass(MVT::i64, SystemZ::GR64RegisterClass);
+ addRegisterClass(MVT::i128, SystemZ::GR128RegisterClass);
// Compute derived properties from the register classes
computeRegisterProperties();
@@ -73,16 +74,10 @@ SystemZTargetLowering::SystemZTargetLowering(SystemZTargetMachine &tm) :
setOperationAction(ISD::SELECT_CC, MVT::i32, Custom);
setOperationAction(ISD::SELECT_CC, MVT::i64, Custom);
- // FIXME: We can lower this better
- setOperationAction(ISD::MULHS, MVT::i32, Expand);
+ // Funny enough: we don't have 64-bit signed versions of these stuff, but have
+ // unsigned.
setOperationAction(ISD::MULHS, MVT::i64, Expand);
- setOperationAction(ISD::MULHU, MVT::i32, Expand);
- setOperationAction(ISD::MULHU, MVT::i64, Expand);
-
- setOperationAction(ISD::SMUL_LOHI, MVT::i32, Expand);
setOperationAction(ISD::SMUL_LOHI, MVT::i64, Expand);
- setOperationAction(ISD::UMUL_LOHI, MVT::i32, Expand);
- setOperationAction(ISD::UMUL_LOHI, MVT::i64, Expand);
}
SDValue SystemZTargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) {
OpenPOWER on IntegriCloud