From: Malcolm Parsons Date: Mon, 19 Dec 2016 12:37:26 +0000 (+0000) Subject: [Hexagon] Restore minimum profit check accidentally changed in r290024 X-Git-Tag: llvmorg-4.0.0-rc1~1708 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=14bb1f519260c6d511c29b6fa410c989d22c439a;p=platform%2Fupstream%2Fllvm.git [Hexagon] Restore minimum profit check accidentally changed in r290024 llvm-svn: 290100 --- diff --git a/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp b/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp index 3ed875ab..2c93721 100644 --- a/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp +++ b/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp @@ -397,7 +397,7 @@ bool HexagonSplitDoubleRegs::isProfitable(const USet &Part, LoopRegMap &IRM) for (unsigned DR : Part) { MachineInstr *DefI = MRI->getVRegDef(DR); int32_t P = profit(DefI); - if (P == std::numeric_limits::max()) + if (P == std::numeric_limits::min()) return false; TotalP += P; // Reduce the profitability of splitting induction registers. @@ -430,7 +430,7 @@ bool HexagonSplitDoubleRegs::isProfitable(const USet &Part, LoopRegMap &IRM) // Splittable instruction. SplitNum++; int32_t P = profit(UseI); - if (P == std::numeric_limits::max()) + if (P == std::numeric_limits::min()) return false; TotalP += P; }