Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917496 - sys-devel/gcc-14: miscompiles LLVM
Summary: sys-devel/gcc-14: miscompiles LLVM
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard: fixed in 14.0.0_pre20231119
Keywords:
Depends on:
Blocks: gcc-14
  Show dependency tree
 
Reported: 2023-11-17 12:30 UTC by Sam James
Modified: 2024-11-01 18:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-17 12:30:02 UTC
Leads to a bunch of failing tests. Already reported upstream at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112572 but filing here just in case someone else hits it.

---

Failures:
```
********************
Failed Tests (22):
  LLVM :: CodeGen/X86/oddshuffles.ll
  LLVM :: CodeGen/X86/vector-interleaved-load-i64-stride-4.ll
  LLVM :: CodeGen/X86/vector-interleaved-load-i8-stride-3.ll
  LLVM :: CodeGen/X86/vector-interleaved-store-i64-stride-4.ll
  LLVM :: CodeGen/X86/vector-interleaved-store-i8-stride-3.ll
  LLVM :: CodeGen/X86/vector-interleaved-store-i8-stride-4.ll
  LLVM :: CodeGen/X86/vector-shuffle-combining-sse41.ll
  LLVM :: CodeGen/X86/x86-interleaved-access.ll
  LLVM :: Transforms/InterleavedAccess/X86/interleaved-accesses-64bits-avx-inseltpoison.ll
  LLVM :: Transforms/InterleavedAccess/X86/interleaved-accesses-64bits-avx.ll
  LLVM :: Transforms/InterleavedAccess/X86/interleavedLoad-inseltpoison.ll
  LLVM :: Transforms/InterleavedAccess/X86/interleavedLoad.ll
  LLVM :: Transforms/InterleavedAccess/X86/interleavedStore-inseltpoison.ll
  LLVM :: Transforms/InterleavedAccess/X86/interleavedStore.ll
  LLVM-Unit :: CodeGen/./CodeGenTests/71/131
  LLVM-Unit :: CodeGen/./CodeGenTests/72/131
  LLVM-Unit :: CodeGen/./CodeGenTests/73/131
  LLVM-Unit :: CodeGen/./CodeGenTests/74/131
  LLVM-Unit :: CodeGen/./CodeGenTests/75/131
  LLVM-Unit :: CodeGen/./CodeGenTests/76/131
  LLVM-Unit :: CodeGen/./CodeGenTests/77/131
  LLVM-Unit :: CodeGen/./CodeGenTests/79/131
```

e.g.
```

********************
FAIL: LLVM :: Transforms/InterleavedAccess/X86/interleaved-accesses-64bits-avx.ll (39005 of 50818)
******************** TEST 'LLVM :: Transforms/InterleavedAccess/X86/interleaved-accesses-64bits-avx.ll' FAILED ********************
Script:
--
: 'RUN: at line 2';   /home/sam/data/build/llvm-project/bin/opt < /home/sam/git/llvm-project/llvm/test/Transforms/InterleavedAccess/X86/interleaved-accesses-64bits-avx.ll -mtriple=x86_64-pc-linux  -mattr=+avx -interleaved-access -S | /home/sam/data/build/llvm-project/bin/FileCheck /home/sam/git/llvm-project/llvm/test/Transforms/InterleavedAccess/X86/interleaved-accesses-64bits-avx.ll
--
Exit Code: 2

Command Output (stderr):
--
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /home/sam/data/build/llvm-project/bin/opt -mtriple=x86_64-pc-linux -mattr=+avx -interleaved-access -S
1.      Running pass 'Function Pass Manager' on module '<stdin>'.
2.      Running pass 'Interleaved Access Pass' on function '@load_factorf64_4'
#0 0x00007fedafb8253f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/sam/git/llvm-project/llvm/lib/Support/Unix/Signals.inc:602:22
#1 0x00007fedafb80174 llvm::sys::RunSignalHandlers() /home/sam/git/llvm-project/llvm/lib/Support/Signals.cpp:104:20
#2 0x00007fedafb802f6 SignalHandler(int) /home/sam/git/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
#3 0x00007fedae86dbe0 (/usr/lib64/libc.so.6+0x39be0)
#4 0x00007fedb39120f5 (/home/sam/data/build/llvm-project/bin/../lib/libLLVM-17.so+0x4b120f5)
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/sam/data/build/llvm-project/bin/FileCheck /home/sam/git/llvm-project/llvm/test/Transforms/InterleavedAccess/X86/interleaved-accesses-64bits-avx.ll
```
Comment 1 Larry the Git Cow gentoo-dev 2023-11-19 11:04:09 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=fb2901cba5026337511402c7745b2eb317e9b35c

commit fb2901cba5026337511402c7745b2eb317e9b35c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-11-19 11:03:42 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-11-19 11:03:52 +0000

    14.0.0: add 75_all_PR112572-missing-notes-update.patch
    
    Fixes LLVM, mesa, pipewire miscompilation.
    
    Bug: https://gcc.gnu.org/PR112568
    Bug: https://gcc.gnu.org/PR112572
    Bug: https://bugs.gentoo.org/917496
    Bug: https://bugs.gentoo.org/917486
    Signed-off-by: Sam James <sam@gentoo.org>

 14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch | 14 ++++++++++++++
 14.0.0/gentoo/README.history                             |  4 ++++
 2 files changed, 18 insertions(+)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-20 08:26:54 UTC
commit 8ba6e2ad8af5a359dcee52103e63635a75650a4a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-11-20 07:02:22 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-11-20 07:02:29 +0000

    sys-devel/gcc: add 14.0.0_pre20231119
    
    Closes: https://bugs.gentoo.org/917486
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/Manifest                      |  2 +
 sys-devel/gcc/gcc-14.0.0_pre20231119.ebuild | 64 +++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)