[PATCH] D48333: [MemorySSA] Verify Phi incoming blocks are block predecessors.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 20 14:10:53 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL335174: [MemorySSA] Verify Phi incoming blocks are block predecessors. (authored by asbirlea, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D48333
Files:
llvm/trunk/lib/Analysis/MemorySSA.cpp
Index: llvm/trunk/lib/Analysis/MemorySSA.cpp
===================================================================
--- llvm/trunk/lib/Analysis/MemorySSA.cpp
+++ llvm/trunk/lib/Analysis/MemorySSA.cpp
@@ -1746,8 +1746,12 @@
assert(Phi->getNumOperands() == static_cast<unsigned>(std::distance(
pred_begin(&B), pred_end(&B))) &&
"Incomplete MemoryPhi Node");
- for (unsigned I = 0, E = Phi->getNumIncomingValues(); I != E; ++I)
+ for (unsigned I = 0, E = Phi->getNumIncomingValues(); I != E; ++I) {
verifyUseInDefs(Phi->getIncomingValue(I), Phi);
+ assert(find(predecessors(&B), Phi->getIncomingBlock(I)) !=
+ pred_end(&B) &&
+ "Incoming phi block not a block predecessor");
+ }
}
for (Instruction &I : B) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48333.152162.patch
Type: text/x-patch
Size: 841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180620/8d947394/attachment.bin>
More information about the llvm-commits
mailing list