From f987cceb134200d575beda611fe190535155c7a2 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 4 Jun 2020 22:24:03 +0200 Subject: [PATCH] Correctly report modified status for TailRecursionElimination Differential Revision: https://reviews.llvm.org/D81232 --- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp index 4263dddd9737..5bb1d54d7d12 100644 --- a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -818,7 +818,7 @@ bool TailRecursionEliminator::eliminate(Function &F, // If this function is a varargs function, we won't be able to PHI the args // right, so don't even try to convert it... if (F.getFunctionType()->isVarArg()) - return false; + return MadeChange; // If false, we cannot perform TRE on tail calls marked with the 'tail' // attribute, because doing so would cause the stack size to increase (real