From: Fiona Glaser Date: Sat, 29 Aug 2015 23:04:38 +0000 (+0000) Subject: SelectionDAG: add missing ComputeSignBits case for SELECT_CC X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=49d0fee4f60bdecd7dba946aa64f405c9864bd8f;p=oota-llvm.git SelectionDAG: add missing ComputeSignBits case for SELECT_CC Identical to SELECT, just with different operand numbers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246366 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 82537eb8923..7ccaaf72c37 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2613,6 +2613,11 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, unsigned Depth) const{ if (Tmp == 1) return 1; // Early out. Tmp2 = ComputeNumSignBits(Op.getOperand(2), Depth+1); return std::min(Tmp, Tmp2); + case ISD::SELECT_CC: + Tmp = ComputeNumSignBits(Op.getOperand(2), Depth+1); + if (Tmp == 1) return 1; // Early out. + Tmp2 = ComputeNumSignBits(Op.getOperand(3), Depth+1); + return std::min(Tmp, Tmp2); case ISD::SMIN: case ISD::SMAX: case ISD::UMIN: