<div dir="ltr">Could you roll the definition of TC into the use here in the LLVM_DEBUG - it's the only place TC is used, and also removes the shadowing of TC in the previous if block - makes the code easier to maintain, now if the LLVM_DEBUG Is removed there's no leftover cleanup required to remove "TC".</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 28, 2020 at 8:04 AM Tres Popp via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Tres Popp<br>
Date: 2020-09-28T17:04:08+02:00<br>
New Revision: 509fba75dff2382b867f5962e02fb0a899a5fa18<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/509fba75dff2382b867f5962e02fb0a899a5fa18" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/509fba75dff2382b867f5962e02fb0a899a5fa18</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/509fba75dff2382b867f5962e02fb0a899a5fa18.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/509fba75dff2382b867f5962e02fb0a899a5fa18.diff</a><br>
<br>
LOG: [llvm] Fix unused variable in non-debug configurations<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    llvm/lib/Target/ARM/MVETailPredication.cpp<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/llvm/lib/Target/ARM/MVETailPredication.cpp b/llvm/lib/Target/ARM/MVETailPredication.cpp<br>
index a42f67e97aea..f01f485859b0 100644<br>
--- a/llvm/lib/Target/ARM/MVETailPredication.cpp<br>
+++ b/llvm/lib/Target/ARM/MVETailPredication.cpp<br>
@@ -435,6 +435,8 @@ bool MVETailPredication::IsSafeActiveMask(IntrinsicInst *ActiveLaneMask,<br>
     // Ceil = ElementCount + (VW-1) / VW<br>
     auto *Ceil = SE->getUDivExpr(ECPlusVWMinus1, VW);<br>
<br>
+    // Prevent unused variable warnings with TC<br>
+    (void)TC;<br>
     LLVM_DEBUG(<br>
       dbgs() << "ARM TP: Analysing overflow behaviour for:\n";<br>
       dbgs() << "ARM TP: - TripCount = "; TC->dump();<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>