Skip to content

Commit 67ada75

Browse files
committed
[NewGVN] Fold single-use variable inside the assertion.
It placates some bots which complain because they compile the assertion out and think the variable is unused. llvm-svn: 290825
1 parent d1c346a commit 67ada75

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/Transforms/Scalar/NewGVN.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,14 +1422,12 @@ void NewGVN::verifyMemoryCongruency() {
14221422
continue;
14231423
if (auto *FirstMUD = dyn_cast<MemoryUseOrDef>(KV.first)) {
14241424
auto *SecondMUD = dyn_cast<MemoryUseOrDef>(KV.second);
1425-
if (FirstMUD && SecondMUD) {
1426-
auto *FirstInst = FirstMUD->getMemoryInst();
1427-
auto *SecondInst = SecondMUD->getMemoryInst();
1425+
if (FirstMUD && SecondMUD)
14281426
assert(
1429-
ValueToClass.lookup(FirstInst) == ValueToClass.lookup(SecondInst) &&
1427+
ValueToClass.lookup(FirstMUD->getMemoryInst()) ==
1428+
ValueToClass.lookup(SecondMUD->getMemoryInst()) &&
14301429
"The instructions for these memory operations should have been in "
14311430
"the same congruence class");
1432-
}
14331431
} else if (auto *FirstMP = dyn_cast<MemoryPhi>(KV.first)) {
14341432

14351433
// We can only sanely verify that MemoryDefs in the operand list all have

0 commit comments

Comments
 (0)