Skip to content

LLVM crashes when returning large values by-val an building for sparc64 #48043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nagisa opened this issue Jan 8, 2021 · 2 comments
Closed
Labels
backend:Sparc bugzilla Issues migrated from bugzilla crash Prefer [crash-on-valid] or [crash-on-invalid] llvm:SelectionDAG SelectionDAGISel as well

Comments

@nagisa
Copy link
Member

nagisa commented Jan 8, 2021

Bugzilla Link 48699
Version trunk
OS All

Extended Description

Code

define i2048 @​test() unnamed_addr {
start:
  ret i2048 0
}

built with llc -mtriple=sparc64 will fail with the following assertion:

PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-trunk/bin/llc -o ./output.s -mtriple=sparc64

  1. Running pass 'Function Pass Manager' on module ''.
  2. Running pass 'Remove dead machine instructions' on function '@test'
#​4 0x000055c9d8d52d74 (anonymous namespace)::DeadMachineInstructionElim::eliminateDeadMI(llvm::MachineFunction&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x1bc1d74) #​5 0x000055c9d8d53313 (anonymous namespace)::DeadMachineInstructionElim::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x1bc2313) #​6 0x000055c9d8e5e2c8 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x1ccd2c8) #​7 0x000055c9d92355e7 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x20a45e7) #​8 0x000055c9d9235d01 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x20a4d01) #​9 0x000055c9d923507f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x20a407f) #​10 0x000055c9d79aea4a compileModule(char**, llvm::LLVMContext&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x81da4a) #​11 0x000055c9d78ee267 main (/opt/compiler-explorer/clang-trunk/bin/llc+0x75d267)
@nagisa
Copy link
Member Author

nagisa commented Jan 8, 2021

Notably this failure does not occur when some other targets (I tried x86_64 & aarch64) are specified.

@koachan
Copy link
Contributor

koachan commented Dec 19, 2024

This should be fixed by d3fcbee

https://godbolt.org/z/Yafvzd6ao

@koachan koachan closed this as completed Dec 24, 2024
@EugeneZelenko EugeneZelenko added crash Prefer [crash-on-valid] or [crash-on-invalid] llvm:SelectionDAG SelectionDAGISel as well labels Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:Sparc bugzilla Issues migrated from bugzilla crash Prefer [crash-on-valid] or [crash-on-invalid] llvm:SelectionDAG SelectionDAGISel as well
Projects
None yet
Development

No branches or pull requests

3 participants