diff options
author | Chris Lattner <sabre@nondot.org> | 2007-05-19 00:46:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-05-19 00:46:51 +0000 |
commit | 1fa8276e700fb650936e5a643710a08d7dd02cbf (patch) | |
tree | 7523cb452c7a0060cbe7012349eb153e9d0437fc /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | b08cbbd737e3b900a287e619f52bf0f593b6b7e7 (diff) | |
download | bcm5719-llvm-1fa8276e700fb650936e5a643710a08d7dd02cbf.tar.gz bcm5719-llvm-1fa8276e700fb650936e5a643710a08d7dd02cbf.zip |
same patch as the previous one, but the symmetric case
llvm-svn: 37249
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index e5883f60c53..0ce8b3faeb5 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/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, |