[llvm] 3e5ee19 - [SimpleLoopUnswitch] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after 431a40e1e28f181e87dd247b91a5e6872dd64ab4
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 30 19:27:16 PDT 2021
Author: Fangrui Song
Date: 2021-03-30T19:27:10-07:00
New Revision: 3e5ee194c00dc0303593340daaba3bacbf1caa68
URL: https://github.com/llvm/llvm-project/commit/3e5ee194c00dc0303593340daaba3bacbf1caa68
DIFF: https://github.com/llvm/llvm-project/commit/3e5ee194c00dc0303593340daaba3bacbf1caa68.diff
LOG: [SimpleLoopUnswitch] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after 431a40e1e28f181e87dd247b91a5e6872dd64ab4
Added:
Modified:
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
index d1121ec88ccb..6d425a6638da 100644
--- a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
@@ -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.");
More information about the llvm-commits
mailing list