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

Heejin Ahn via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 29 18:04:18 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
----------------
aheejin wrote:

Without `%2 = add i32 %1, 1` in the reproducer in #156055, this doesn't seem to trigger the assertion

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


More information about the llvm-commits mailing list