[SimpleLoopUnswitch] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds...
authorFangrui Song <i@maskray.me>
Wed, 31 Mar 2021 02:27:10 +0000 (19:27 -0700)
committerFangrui Song <i@maskray.me>
Wed, 31 Mar 2021 02:27:10 +0000 (19:27 -0700)
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp

index d1121ec..6d425a6 100644 (file)
@@ -1996,6 +1996,7 @@ static void unswitchNontrivialInvariants(
   int ClonedSucc = 0;
   if (!FullUnswitch) {
     Value *Cond = BI->getCondition();
+    (void)Cond;
     assert((match(Cond, m_LogicalAnd()) ^ match(Cond, m_LogicalOr())) &&
            "Only `or`, `and`, an `select` instructions can combine "
            "invariants being unswitched.");