summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
index e62b8b60d0d..93ca670bbdb 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
@@ -309,6 +309,8 @@ void WebAssemblyCFGStackify::placeBlockMarker(MachineBasicBlock &MBB) {
// Local expression tree should go after the BLOCK.
for (auto I = Header->getFirstTerminator(), E = Header->begin(); I != E;
--I) {
+ if (std::prev(I)->isDebugInstr() || std::prev(I)->isPosition())
+ continue;
if (WebAssembly::isChild(*std::prev(I), MFI))
AfterSet.insert(&*std::prev(I));
else
@@ -531,6 +533,8 @@ void WebAssemblyCFGStackify::placeTryMarker(MachineBasicBlock &MBB) {
// Local expression tree should go after the TRY.
for (auto I = Header->getFirstTerminator(), E = Header->begin(); I != E;
--I) {
+ if (std::prev(I)->isDebugInstr() || std::prev(I)->isPosition())
+ continue;
if (WebAssembly::isChild(*std::prev(I), MFI))
AfterSet.insert(&*std::prev(I));
else
OpenPOWER on IntegriCloud