| Issue |
60933
|
| Summary |
SPEC CPU 2017 502.gcc_r and 602.gcc_s fails at runtime when built with clang-cl on Windows
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
pulidocr
|
Hello,
I'm trying to run SPEC CPU 2017 C/C++ benchmarks on Windows with clang-cl, but for some reason it is failing at runtime for 502.gcc_r and 602.gcc_s. It only fails with -O3 and -flto (full or thin) which suggests it might be a bad optimization. I don't know how to reduce the problem further other than providing a minimal config file. Tested with clang 15.0.6. Any help would be appreciated. Thanks.
Minimal config file:
```
label = clang-cl
default:
CC = clang-cl /TC
CLD = clang-cl -clang:-fuse-ld=lld
CXX = clang-cl /TP
CXXLD = clang-cl -clang:-fuse-ld=lld
OBJ = .obj
PORTABILITY = /DSPEC_P64
CC_VERSION_OPTION = ""
CXX_VERSION_OPTION = ""
OPTIMIZE = -clang:-O3 -flto=thin
```
Repro steps:
1. Obtain SPEC CPU 2017 and set it up for Windows
2. Download Visual Studio 2022 and install the "Desktop development with C++" workload.
3. Install clang/LLVM through LLVM's installer.
4. Copy and paste the above config file contents to `spec2017\config\clang-cl.cfg`
4. Open x64 Native Tools Command Prompt for VS2022
5. If `clang-cl.exe` is not already on PATH, `set "PATH=path\to\LLVM\bin;%PATH%`
6. `cd path\to\spec2017`
7. `shrc.bat`
8. `runcpu -a validate --size train --iterations 1 -c clang-cl 602.gcc_s`
9. Observe that the benchmark builds successfully, but fails at runtime. Removing `flto=thin` makes it pass.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs