From 8b1380a0094d50cd71a6f27d76319dc3735c9bee Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Fri, 31 Mar 2017 20:36:00 +0000 Subject: [PATCH] [Hexagon] Fix typo in HexagonEarlyIfCConv.cpp 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 | 2 +- test/CodeGen/Hexagon/ifcvt-diamond-bug-2016-08-26.ll | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/Hexagon/HexagonEarlyIfConv.cpp b/lib/Target/Hexagon/HexagonEarlyIfConv.cpp index ccce8c136c3..7ee2e43bf96 100644 --- a/lib/Target/Hexagon/HexagonEarlyIfConv.cpp +++ b/lib/Target/Hexagon/HexagonEarlyIfConv.cpp @@ -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: " diff --git a/test/CodeGen/Hexagon/ifcvt-diamond-bug-2016-08-26.ll b/test/CodeGen/Hexagon/ifcvt-diamond-bug-2016-08-26.ll index cbc1c327e69..91b9aaa9cb4 100644 --- a/test/CodeGen/Hexagon/ifcvt-diamond-bug-2016-08-26.ll +++ b/test/CodeGen/Hexagon/ifcvt-diamond-bug-2016-08-26.ll @@ -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 } -- 2.11.0