]> granicus.if.org Git - llvm/commitdiff
[Hexagon] Fix typo in HexagonEarlyIfCConv.cpp
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 31 Mar 2017 20:36:00 +0000 (20:36 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 31 Mar 2017 20:36:00 +0000 (20:36 +0000)
Found by PVS-Studio. Fixes llvm.org/PR32480.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299258 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Hexagon/HexagonEarlyIfConv.cpp
test/CodeGen/Hexagon/ifcvt-diamond-bug-2016-08-26.ll

index ccce8c136c376073703a3210be3e49ab8f0d3bc1..7ee2e43bf96dd36ab2f9afb1032ece83d88f431d 100644 (file)
@@ -546,7 +546,7 @@ bool HexagonEarlyIfConversion::isProfitable(const FlowPattern &FP) const {
   if (FP.FalseB) {
     FS = std::distance(FP.FalseB->begin(), FP.FalseB->getFirstTerminator());
     if (FS < HEXAGON_PACKET_SIZE)
-      Spare += HEXAGON_PACKET_SIZE-TS;
+      Spare += HEXAGON_PACKET_SIZE-FS;
   }
   unsigned TotalIn = TS+FS;
   DEBUG(dbgs() << "Total number of instructions to be predicated/speculated: "
index cbc1c327e69a9d87d4cf4a1ee7d901ebbee0a51a..91b9aaa9cb4ea80444df7fe87617dcd56265aadf 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc -march=hexagon -o - %s | FileCheck %s
+; RUN: llc -march=hexagon -hexagon-eif=0 < %s | FileCheck %s
 target triple = "hexagon"
 
 %struct.0 = type { i16, i16 }