From 49d0fee4f60bdecd7dba946aa64f405c9864bd8f Mon Sep 17 00:00:00 2001 From: Fiona Glaser Date: Sat, 29 Aug 2015 23:04:38 +0000 Subject: [PATCH] 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 --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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: -- 2.34.1