https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115961
Bug ID: 115961 Summary: [15 Regression] wrong code on llvm-18.1.8 since r15-1936-g80e446e829d818 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Initially observed the failure on r15-1936-g80e446e829d818 compiler on llvm-18.1.8 testsuite as failures: Failed Tests (22): LLVM :: CodeGen/AArch64/regalloc-last-chance-recolor-with-split.mir LLVM :: CodeGen/AArch64/tail-dup-redundant-phi.mir LLVM :: CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.2darraymsaa.ll LLVM :: CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.3d.ll LLVM :: CodeGen/AMDGPU/InlineAsmCrash.ll LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.dim.ll LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.gather4.dim.ll LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.msaa.load.x.ll LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.sample.d16.dim.ll LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.sample.dim.ll LLVM :: CodeGen/PowerPC/inlineasm-copy.ll LLVM :: CodeGen/SystemZ/asm-18.ll LLVM :: CodeGen/X86/callbr-asm-outputs.ll LLVM :: CodeGen/X86/statepoint-fixup-invoke.mir LLVM :: CodeGen/X86/statepoint-fixup-shared-ehpad.mir LLVM :: CodeGen/X86/statepoint-fixup-undef-def.mir LLVM :: CodeGen/X86/statepoint-invoke-ra-enter-at-end.mir LLVM :: CodeGen/X86/statepoint-invoke-ra-inline-spiller.mir LLVM :: CodeGen/X86/statepoint-invoke-ra.mir LLVM :: CodeGen/X86/statepoint-vreg-folding.mir LLVM :: CodeGen/X86/statepoint-vreg-twoaddr.mir LLVM :: CodeGen/X86/statepoint-vreg.mir Bisected down to r15-1936-g80e446e829d818: "Match: Support form 2 for the .SAT_TRUNC". Here is the minimized example that exhibits the failure: Ok: $ g++ -O1 a.cc -o a && ./a Bad: $ g++ -O2 a.cc -o a && ./a Illegal instruction (core dumped) /nix/store/lr4n7v61gnijc5jnvrgjhqklcvqsds40-gcc-wrapper-15.0.0/bin/g++ -v |& unnix Using built-in specs. COLLECT_GCC=/<<NIX>>/gcc-15.0.0/bin/g++ COLLECT_LTO_WRAPPER=/<<NIX>>/gcc-15.0.0/libexec/gcc/x86_64-unknown-linux-gnu/15.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../source/configure --prefix=/<<NIX>>/gcc-15.0.0 --with-gmp-include=/<<NIX>>/gmp-6.3.0-dev/include --with-gmp-lib=/<<NIX>>/gmp-6.3.0/lib --with-mpfr-include=/<<NIX>>/mpfr-4.2.1-dev/include --with-mpfr-lib=/<<NIX>>/mpfr-4.2.1/lib --with-mpc=/<<NIX>>/libmpc-1.3.1 --with-native-system-header-dir=/<<NIX>>/glibc-2.39-52-dev/include --with-build-sysroot=/ --with-gxx-include-dir=/<<NIX>>/gcc-15.0.0/include/c++/15.0.0/ --program-prefix= --enable-lto --disable-libstdcxx-pch --without-included-gettext --with-system-zlib --enable-checking=release --enable-static --enable-languages=c,c++ --disable-multilib --enable-plugin --disable-libcc1 --with-isl=/<<NIX>>/isl-0.20 --disable-bootstrap --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=x86_64-unknown-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 99999999 (experimental) (GCC)