Open glaubitz opened 7 months ago
Any way I can reproduce this? The log link only gives me an empty page...
Any way I can reproduce this? The log link only gives me an empty page...
Hmm, for some reason the information for this particular build is no longer available.
Basically, this is with compiler-rt and sanitizers enabled, then the testsuite being run.
I will try to extract the cmake command line.
Try with:
cmake -G Ninja ../llvm/llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=True -DLLVM_LIT_ARGS='-v' -DCMAKE_INSTALL_PREFIX=../stage1.install -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_PARALLEL_LINK_JOBS=4 -DLLVM_TARGETS_TO_BUILD=Sparc -DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;compiler-rt;llvm
This is on Linux (Debian unstable sparc64).
Try with:
cmake -G Ninja ../llvm/llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=True -DLLVM_LIT_ARGS='-v' -DCMAKE_INSTALL_PREFIX=../stage1.install -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_PARALLEL_LINK_JOBS=4 -DLLVM_TARGETS_TO_BUILD=Sparc -DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;compiler-rt;llvm
This is on Linux (Debian unstable sparc64).
Hmm, weird. I tried this then followed by ninja check-builtins
but I don't see this kind of error?
The only failure I get is this which I don't think is related?
FAIL: Builtins-sparcv9-linux :: compiler_rt_logbl_test.c (95 of 218)
******************** TEST 'Builtins-sparcv9-linux :: compiler_rt_logbl_test.c' FAILED ********************
Exit Code: 1
Command Output (stdout):
--
error: in __compiler_rt_logbl([BFFF000000000000 0]) = [3FFE000000000000 0] != [0 0]
--
Command Output (stderr):
--
RUN: at line 1: /home/k/llvm-debug/src/llvm-project/out/./bin/clang -gline-tables-only -m64 -fno-builtin -I /home/k/llvm-debug/src/llvm-project/compiler-rt/lib/builtins -nodefaultlibs /home/k/llvm-debug/src/llvm-project/compiler-rt/test/builtins/Unit/compiler_rt_logbl
_test.c /home/k/llvm-debug/src/llvm-project/out/./lib/../lib/clang/18/lib/sparcv9-unknown-linux-gnu/libclang_rt.builtins.a -lc -lm -o /home/k/llvm-debug/src/llvm-project/out/projects/compiler-rt/test/builtins/Unit/SPARCV9LinuxConfig/Output/compiler_rt_logbl_test.c.tmp &&
/home/k/llvm-debug/src/llvm-project/out/projects/compiler-rt/test/builtins/Unit/SPARCV9LinuxConfig/Output/compiler_rt_logbl_test.c.tmp
+ /home/k/llvm-debug/src/llvm-project/out/./bin/clang -gline-tables-only -m64 -fno-builtin -I /home/k/llvm-debug/src/llvm-project/compiler-rt/lib/builtins -nodefaultlibs /home/k/llvm-debug/src/llvm-project/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c /home/k/ll
vm-debug/src/llvm-project/out/./lib/../lib/clang/18/lib/sparcv9-unknown-linux-gnu/libclang_rt.builtins.a -lc -lm -o /home/k/llvm-debug/src/llvm-project/out/projects/compiler-rt/test/builtins/Unit/SPARCV9LinuxConfig/Output/compiler_rt_logbl_test.c.tmp
+ /home/k/llvm-debug/src/llvm-project/out/projects/compiler-rt/test/builtins/Unit/SPARCV9LinuxConfig/Output/compiler_rt_logbl_test.c.tmp
--
********************
cc @rorth
I had to clean out previous Linux/sparc64 builds to make root for LLVM 18.1.0 rc1. When doing a runtimes build on main
(like test-release.sh
would do), I found that in that case the builtins tests still aren't run at all: check-all misses 3200+ compiler-rt tests in runtimes build #72511 .
I'll run a projects build once the release build is done, but the latter is dog slow on my system, on the order of several days.
The only builtins
test that FAIL
s for me on Linux/sparc64 is
Builtins-sparcv9-linux :: compiler_rt_logbl_test.c
The test errors out with
error: in __compiler_rt_logbl([BFFF000000000000 0]) = [3FFE000000000000 0] != [0 0]
Initially, I could reduce the testcase to the attached crlt.c
. Looking further, the miscompilation happens at the call to _Qp_itoq
. Compiling the testcase with gcc-14
works while compiling the identical testcase withclang-20
breaks.
It's even easier to see with the further reduced ti.c
.
Compile with
gcc-14 -m64 -g3 -O0 -fno-builtin -I compiler-rt/lib/builtins -nodefaultlibs crlt.c -lgcc -lc -lm -o crlt
(same with clang-20
) or
gcc-14 -m64 -g3 -O0 -o ti ti.c
FWIW, the test always works on Solaris/sparcv9, both with gcc
and clang
.
crlt.c.txt ti.c.txt Testcases.
A lot of if not all of the Builtins-sparc-linux tests are failing on 64-bit Linux SPARC due to incorrect target settings which results in a linker failure:
Full build log available at: https://lab.llvm.org/staging/#/builders/159/builds/12
CC @jrtc27 @koachan @thesamesam