[clang] [llvm] [clang][WebAssembly] Fix Wasm Vararg pointer width (PR #173580)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 1 01:02:57 PST 2026


================
@@ -0,0 +1,125 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature
+// RUN: %clang_cc1 -triple wasm64-unknown-unknown -o - -emit-llvm %s | FileCheck %s
+
+#include <stdarg.h>
+
+// CHECK-LABEL: define {{[^@]+}}@test_i32
+// CHECK-SAME: (ptr noundef [[FMT:%.*]], ...) #[[ATTR0:[0-9]+]] {
+// CHECK-NEXT:  entry:
+// CHECK-NEXT:    [[FMT_ADDR:%.*]] = alloca ptr, align 8
+// CHECK-NEXT:    [[VA:%.*]] = alloca ptr, align 8
+// CHECK-NEXT:    [[V:%.*]] = alloca i32, align 4
----------------
daxpedda wrote:

I unfortunately know very little about LLVM IR, but I expected this line to change to `align 8`, which it did not.

I know the fix definitely works because I simply used Clang to confirm it on a minimal example. But I expected this test to have different input after the change, which it did not.

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


More information about the cfe-commits mailing list