summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-01-02 19:03:16 +0000
committerDavide Italiano <davide@freebsd.org>2017-01-02 19:03:16 +0000
commit67ada75d845ab6282e49e523a4c170f77794ded3 (patch)
tree0f8916db6c5e9036330e61ac693dc66524c81d16 /llvm/lib/Transforms
parentd1c346a43ba44f1e5ad2d0d0d9b94e835d221ae6 (diff)
downloadbcm5719-llvm-67ada75d845ab6282e49e523a4c170f77794ded3.tar.gz
bcm5719-llvm-67ada75d845ab6282e49e523a4c170f77794ded3.zip
[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
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/NewGVN.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp
index 50a6130a647..d4200fc3908 100644
--- a/llvm/lib/Transforms/Scalar/NewGVN.cpp
+++ b/llvm/lib/Transforms/Scalar/NewGVN.cpp
@@ -1422,14 +1422,12 @@ void NewGVN::verifyMemoryCongruency() {
continue;
if (auto *FirstMUD = dyn_cast<MemoryUseOrDef>(KV.first)) {
auto *SecondMUD = dyn_cast<MemoryUseOrDef>(KV.second);
- if (FirstMUD && SecondMUD) {
- auto *FirstInst = FirstMUD->getMemoryInst();
- auto *SecondInst = SecondMUD->getMemoryInst();
+ if (FirstMUD && SecondMUD)
assert(
- ValueToClass.lookup(FirstInst) == ValueToClass.lookup(SecondInst) &&
+ ValueToClass.lookup(FirstMUD->getMemoryInst()) ==
+ ValueToClass.lookup(SecondMUD->getMemoryInst()) &&
"The instructions for these memory operations should have been in "
"the same congruence class");
- }
} else if (auto *FirstMP = dyn_cast<MemoryPhi>(KV.first)) {
// We can only sanely verify that MemoryDefs in the operand list all have
OpenPOWER on IntegriCloud