We have found a bug using PVS-Studio tool. PVS-Studio is a static code analyzer for C, C++ and C#: https://www.viva64.com/en/pvs-studio/ Analyzer warning: V778 Two similar code fragments were found. Perhaps, this is a typo and 'FS' variable should be used instead of 'TS'. hexagonearlyifconv.cpp 549 bool HexagonEarlyIfConversion::isProfitable(....) const { .... unsigned TS = 0, FS = 0, Spare = 0; if (FP.TrueB) { TS = std::distance(FP.TrueB->begin(), FP.TrueB->getFirstTerminator()); if (TS < HEXAGON_PACKET_SIZE) Spare += HEXAGON_PACKET_SIZE-TS; // <= } if (FP.FalseB) { FS = std::distance(FP.FalseB->begin(), FP.FalseB->getFirstTerminator()); if (FS < HEXAGON_PACKET_SIZE) Spare += HEXAGON_PACKET_SIZE-TS; // <= FS ??? } unsigned TotalIn = TS+FS; .... }
Krzysztof please can you take a look?
Fixed in r299258.