summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2011-07-22 18:45:15 +0000
committerDan Gohman <gohman@apple.com>2011-07-22 18:45:15 +0000
commitc535278cf1c314ca1c0138dec9fd00316e307106 (patch)
treed1739da568d658cd56ea851d5be5b3656f66cdef
parent39e05ac3d7a7bcf838534426f1ebf5baff0e83f1 (diff)
downloadbcm5719-llvm-c535278cf1c314ca1c0138dec9fd00316e307106.tar.gz
bcm5719-llvm-c535278cf1c314ca1c0138dec9fd00316e307106.zip
Fix x86's XALUO lowering to return its replacement values instead
of doing the RAUW calls for the overflow value itself. This makes it more consistent with how the rest of LegalizeDAG works. llvm-svn: 135788
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index d8ffccb5d86..472eb647a0e 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -9124,8 +9124,7 @@ SDValue X86TargetLowering::LowerXALUO(SDValue Op, SelectionDAG &DAG) const {
DAG.getConstant(X86::COND_O, MVT::i32),
SDValue(Sum.getNode(), 2));
- DAG.ReplaceAllUsesOfValueWith(SDValue(N, 1), SetCC);
- return Sum;
+ return DAG.getNode(ISD::MERGE_VALUES, DL, N->getVTList(), Sum, SetCC);
}
}
@@ -9138,8 +9137,7 @@ SDValue X86TargetLowering::LowerXALUO(SDValue Op, SelectionDAG &DAG) const {
DAG.getConstant(Cond, MVT::i32),
SDValue(Sum.getNode(), 1));
- DAG.ReplaceAllUsesOfValueWith(SDValue(N, 1), SetCC);
- return Sum;
+ return DAG.getNode(ISD::MERGE_VALUES, DL, N->getVTList(), Sum, SetCC);
}
SDValue X86TargetLowering::LowerSIGN_EXTEND_INREG(SDValue Op, SelectionDAG &DAG) const{
OpenPOWER on IntegriCloud