diff options
author | Dan Gohman <gohman@apple.com> | 2008-05-20 20:59:51 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-05-20 20:59:51 +0000 |
commit | 6ffcf26d0ae196b4ddd645a1e43a3e719501d306 (patch) | |
tree | 4cdea1236a6a4a068b90cc2c9b448714f73d7823 /lib | |
parent | 2e0e0cf63f8a7bd4fc6da6851d0a60e7859994b8 (diff) | |
download | external_llvm-6ffcf26d0ae196b4ddd645a1e43a3e719501d306.zip external_llvm-6ffcf26d0ae196b4ddd645a1e43a3e719501d306.tar.gz external_llvm-6ffcf26d0ae196b4ddd645a1e43a3e719501d306.tar.bz2 |
Port the fix for the select operator from instcombine's
ComputeNumSignBits to SelectionDAG's ComputeNumSignBits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51348 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 83e773e..c46271a 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/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: |