-
Notifications
You must be signed in to change notification settings - Fork 836
Closed
Description
Hi,
wasm-opt seems to produce wrong code for the following program with --spill-pointers pass.
$ emcc -W small.c -o small.js; node small.js
5
$ wasm-opt small.wasm --spill-pointers -o small.wasm; node small.js
0
$ cat small.c
#include "stdio.h"
int a = 5;
int main() { printf("%d\n", a); }Version:
$ emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.30 (cfe2bdfe2692457cb5f5770672f6e5ccb3ffc2f2)
clang version 16.0.0 (https://github.com/llvm/llvm-project 800f0f1546b2352ba42a4777149afb13cb874fcd)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/emsdk/upstream/bin
$ wasm-opt --version
wasm-opt version 111 (version_111-98-ga803a0830)OS: Ubuntu 22.04
Metadata
Metadata
Assignees
Labels
No labels