Skip to content
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

preallocated-x64.ll test fails #58105

Closed
bkmgit opened this issue Oct 2, 2022 · 6 comments
Closed

preallocated-x64.ll test fails #58105

bkmgit opened this issue Oct 2, 2022 · 6 comments
Labels
backend:X86 question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead! regression test-suite

Comments

@bkmgit
Copy link

bkmgit commented Oct 2, 2022

When running check-all for Bolt on x86_64 Celeron N3060 from release 15.0.0 get the output below. Does this need further investigation?

/home/llvm-bolt/2124479-llvm-bolt/upstream/build/bin/llc /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/test/CodeGen/X86/preallocated-x64.ll -mtriple=x86_64-windows-msvc
llc: /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/Target/X86/X86ISelLowering.cpp:4450: virtual llvm::SDValue llvm::X86TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &, SmallVectorImpl<llvm::SDValue> &) const: Assertion `ArgLocs.back().isMemLoc() && "cannot use preallocated attribute on a register " "parameter"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /home/llvm-bolt/2124479-llvm-bolt/upstream/build/bin/llc /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/test/CodeGen/X86/preallocated-x64.ll -mtriple=x86_64-windows-msvc
1.	Running pass 'Function Pass Manager' on module '/home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/test/CodeGen/X86/preallocated-x64.ll'.
2.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@g'
 #0 0x0000000002b9e0a3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/Support/Unix/Signals.inc:569:13
 #1 0x0000000002b9c290 llvm::sys::RunSignalHandlers() /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/Support/Signals.cpp:104:18
 #2 0x0000000002b9e56a SignalHandler(int) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/Support/Unix/Signals.inc:407:1
 #3 0x00007fa752a3ea70 __restore_rt (/lib64/libc.so.6+0x3ea70)
 #4 0x00007fa752a8ec4c __pthread_kill_implementation (/lib64/libc.so.6+0x8ec4c)
 #5 0x00007fa752a3e9c6 gsignal (/lib64/libc.so.6+0x3e9c6)
 #6 0x00007fa752a287f4 abort (/lib64/libc.so.6+0x287f4)
 #7 0x00007fa752a2871b _nl_load_domain.cold (/lib64/libc.so.6+0x2871b)
 #8 0x00007fa752a37576 (/lib64/libc.so.6+0x37576)
 #9 0x000000000168f19f llvm::SmallVectorTemplateCommon<unsigned long, void>::operator[](unsigned long) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/include/llvm/ADT/SmallVector.h:273:5
#10 0x000000000168f19f llvm::X86MachineFunctionInfo::setPreallocatedStackSize(unsigned long, unsigned long) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/Target/X86/X86MachineFunctionInfo.h:240:5
#11 0x000000000168f19f llvm::X86TargetLowering::LowerCall(llvm::TargetLowering::CallLoweringInfo&, llvm::SmallVectorImpl<llvm::SDValue>&) const /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/Target/X86/X86ISelLowering.cpp:4459:10
#12 0x00000000029528db llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) const /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:9919:13
#13 0x0000000002971926 llvm::SelectionDAGBuilder::lowerInvokable(llvm::TargetLowering::CallLoweringInfo&, llvm::BasicBlock const*) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7715:3
#14 0x000000000295a894 llvm::SDValue::getNode() const /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:152:36
#15 0x000000000295a894 llvm::SelectionDAGBuilder::LowerCallTo(llvm::CallBase const&, llvm::SDValue, bool, bool, llvm::BasicBlock const*) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7833:20
#16 0x0000000002944231 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:8386:1
#17 0x0000000002938f31 llvm::Value::getValueID() const /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/include/llvm/IR/Value.h:533:12
#18 0x0000000002938f31 llvm::Instruction::getOpcode() const /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/include/llvm/IR/Instruction.h:157:39
#19 0x0000000002938f31 llvm::Instruction::isTerminator() const /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/include/llvm/IR/Instruction.h:160:51
#20 0x0000000002938f31 llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1128:10
#21 0x00000000029e1780 llvm::ilist_node_base<true>::getNext() const /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/include/llvm/ADT/ilist_node_base.h:43:45
#22 0x00000000029e1780 llvm::ilist_node_impl<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>>::getNext() const /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/include/llvm/ADT/ilist_node.h:75:59
#23 0x00000000029e1780 llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, true>::operator++() /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/include/llvm/ADT/ilist_iterator.h:157:57
#24 0x00000000029e1780 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, true>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, true>, bool&) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:672:77
#25 0x00000000029e0e7d llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1356:8
#26 0x00000000029dde05 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:0:3
#27 0x00000000018dda39 (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:191:7
#28 0x0000000001f7c733 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/CodeGen/MachineFunctionPass.cpp:0:13
#29 0x00000000023b4a98 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/IR/LegacyPassManager.cpp:1430:27
#30 0x00000000023bafb1 llvm::FPPassManager::runOnModule(llvm::Module&) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/IR/LegacyPassManager.cpp:1476:13
#31 0x00000000023b5142 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/IR/LegacyPassManager.cpp:0:27
#32 0x00000000023b5142 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/lib/IR/LegacyPassManager.cpp:535:44
#33 0x000000000161a120 compileModule(char**, llvm::LLVMContext&) /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/tools/llc/llc.cpp:737:49
#34 0x000000000161a120 main /home/llvm-bolt/2124479-llvm-bolt/upstream/llvm-project-15.0.0.src/llvm/tools/llc/llc.cpp:418:22
#35 0x00007fa752a29550 __libc_start_call_main (/lib64/libc.so.6+0x29550)
#36 0x00007fa752a29609 __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x29609)
#37 0x0000000001617dd5 _start (/home/llvm-bolt/2124479-llvm-bolt/upstream/build/bin/llc+0x1617dd5)
Aborted (core dumped)
@llvmbot
Copy link
Member

llvmbot commented Oct 2, 2022

@llvm/issue-subscribers-bolt

@aaupov
Copy link
Contributor

aaupov commented Oct 3, 2022

Hi @bkmgit,

What do you mean by "when running check-all for Bolt"? This test is from LLVM's CodeGen test suite, not from BOLT's tests (check-bolt).

@bkmgit
Copy link
Author

bkmgit commented Oct 6, 2022

@aaupov The problem appeared when building Bolt. Steps followed were:

> wget https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.0/llvm-project-15.0.0.src.tar.xz
> tar -xf llvm-project-15.0.0.src.tar.xz
> mkdir build
> cd build
> cmake -G Ninja ../llvm-project-15.0.0.src/llvm -DLLVM_TARGETS_TO_BUILD="X86;AArch64" -DCMAKE_BUILD_TYPE=Release -DLL
VM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_PROJECTS="bolt"
> ninja bolt
> ninja check-all

The command ninja check-bolt seems to work fine.

@llvmbot
Copy link
Member

llvmbot commented Oct 12, 2022

@llvm/issue-subscribers-backend-x86

@aaupov
Copy link
Contributor

aaupov commented Oct 12, 2022

@aaupov The problem appeared when building Bolt. Steps followed were:

> wget https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.0/llvm-project-15.0.0.src.tar.xz
> tar -xf llvm-project-15.0.0.src.tar.xz
> mkdir build
> cd build
> cmake -G Ninja ../llvm-project-15.0.0.src/llvm -DLLVM_TARGETS_TO_BUILD="X86;AArch64" -DCMAKE_BUILD_TYPE=Release -DLL
VM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_PROJECTS="bolt"
> ninja bolt
> ninja check-all

The command ninja check-bolt seems to work fine.

Thank you for clarification. Still, BOLT has nothing to do with this failure.
And despite that, I can't reproduce the issue on Ubuntu 22.04/GCC 11.2.0.

Can you please provide the full CMake log?

@aaupov aaupov removed the BOLT label Oct 12, 2022
@phoebewang
Copy link
Contributor

The test is expected to fail. llvm/test/CodeGen/X86/preallocated-x64.ll So it is not a problem. When you run check-all, you just need to care about the Failed items in the summary.

@EugeneZelenko EugeneZelenko added question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead! test-suite and removed llvm:codegen labels Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:X86 question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead! regression test-suite
Projects
None yet
Development

No branches or pull requests

5 participants