https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107196
Bug ID: 107196
Summary: [13 Regression] llvm-14.0.6 is miscompiles by gcc-13
in -O3: hangs llvm testsuite (inliner seems to break
it)
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: slyfox at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
Target Milestone: ---
It's not a self-contained bug and requires full llvm build to trigger it. My
apologies. In my defense I have a few small clues to share!
The heavyweight reproducer: download llvm, build it with this week's gcc and
run one test that hangs. The bug started happening about 2 weeks ago.
The reproducer steps:
$ export CC=gcc-13
$ export CXX=g++-13
$ wget -c
https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/llvm-project-14.0.6.src.tar.xz
$ tar xf llvm-project-14.0.6.src.tar.xz
$ mkdir build
$ cd build
# We will build only 'llc' and run only one minimal haning test.
$ cmake ../llvm-project-14.0.6.src/llvm -DCMAKE_BUILD_TYPE=Release
-DLLVM_TARGETS_TO_BUILD=RISCV -DLLVM_ENABLE_PROJECTS='llvm'
$ make -j $(nproc) llc
$ cat >bug.ll <<EOF
; NOTE: Assertions have been autogenerated by
utils/update_llc_test_checks.py
; RUN: llc -mtriple=riscv32 -target-abi=ilp32d
-mattr=+v,+zfh,+experimental-zvfh,+f,+d -riscv-v-vector-bits-min=128
-riscv-v-fixed-length-vector-lmul-max=1 -verify-machineinstrs < %s | FileCheck
%s --check-prefixes=CHECK,LMULMAX1
define void @ui2fp_v8i64_v8f16(<8 x i64>* %x, <8 x half>* %y) {
; LMULMAX1-LABEL: ui2fp_v8i64_v8f16:
; LMULMAX1: # %bb.0:
%a = load <8 x i64>, <8 x i64>* %x
%d = uitofp <8 x i64> %a to <8 x half>
store <8 x half> %d, <8 x half>* %y
ret void
}
EOF
$ timeout 10 bin/llc -mtriple=riscv32 -target-abi=ilp32d
-mattr=+v,+zfh,+experimental-zvfh,+f,+d -riscv-v-vector-bits-min=128
-riscv-v-fixed-length-vector-lmul-max=1 -verify-machineinstrs ./bug.ll && echo
FINISHED || echo TIMED OUT
'+experimental-zvfh' is not a recognized feature for this target (ignoring
feature)
'+experimental-zvfh' is not a recognized feature for this target (ignoring
feature)
'+experimental-zvfh' is not a recognized feature for this target (ignoring
feature)
TIMED OUT
$ LANG=C $CC -v |& unnix
Using built-in specs.
COLLECT_GCC=/<<NIX>>/gcc-13.0.0/bin/gcc
COLLECT_LTO_WRAPPER=/<<NIX>>/gcc-13.0.0/libexec/gcc/x86_64-unknown-linux-gnu/13.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with:
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.0.0 20221002 (experimental) (GCC)