From 27b469b94572dff081b26940a370862979bfbe59 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 19 May 2007 00:46:51 +0000 Subject: [PATCH] same patch as the previous one, but the symmetric case llvm-svn: 37249 --- lib/CodeGen/SelectionDAG/TargetLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index e5883f60c53..0ce8b3faeb5 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -1808,7 +1808,7 @@ TargetLowering::SimplifySetCC(MVT::ValueType VT, SDOperand N0, SDOperand N1, if (DAG.isCommutativeBinOp(N1.getOpcode())) { return DAG.getSetCC(VT, N1.getOperand(0), DAG.getConstant(0, N1.getValueType()), Cond); - } else { + } else if (N1.Val->hasOneUse()) { assert(N1.getOpcode() == ISD::SUB && "Unexpected operation!"); // X == (Z-X) --> X<<1 == Z SDOperand SH = DAG.getNode(ISD::SHL, N1.getValueType(), N0,