mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-07 01:57:16 +00:00
[WebAssembly] Add an assertion for an invalid CFG
Summary: It was not easy to provide a test case for D45648 (rL330079) because the bug didn't manifest itself in the set of currently valid IRs. Added an assertion to check this faster, thanks to @dblaikie's suggestion. Reviewers: dblaikie Subscribers: jfb, dschuff, sbc100, jgravelle-google, llvm-commits, dblaikie Differential Revision: https://reviews.llvm.org/D45711 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330217 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3e79068e73
commit
51d5ef9dba
@ -145,6 +145,9 @@ static void PlaceBlockMarker(
|
||||
std::prev(InsertPos)->getOpcode() != WebAssembly::END_LOOP)
|
||||
--InsertPos;
|
||||
}
|
||||
// The header block in which a 'block' mark will be inserted should have a
|
||||
// terminator because it is branching to a non-layout successor.
|
||||
assert(InsertPos != Header->end());
|
||||
|
||||
// Add the BLOCK.
|
||||
MachineInstr *Begin =
|
||||
|
Loading…
x
Reference in New Issue
Block a user