llvm / llvm/llvm-project

[clang] Multivalue+SIMD= Compiler crash

Open
#177,674 8 comments 0 reactions 0 assignees View on GitHub
clang:codegen crash-on-valid
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Stack dump:
```
0. Program arguments: /data/data/com.termux/files/usr/opt/emscripten-llvm/bin/clang -target wasm32-unknown-emscripten -fignore-exceptions --sysroot=/data/data/com.termux/files/usr/opt/emscripten/cache/sysroot -DEMSCRIPTEN -D__SSE__=1 -D__SSE2__=1 -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -std=c++17 -O3 -flto -fno-builtin -msimd128 -mmultivalue -I../include -I../test -Xclang -target-abi -Xclang experimental-mv -msimd128 -mmultivalue -Xclang -target-abi -Xclang experimental-mv -c test_complex_exponential.cpp -o /data/data/com.termux/files/usr/tmp/emscripten_temp_l07fr00o/test_complex_exponential.o
1. parser at end of file
2. Per-file LLVM IR generation
3. /data/data/com.termux/files/usr/opt/emscripten/cache/sysroot/include/c++/v1/complex:816:1: Generating code for declaration 'std::operator/'
clang: error: clang frontend command failed with exit code 134 (use -v to see invocation)
clang version 22.0.0git
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /data/data/com.termux/files/usr/opt/emscripten-llvm/bin
Build config: +assertions
```

[test_complex_exponential-166900.cpp](https://github.com/user-attachments/files/24828797/test_complex_exponential-166900.cpp)
[test_complex_exponential-166900.sh](https://github.com/user-attachments/files/24828798/test_complex_exponential-166900.sh)

Contributor guide

Open the contributing guide

Research direction

Start by running test_complex_exponential-166900.sh with test_complex_exponential-166900.cpp using the command and wasm32 Emscripten options in the report. Read the compiler stack around std::operator/ in the C++ v1 complex header at line 816, then trace the SIMD and multivalue code-generation path. Done means the reproducer compiles without the clang frontend crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, wasm
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.