Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latent assertion failure in AArch64InstrInfo::genAlternativeCodeSequence() #48097

Copy link
Copy link
Closed
@rupprecht

Description

@rupprecht
Issue body actions
Bugzilla Link 48753
Version trunk
OS Linux
CC @Arnaud-de-Grandmaison-ARM,@smithp35,@TNorthover

Extended Description

https://reviews.llvm.org/D93779 (landed as 4914299) changes ADT/SmallVector.h, which makes clang smart enough to diagnose a -Wsometimes-uninitialized for a MUL value passed to a SmallVector in AArch64InstrInfo.cpp. This build warning (or error when -Werror is enabled) is fixed by always initializing to nullptr in 752fafd, but if we add an assertion that MUL is not nullptr when we add it to the SmallVector, we get an assertion failure in two tests:

$ ninja check-llvm-codegen-aarch64
FAIL: LLVM :: CodeGen/AArch64/tailmerging_in_mbp.ll (1886 of 1908)
******************** TEST 'LLVM :: CodeGen/AArch64/tailmerging_in_mbp.ll' FAILED ********************
Script:

: 'RUN: at line 1'; /home/rupprecht/src/llvm-build/dev/bin/llc </home/rupprecht/src/llvm-project/llvm/test/CodeGen/AArch64/tailmerging_in_mbp.ll -mtriple=aarch64-eabi -verify-machine-dom-info | /home/rupprecht/src/llvm-build/dev/bin/FileCheck --allow-unused-prefixes=false /home/rupprecht/src/llvm-project/llvm/test/CodeGen/AArch64/tailmerging_in_mbp.ll

Exit Code: 2

Command Output (stderr):

llc: /home/rupprecht/src/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:5697: virtual void llvm::AArch64InstrInfo::genAlternativeCodeSequence(llvm::MachineInstr &, llvm::MachineCombinerPattern, SmallVectorImpl<llvm::MachineInstr *> &, SmallVectorImpl<llvm::MachineInstr *> &, DenseMap<unsigned int, unsigned int> &) const: Assertion `MUL && "MUL was never set"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/rupprecht/src/llvm-build/dev/bin/llc -mtriple=aarch64-eabi -verify-machine-dom-info

  1.  Running pass 'Function Pass Manager' on module '<stdin>'.
    
  2.  Running pass 'Machine InstCombiner' on function '@test'
    

...
Failed Tests (2):
LLVM :: CodeGen/AArch64/tailmerging_in_mbp.ll
LLVM :: CodeGen/AArch64/urem-seteq-nonzero.ll

The assertion is already added to llvm/lib/Target/AArch64/AArch64InstrInfo.cpp at the end of AArch64InstrInfo::genAlternativeCodeSequence(), but commented out. Uncomment to reproduce the above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.