summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-05-20 20:59:51 +0000
committerDan Gohman <gohman@apple.com>2008-05-20 20:59:51 +0000
commitfe13618682bfdfa5ff3d04fa5a58edfde680d362 (patch)
tree8f7b07eb5aa979662059cf8b3f0d81483861f9bb
parentc1a4e212a3b7fe9bf5372f0d7b0d5cf1ef4172f7 (diff)
downloadbcm5719-llvm-fe13618682bfdfa5ff3d04fa5a58edfde680d362.tar.gz
bcm5719-llvm-fe13618682bfdfa5ff3d04fa5a58edfde680d362.zip
Port the fix for the select operator from instcombine's
ComputeNumSignBits to SelectionDAG's ComputeNumSignBits. llvm-svn: 51348
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 83e773ed313..c46271a2b76 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1690,9 +1690,9 @@ unsigned SelectionDAG::ComputeNumSignBits(SDOperand Op, unsigned Depth) const{
return std::min(Tmp, Tmp2);
case ISD::SELECT:
- Tmp = ComputeNumSignBits(Op.getOperand(0), Depth+1);
+ Tmp = ComputeNumSignBits(Op.getOperand(1), Depth+1);
if (Tmp == 1) return 1; // Early out.
- Tmp2 = ComputeNumSignBits(Op.getOperand(1), Depth+1);
+ Tmp2 = ComputeNumSignBits(Op.getOperand(2), Depth+1);
return std::min(Tmp, Tmp2);
case ISD::SETCC:
OpenPOWER on IntegriCloud