diff options
| author | Heejin Ahn <aheejin@gmail.com> | 2019-10-07 22:19:40 +0000 |
|---|---|---|
| committer | Heejin Ahn <aheejin@gmail.com> | 2019-10-07 22:19:40 +0000 |
| commit | daeead4b02f062bf5a21e154ab7726b3e1dd41bd (patch) | |
| tree | fa89bbf3b84bce2db36c8554d613a3f676470338 /llvm/test/CodeGen | |
| parent | ae5bad7277f497a8b19e331dffc14c74e3db7587 (diff) | |
| download | bcm5719-llvm-daeead4b02f062bf5a21e154ab7726b3e1dd41bd.tar.gz bcm5719-llvm-daeead4b02f062bf5a21e154ab7726b3e1dd41bd.zip | |
[WebAssembly] Fix unwind mismatch stat computation
Summary:
There was a bug when computing the number of unwind destination
mismatches in CFGStackify. When there are many mismatched calls that
share the same (original) destination BB, they have to be counted
separately.
This also fixes a typo and runs `fixUnwindMismatches` only when the wasm
exception handling is enabled. This is to prevent unnecessary
computations and does not change behavior.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68552
llvm-svn: 373975
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll b/llvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll index c79eb935179..f33f56701eb 100644 --- a/llvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll +++ b/llvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll @@ -1,6 +1,7 @@ ; RUN: llc < %s -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -disable-block-placement -verify-machineinstrs -fast-isel=false -machine-sink-split-probability-threshold=0 -cgp-freq-ratio-to-skip-merge=1000 -exception-model=wasm -mattr=+exception-handling | FileCheck %s ; RUN: llc < %s -O0 -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -verify-machineinstrs -exception-model=wasm -mattr=+exception-handling | FileCheck %s --check-prefix=NOOPT ; RUN: llc < %s -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -disable-block-placement -verify-machineinstrs -fast-isel=false -machine-sink-split-probability-threshold=0 -cgp-freq-ratio-to-skip-merge=1000 -exception-model=wasm -mattr=+exception-handling -wasm-disable-ehpad-sort | FileCheck %s --check-prefix=NOSORT +; RUN: llc < %s -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -disable-block-placement -verify-machineinstrs -fast-isel=false -machine-sink-split-probability-threshold=0 -cgp-freq-ratio-to-skip-merge=1000 -exception-model=wasm -mattr=+exception-handling -wasm-disable-ehpad-sort -stats 2>&1 | FileCheck %s --check-prefix=NOSORT-STAT target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" target triple = "wasm32-unknown-unknown" @@ -702,6 +703,9 @@ ehcleanup: ; preds = %entry cleanupret from %0 unwind to caller } +; Check if the unwind destination mismatch stats are correct +; NOSORT-STAT: 11 wasm-cfg-stackify - Number of EH pad unwind mismatches found + declare void @foo() declare void @bar() declare i32 @baz() |

