summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2015-04-13 17:47:15 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2015-04-13 17:47:15 +0000
commitffcd96864721a8901412c5c51e08120c103948d4 (patch)
treee02974e95f5cf2a3d2435ae1a6f675775a4848ae /llvm/lib/CodeGen/SelectionDAG
parent6f1fadf989a2ecff98521895b2540140f1aeaada (diff)
downloadbcm5719-llvm-ffcd96864721a8901412c5c51e08120c103948d4.tar.gz
bcm5719-llvm-ffcd96864721a8901412c5c51e08120c103948d4.zip
Revert revisions r234755, r234759, r234760
Revert "Remove default in fully-covered switch (to fix Clang -Werror -Wcovered-switch-default)" Revert "R600: Add carry and borrow instructions. Use them to implement UADDO/USUBO" Revert "LegalizeDAG: Try to use Overflow operations when expanding ADD/SUB" Using overflow operations fails CodeGen/Generic/2011-07-07-ScheduleDAGCrash.ll on hexagon, nvptx, and r600. Revert while I investigate. llvm-svn: 234768
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index e4fc3ff318f..25e80b9c736 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -1629,38 +1629,6 @@ void DAGTypeLegalizer::ExpandIntRes_ADDSUB(SDNode *N,
return;
}
- bool hasOVF =
- TLI.isOperationLegalOrCustom(N->getOpcode() == ISD::ADD ?
- ISD::UADDO : ISD::USUBO,
- TLI.getTypeToExpandTo(*DAG.getContext(), NVT));
- if (hasOVF) {
- SDVTList VTList = DAG.getVTList(NVT, NVT);
- TargetLoweringBase::BooleanContent BoolType = TLI.getBooleanContents(NVT);
- int RevOpc;
- if (N->getOpcode() == ISD::ADD) {
- RevOpc = ISD::SUB;
- Lo = DAG.getNode(ISD::UADDO, dl, VTList, LoOps);
- Hi = DAG.getNode(ISD::ADD, dl, NVT, makeArrayRef(HiOps, 2));
- } else {
- RevOpc = ISD::ADD;
- Lo = DAG.getNode(ISD::USUBO, dl, VTList, LoOps);
- Hi = DAG.getNode(ISD::SUB, dl, NVT, makeArrayRef(HiOps, 2));
- }
- SDValue OVF = Lo.getValue(1);
-
- switch (BoolType) {
- case TargetLoweringBase::UndefinedBooleanContent:
- OVF = DAG.getNode(ISD::AND, dl, NVT, DAG.getConstant(1, NVT), OVF);
- // Fallthrough
- case TargetLoweringBase::ZeroOrOneBooleanContent:
- Hi = DAG.getNode(N->getOpcode(), dl, NVT, Hi, OVF);
- break;
- case TargetLoweringBase::ZeroOrNegativeOneBooleanContent:
- Hi = DAG.getNode(RevOpc, dl, NVT, Hi, OVF);
- }
- return;
- }
-
if (N->getOpcode() == ISD::ADD) {
Lo = DAG.getNode(ISD::ADD, dl, NVT, LoOps);
Hi = DAG.getNode(ISD::ADD, dl, NVT, makeArrayRef(HiOps, 2));
OpenPOWER on IntegriCloud