public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sjames at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/114403] New: [14 regression]
Date: Wed, 20 Mar 2024 10:44:11 +0000	[thread overview]
Message-ID: <bug-114403-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114403

            Bug ID: 114403
           Summary: [14 regression]
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57743
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57743&action=edit
build-llvm.sh

I get the following test failures for LLVM 17.0.6:
```
********************
Failed Tests (17):
  LLVM :: CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll
  LLVM :: CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.d.ll
  LLVM ::
CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.g16.a16.ll
  LLVM :: CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.g16.ll
  LLVM :: CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.sample.cd.g16.ll
  LLVM :: CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.sample.g16.ll
  LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.nsa.ll
  LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.sample.a16.dim.ll
  LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.sample.cd.a16.dim.ll
  LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.sample.cd.g16.encode.ll
  LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.sample.cd.g16.ll
  LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.sample.dim.ll
  LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.sample.g16.a16.dim.ll
  LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.sample.g16.encode.ll
  LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.sample.g16.ll
  LLVM :: CodeGen/AMDGPU/llvm.amdgcn.image.sample.o.dim.ll
  LLVM :: CodeGen/NVPTX/wmma.py
```

I can reproduce it with -O3 -march=znver -fno-vect-cost-model. It also then
shows up if Clang is used to build Firefox. I will do the usual narrowing down
but my success rate for producing test cases from LLVM is poor ;)

Picking the first one:
```
FAIL: LLVM ::
CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll (5582 of
50819)
******************** TEST 'LLVM ::
CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll' FAILED
********************
Script:
--
: 'RUN: at line 2';  
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/llc
-global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -stop-after=legalizer -o
-
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll
|
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/FileCheck
-check-prefix=GFX9
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll
: 'RUN: at line 3';  
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/llc
-global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 -stop-after=legalizer -o
-
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll
|
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/FileCheck
-check-prefix=GFX10
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll
: 'RUN: at line 4';  
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/llc
-global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 -stop-after=legalizer -o
-
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll
|
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/FileCheck
-check-prefix=GFX11
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll
--
Exit Code: 2

Command Output (stderr):
--
+ : 'RUN: at line 2'
+
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/llc
-global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -stop-after=legalizer -o
-
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll
+
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/FileCheck
-check-prefix=GFX9
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and
include the crash backtrace.
Stack dump:
0.      Program arguments:
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/llc
-global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -stop-after=legalizer -o
-
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll
1.      Running pass 'Function Pass Manager' on module
'/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll'.
2.      Running pass 'Early CSE' on function '@sample_d_3d'
 #0 0x00007f3bd08e5fbf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/../lib64/libLLVM-17.so+0xee5fbf)
 #1 0x00007f3bd08e315b SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f3bcf46ac10 (/usr/lib64/libc.so.6+0x3bc10)
 #3 0x00007f3bd0a6c5a6 llvm::Instruction::isIdenticalTo(llvm::Instruction
const*) const
(/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/../lib64/libLLVM-17.so+0x106c5a6)
 #4 0x00007f3bd1ed8073 bool llvm::DenseMapBase<llvm::DenseMap<(anonymous
namespace)::CallValue, llvm::ScopedHashTableVal<(anonymous
namespace)::CallValue, std::pair<llvm::Instruction*, unsigned int>>*,
llvm::DenseMapInfo<(anonymous namespace)::CallValue, void>,
llvm::detail::DenseMapPair<(anonymous namespace)::CallValue,
llvm::ScopedHashTableVal<(anonymous namespace)::CallValue,
std::pair<llvm::Instruction*, unsigned int>>*>>, (anonymous
namespace)::CallValue, llvm::ScopedHashTableVal<(anonymous
namespace)::CallValue, std::pair<llvm::Instruction*, unsigned int>>*,
llvm::DenseMapInfo<(anonymous namespace)::CallValue, void>,
llvm::detail::DenseMapPair<(anonymous namespace)::CallValue,
llvm::ScopedHashTableVal<(anonymous namespace)::CallValue,
std::pair<llvm::Instruction*, unsigned int>>*>>::LookupBucketFor<(anonymous
namespace)::CallValue>((anonymous namespace)::CallValue const&,
llvm::detail::DenseMapPair<(anonymous namespace)::CallValue,
llvm::ScopedHashTableVal<(anonymous namespace)::CallValue,
std::pair<llvm::Instruction*, unsigned int>>*> const*&) const EarlyCSE.cpp:0:0
 #5 0x00007f3bd1eddbe7 (anonymous namespace)::EarlyCSE::run() EarlyCSE.cpp:0:0
 #6 0x00007f3bd1ee0da2 (anonymous
namespace)::EarlyCSELegacyCommonPass<false>::runOnFunction(llvm::Function&)
EarlyCSE.cpp:0:0
 #7 0x00007f3bd0aac88e llvm::FPPassManager::runOnFunction(llvm::Function&)
(/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/../lib64/libLLVM-17.so+0x10ac88e)
 #8 0x00007f3bd0aacd9c llvm::FPPassManager::runOnModule(llvm::Module&)
(/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/../lib64/libLLVM-17.so+0x10acd9c)
 #9 0x00007f3bd0aad478 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/../lib64/libLLVM-17.so+0x10ad478)
#10 0x000055ce81b49356 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#11 0x000055ce81b3ead3 main
(/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/llc+0x11ad3)
#12 0x00007f3bcf454e58 (/usr/lib64/libc.so.6+0x25e58)
#13 0x00007f3bcf454f15 __libc_start_main (/usr/lib64/libc.so.6+0x25f15)
#14 0x000055ce81b3efb1 _start
(/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/llc+0x11fb1)
FileCheck error: '<stdin>' is empty.
FileCheck command line: 
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm_build-abi_x86_64.amd64/bin/FileCheck
-check-prefix=GFX9
/var/tmp/portage/sys-devel/llvm-17.0.6/work/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll
```

