summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2015-04-29 16:30:46 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2015-04-29 16:30:46 +0000
commit753954873832863c045afe09953c67bf21ed7fc5 (patch)
treecd2869be416bf8ca504627129362a6ffc7d8ba14 /llvm/lib
parentcca29e8f6e75745a11ea65ac0b113c0a450d7481 (diff)
downloadbcm5719-llvm-753954873832863c045afe09953c67bf21ed7fc5.tar.gz
bcm5719-llvm-753954873832863c045afe09953c67bf21ed7fc5.zip
CodeGen: Default overflow operations to expand so we don't have to assume targets are lying
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: ab Differential Revision: http://reviews.llvm.org/D9265 llvm-svn: 236119
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp6
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp8
2 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 14a691b75f0..9157bf32b2c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -1245,12 +1245,6 @@ void SelectionDAGLegalize::LegalizeOp(SDNode *Node) {
break;
case ISD::EXTRACT_ELEMENT:
case ISD::FLT_ROUNDS_:
- case ISD::SADDO:
- case ISD::SSUBO:
- case ISD::UADDO:
- case ISD::USUBO:
- case ISD::SMULO:
- case ISD::UMULO:
case ISD::FPOWI:
case ISD::MERGE_VALUES:
case ISD::EH_RETURN:
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index 8eb64643f13..4dd279ede0d 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -804,6 +804,14 @@ void TargetLoweringBase::initActions() {
setOperationAction(ISD::FMAXNUM, VT, Expand);
setOperationAction(ISD::FMAD, VT, Expand);
+ // Overflow operations default to expand
+ setOperationAction(ISD::SADDO, VT, Expand);
+ setOperationAction(ISD::SSUBO, VT, Expand);
+ setOperationAction(ISD::UADDO, VT, Expand);
+ setOperationAction(ISD::USUBO, VT, Expand);
+ setOperationAction(ISD::SMULO, VT, Expand);
+ setOperationAction(ISD::UMULO, VT, Expand);
+
// These library functions default to expand.
setOperationAction(ISD::FROUND, VT, Expand);
OpenPOWER on IntegriCloud