[llvm] b8438a6 - [WebAssembly] Add TLS FileCheck lines to Wasm SjLj test

Heejin Ahn via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 15:52:27 PST 2022


Author: Heejin Ahn
Date: 2022-02-15T15:52:10-08:00
New Revision: b8438a697573280ab137164bf7de972304d4cf25

URL: https://github.com/llvm/llvm-project/commit/b8438a697573280ab137164bf7de972304d4cf25
DIFF: https://github.com/llvm/llvm-project/commit/b8438a697573280ab137164bf7de972304d4cf25.diff

LOG: [WebAssembly] Add TLS FileCheck lines to Wasm SjLj test

Reviewed By: sbc100

Differential Revision: https://reviews.llvm.org/D119800

Added: 
    

Modified: 
    llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
    llvm/test/CodeGen/WebAssembly/lower-wasm-sjlj.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll b/llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
index a153c20aae2fa..19253d1cf1175 100644
--- a/llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
+++ b/llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
@@ -10,8 +10,8 @@ target triple = "wasm32-unknown-unknown"
 @global_var = global i32 0, align 4
 ; NO-TLS-DAG: __THREW__ = external global [[PTR]]
 ; NO-TLS-DAG: __threwValue = external global [[PTR]]
-; TLS-DAG: __THREW__ = external thread_local global i32
-; TLS-DAG: __threwValue = external thread_local global i32
+; TLS-DAG: __THREW__ = external thread_local global [[PTR]]
+; TLS-DAG: __threwValue = external thread_local global [[PTR]]
 @global_longjmp_ptr = global void (%struct.__jmp_buf_tag*, i32)* @longjmp, align 4
 ; CHECK-DAG: @global_longjmp_ptr = global void (%struct.__jmp_buf_tag*, i32)* bitcast (void ([[PTR]], i32)* @emscripten_longjmp to void (%struct.__jmp_buf_tag*, i32)*)
 

diff  --git a/llvm/test/CodeGen/WebAssembly/lower-wasm-sjlj.ll b/llvm/test/CodeGen/WebAssembly/lower-wasm-sjlj.ll
index 1f8ca482c8afb..ebe22c7e6cb18 100644
--- a/llvm/test/CodeGen/WebAssembly/lower-wasm-sjlj.ll
+++ b/llvm/test/CodeGen/WebAssembly/lower-wasm-sjlj.ll
@@ -1,17 +1,23 @@
-; RUN: opt < %s -wasm-lower-em-ehsjlj -wasm-enable-sjlj -S | FileCheck %s -DPTR=i32
-; RUN: opt < %s -wasm-lower-em-ehsjlj -wasm-enable-sjlj --mtriple=wasm64-unknown-unknown -data-layout="e-m:e-p:64:64-i64:64-n32:64-S128" -S | FileCheck %s -DPTR=i64
+; RUN: opt < %s -wasm-lower-em-ehsjlj -wasm-enable-sjlj -S | FileCheck %s --check-prefixes=CHECK,NO-TLS -DPTR=i32
+; RUN: opt < %s -wasm-lower-em-ehsjlj -wasm-enable-sjlj -S --mattr=+atomics,+bulk-memory | FileCheck %s --check-prefixes=CHECK,TLS -DPTR=i32
+; RUN: opt < %s -wasm-lower-em-ehsjlj -wasm-enable-sjlj --mtriple=wasm64-unknown-unknown -data-layout="e-m:e-p:64:64-i64:64-n32:64-S128" -S | FileCheck %s --check-prefixes CHECK -DPTR=i64
 
 target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
 target triple = "wasm32-unknown-unknown"
 
 %struct.__jmp_buf_tag = type { [6 x i32], i32, [32 x i32] }
 
+; NO-TLS-DAG: __THREW__ = external global [[PTR]]
+; NO-TLS-DAG: __threwValue = external global [[PTR]]
+; TLS-DAG: __THREW__ = external thread_local global [[PTR]]
+; TLS-DAG: __threwValue = external thread_local global [[PTR]]
+
 @global_longjmp_ptr = global void (%struct.__jmp_buf_tag*, i32)* @longjmp, align 4
 ; CHECK-DAG: @global_longjmp_ptr = global void (%struct.__jmp_buf_tag*, i32)* bitcast (void (i8*, i32)* @__wasm_longjmp to void (%struct.__jmp_buf_tag*, i32)*)
 
 ; Test a simple setjmp - longjmp sequence
 define void @setjmp_longjmp() {
-; CHECK-LABEL: @setjmp_longjmp() personality {{.*}} @__gxx_wasm_personality_v0
+; CHECK-LABEL: @setjmp_longjmp()
 entry:
   %buf = alloca [1 x %struct.__jmp_buf_tag], align 16
   %arraydecay = getelementptr inbounds [1 x %struct.__jmp_buf_tag], [1 x %struct.__jmp_buf_tag]* %buf, i32 0, i32 0


        


More information about the llvm-commits mailing list