[llvm] [WebAssembly] Guard use of getSymbolName with isSymbol (PR #156105)

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 2 10:20:54 PDT 2025


================
@@ -45,6 +45,21 @@ define void @set_f64_global(double %v) {
   ret void
 }
 
+declare i32 @get_i32()
+define i32 @testFunc() {
+; CHECK-LABEL: testFunc:
+; CHECK-NEXT: .functype
+; CHECK-NEXT: .local
+; CHECK-NEXT: call get_i32
+; CHECK-NEXT: local.tee
+; CHECK-NEXT: global.set i32_global
+; CHECK-NEXT: local.get
+; CHECK-NEXT: end_function
+  %1 = call i32 @get_i32()
+  store i32 %1, ptr addrspace(1) @i32_global
----------------
dschuff wrote:

Hm, I just tested locally, and if I comment out the change in WebAssemblyRegStackify.cpp, this test fails. I wonder if there is some difference in how the backend is being run. Although there are no special flags or anything AFAIK.

https://github.com/llvm/llvm-project/pull/156105


More information about the llvm-commits mailing list