Simpler reproducer is then: ~/git/llvm-project $
~/data/build/llvm-project-test/bin/llvm-lit
./llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll
-v.

And then: `/build/llvm-project-test/bin/llc -global-isel
-mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -stop-after=legalizer -o -
/home/sam/git/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll`.

             reply	other threads:[~2024-03-20 10:44 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 10:44 sjames at gcc dot gnu.org [this message]
2024-03-20 10:44 ` [Bug tree-optimization/114403] [14 regression] LLVM miscompiled with -O3 -march=znver2 -fno-vect-cost-model sjames at gcc dot gnu.org
2024-03-20 10:53 ` sjames at gcc dot gnu.org
2024-03-20 11:49 ` rguenth at gcc dot gnu.org
2024-03-20 17:23 ` [Bug tree-optimization/114403] [14 regression] LLVM miscompiled with -O3 -march=znver2 -fno-vect-cost-model since r14-6822-g01f4251b8775c8 sjames at gcc dot gnu.org
2024-03-20 21:27 ` sjames at gcc dot gnu.org
2024-03-21  3:23 ` sjames at gcc dot gnu.org
2024-03-22  9:47 ` sjames at gcc dot gnu.org
2024-03-22  9:50 ` sjames at gcc dot gnu.org
2024-03-22 10:56 ` sjames at gcc dot gnu.org
2024-03-22 11:26 ` rguenth at gcc dot gnu.org
2024-03-22 12:36 ` law at gcc dot gnu.org
2024-03-22 13:12 ` sjames at gcc dot gnu.org
2024-03-22 13:13 ` sjames at gcc dot gnu.org
2024-03-22 13:13 ` sjames at gcc dot gnu.org
2024-03-22 13:27 ` sjames at gcc dot gnu.org
2024-03-22 13:50 ` rguenth at gcc dot gnu.org
2024-03-22 13:52 ` rguenth at gcc dot gnu.org
2024-03-22 14:27 ` sjames at gcc dot gnu.org
2024-03-22 14:37 ` sjames at gcc dot gnu.org
2024-03-26 10:09 ` rguenth at gcc dot gnu.org
2024-04-02 13:26 ` tnfchris at gcc dot gnu.org
2024-04-02 16:41 ` tnfchris at gcc dot gnu.org
2024-04-11 21:40 ` tnfchris at gcc dot gnu.org
2024-04-11 21:52 ` tnfchris at gcc dot gnu.org
2024-04-12 10:12 ` rguenth at gcc dot gnu.org
2024-04-12 10:15 ` tnfchris at gcc dot gnu.org
2024-04-12 10:37 ` rguenth at gcc dot gnu.org
2024-04-12 10:40 ` tnfchris at gcc dot gnu.org
2024-04-12 11:27 ` rguenth at gcc dot gnu.org
2024-04-15 11:07 ` cvs-commit at gcc dot gnu.org
2024-04-15 11:08 ` tnfchris at gcc dot gnu.org
2024-04-16 19:56 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-114403-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).