1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

[SimpleLoopUnswitch] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after 431a40e1e28f181e87dd247b91a5e6872dd64ab4

This commit is contained in:
Fangrui Song 2021-03-30 19:27:10 -07:00
parent 5e1af032fa
commit 7b082cfd85

View 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.");