[llvm-bugs] [Bug 41088] New: [ppc] Assertion `hasValue() && "Cannot get the value bit index of a constant bit"' failed
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Mar 15 09:50:29 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41088
Bug ID: 41088
Summary: [ppc] Assertion `hasValue() && "Cannot get the value
bit index of a constant bit"' failed
Product: libraries
Version: 8.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: PowerPC
Assignee: unassignedbugs at nondot.org
Reporter: jistone at redhat.com
CC: inouehrs at jp.ibm.com, llvm-bugs at lists.llvm.org,
nemanja.i.ibm at gmail.com
Created attachment 21602
--> https://bugs.llvm.org/attachment.cgi?id=21602&action=edit
bytecode reduced from rust #58996
Rust is seeing a bootstrap failure compiling itself for powerpc64 with LLVM
assertions enabled.
https://github.com/rust-lang/rust/issues/58996
rustc:
/checkout/src/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1114:
unsigned int {anonymous}::BitPermutationSelector::ValueBit::getValueBitIndex()
const: Assertion `hasValue() && "Cannot get the value bit index of a constant
bit"' failed.
I collected the bytecode from this, and I found that the assertion can be
reproduced with vanilla LLVM 8 and trunk, just by running llc. The attached
file is the bugpoint reduction. It compiles fine with LLVM 7, so I bisected the
crash and found r344347/D48025 (llvm-project commit 9552dd187aad).
https://reviews.llvm.org/D48025
On that commit, the backtrace looks like this:
+ ./bin/llc /home/jistone/llvm-project/bugpoint-reduced-function.bc
llc:
/home/jistone/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1115:
unsigned int {anonymous}::BitPermutationSelector::ValueBit::getValueBitIndex()
const: Assertion `hasValue() && "Cannot get the value bit index of a constant
bit"' failed.
Stack dump:
0. Program arguments: ./bin/llc
/home/jistone/llvm-project/bugpoint-reduced-function.bc
1. Running pass 'Function Pass Manager' on module
'/home/jistone/llvm-project/bugpoint-reduced-function.bc'.
2. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on
function
'@"_ZN132_$LT$rustc..ty..layout..LayoutCx$LT$$u27$tcx$C$$u20$rustc..ty..context..TyCtxt$LT$$u27$a$C$$u20$$u27$tcx$C$$u20$$u27$tcx$GT$$GT$$GT$19layout_raw_uncached17h9e786af8095bbf87E"'
#0 0x000000000159791a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/jistone/llvm-project/llvm/lib/Support/Unix/Signals.inc:494:3
#1 0x0000000001595ea4 llvm::sys::RunSignalHandlers()
/home/jistone/llvm-project/llvm/lib/Support/Signals.cpp:67:5
#2 0x0000000001596005 SignalHandler(int)
/home/jistone/llvm-project/llvm/lib/Support/Unix/Signals.inc:353:1
#3 0x00007efc0e9b4030 __restore_rt (/lib64/libpthread.so.0+0x13030)
#4 0x00007efc0e48153f __GI_raise (/lib64/libc.so.6+0x3853f)
#5 0x00007efc0e46b895 __GI_abort (/lib64/libc.so.6+0x22895)
#6 0x00007efc0e46b769 _nl_load_domain.cold.0 (/lib64/libc.so.6+0x22769)
#7 0x00007efc0e4799f6 (/lib64/libc.so.6+0x309f6)
#8 0x00000000008dbe5e llvm::SDNode::getValueType(unsigned int) const
/home/jistone/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1115:7
#9 0x00000000008dbe5e llvm::SDValue::getValueType() const
/home/jistone/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1110:34
#10 0x00000000008dbe5e (anonymous
namespace)::BitPermutationSelector::getValueBits(llvm::SDValue, unsigned int)
/home/jistone/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1318:26
#11 0x00000000008db6f7 (anonymous
namespace)::BitPermutationSelector::getValueBits(llvm::SDValue, unsigned int)
/usr/include/c++/8/tuple:1605:5
#12 0x00000000008dbb12 (anonymous
namespace)::BitPermutationSelector::getValueBits(llvm::SDValue, unsigned int)
/home/jistone/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1218:9
#13 0x00000000008dddc9 Select
/home/jistone/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:2342:71
#14 0x00000000008dddc9 tryBitPermutation
/home/jistone/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:3599:33
#15 0x00000000008dddc9 (anonymous
namespace)::PPCDAGToDAGISel::Select(llvm::SDNode*)
/home/jistone/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:4203:24
#16 0x0000000001464273 llvm::SmallVectorTemplateCommon<llvm::SDNode*,
void>::begin()
/home/jistone/llvm-project/llvm/include/llvm/ADT/SmallVector.h:851:3
#17 0x0000000001464273 llvm::SmallVectorTemplateCommon<llvm::SDNode*,
void>::end()
/home/jistone/llvm-project/llvm/include/llvm/ADT/SmallVector.h:133:35
#18 0x0000000001464273 _ZN4llvm11SmallVectorIPNS_6SDNodeELj4EED4Ev
/home/jistone/llvm-project/llvm/include/llvm/ADT/SmallVector.h:853:5
#19 0x0000000001464273 llvm::SelectionDAGISel::DoInstructionSelection()
/home/jistone/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1066:32
#20 0x000000000146ab2c _ZN4llvm10TimeRegionD4Ev
/home/jistone/llvm-project/llvm/include/llvm/Support/Timer.h:161:8
#21 0x000000000146ab2c _ZN4llvm16NamedRegionTimerD4Ev
/home/jistone/llvm-project/llvm/include/llvm/Support/Timer.h:161:8
#22 0x000000000146ab2c llvm::SelectionDAGISel::CodeGenAndEmitDAG()
/home/jistone/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:905:61
#23 0x000000000146fed7
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
/home/jistone/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1752:7
#24 0x0000000001471c9a
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(.part.971)
/home/jistone/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:470:3
#25 0x00000000008e49d9 (anonymous
namespace)::PPCDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/home/jistone/llvm-project/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:155:7
#26 0x0000000000c9135e
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/home/jistone/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:74:33
#27 0x0000000000c9135e
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/home/jistone/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:39:6
#28 0x0000000000ff4c68 llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/jistone/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1644:40
#29 0x0000000000ff4d49
llvm::ilist_node_impl<llvm::ilist_detail::node_options<llvm::Function, true,
false, void> >::getNext()
/home/jistone/llvm-project/llvm/include/llvm/ADT/ilist_node.h:67:66
#30 0x0000000000ff4d49
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Function, true,
false, void>, false, false>::operator++()
/home/jistone/llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:159:25
#31 0x0000000000ff4d49 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/jistone/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1678:22
#32 0x0000000000ff40f8 runOnModule
/home/jistone/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1745:7
#33 0x0000000000ff40f8 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/jistone/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1857:55
#34 0x00000000005c249c compileModule
/home/jistone/llvm-project/llvm/tools/llc/llc.cpp:599:5
#35 0x00000000005c249c main
/home/jistone/llvm-project/llvm/tools/llc/llc.cpp:351:35
#36 0x00007efc0e46d413 __libc_start_main (/lib64/libc.so.6+0x24413)
#37 0x0000000000601eae _start (./bin/llc+0x601eae)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190315/06bce95d/attachment.html>
More information about the llvm-bugs
mailing list