diff options
author | Derek Schuff <dschuff@google.com> | 2016-08-18 15:27:25 +0000 |
---|---|---|
committer | Derek Schuff <dschuff@google.com> | 2016-08-18 15:27:25 +0000 |
commit | ccdceda1282fa48f304e0cd0c1b6f6861be7dcd3 (patch) | |
tree | 3fa7cd28e40ef1908073833b2025ee80cf0c33e6 /llvm/test/CodeGen/WebAssembly/lower-em-exceptions.ll | |
parent | 1d0560b14dc214d108072057dfe7ab5d79bd7e67 (diff) | |
download | bcm5719-llvm-ccdceda1282fa48f304e0cd0c1b6f6861be7dcd3.tar.gz bcm5719-llvm-ccdceda1282fa48f304e0cd0c1b6f6861be7dcd3.zip |
[WebAssembly] Refactor WebAssemblyLowerEmscriptenException pass for setjmp/longjmp
This patch changes the code structure of
WebAssemblyLowerEmscriptenException pass to support both exception
handling and setjmp/longjmp. It also changes the name of the pass and
the source file.
1. Change the file/pass name to WebAssemblyLowerEmscriptenExceptions ->
WebAssemblyLowerEmscriptenEHSjLj to make it clear that it supports both
EH and SjLj
2. List function / global variable names at the top so they
can be changed easily
3. Some cosmetic changes
Patch by Heejin Ahn
Differential Revision: https://reviews.llvm.org/D23588
llvm-svn: 279075
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/lower-em-exceptions.ll')
-rw-r--r-- | llvm/test/CodeGen/WebAssembly/lower-em-exceptions.ll | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/lower-em-exceptions.ll b/llvm/test/CodeGen/WebAssembly/lower-em-exceptions.ll index 5e9431d3cca..e9eb2540ccc 100644 --- a/llvm/test/CodeGen/WebAssembly/lower-em-exceptions.ll +++ b/llvm/test/CodeGen/WebAssembly/lower-em-exceptions.ll @@ -1,10 +1,10 @@ -; RUN: opt < %s -wasm-lower-em-exceptions -S | FileCheck %s +; RUN: opt < %s -wasm-lower-em-ehsjlj -S | FileCheck %s @_ZTIi = external constant i8* @_ZTIc = external constant i8* ; CHECK: @[[__THREW__:__THREW__.*]] = global i1 false -; CHECK: @[[THREWVALUE:threwValue.*]] = global i32 0 -; CHECK: @[[TEMPRET0:tempRet0.*]] = global i32 0 +; CHECK: @[[THREWVALUE:__threwValue.*]] = global i32 0 +; CHECK: @[[TEMPRET0:__tempRet0.*]] = global i32 0 ; Test invoke instruction with clauses (try-catch block) define void @clause() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { @@ -170,12 +170,12 @@ declare void @__cxa_call_unexpected(i8*) ; setThrew function creation ; CHECK-LABEL: define void @setThrew(i1 %threw, i32 %value) { ; CHECK: entry: -; CHECK-NEXT: %__THREW__.val = load i1, i1* @__THREW__ -; CHECK-NEXT: %cmp = icmp eq i1 %__THREW__.val, false +; CHECK-NEXT: %[[__THREW__]].val = load i1, i1* @[[__THREW__]] +; CHECK-NEXT: %cmp = icmp eq i1 %[[__THREW__]].val, false ; CHECK-NEXT: br i1 %cmp, label %if.then, label %if.end ; CHECK: if.then: -; CHECK-NEXT: store i1 %threw, i1* @__THREW__ -; CHECK-NEXT: store i32 %value, i32* @threwValue +; CHECK-NEXT: store i1 %threw, i1* @[[__THREW__]] +; CHECK-NEXT: store i32 %value, i32* @[[THREWVALUE]] ; CHECK-NEXT: br label %if.end ; CHECK: if.end: ; CHECK-NEXT: ret void @@ -184,6 +184,6 @@ declare void @__cxa_call_unexpected(i8*) ; setTempRet0 function creation ; CHECK-LABEL: define void @setTempRet0(i32 %value) { ; CHECK: entry: -; CHECK-NEXT: store i32 %value, i32* @tempRet0 +; CHECK-NEXT: store i32 %value, i32* @[[TEMPRET0]] ; CHECK-NEXT: ret void ; CHECK: } |