[llvm-bugs] [Bug 37521] New: [X86][AVX512] "getConstant with a uint64_t value that doesn't fit in the type!" in "X86 DAG->DAG Instruction Selection"

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 18 09:37:24 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37521

            Bug ID: 37521
           Summary: [X86][AVX512] "getConstant with a uint64_t value that
                    doesn't fit in the type!" in "X86 DAG->DAG Instruction
                    Selection"
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: ilia.taraban at intel.com
                CC: llvm-bugs at lists.llvm.org

This test fails at 'X86 DAG->DAG Instruction Selection' with "getConstant with
a uint64_t value that doesn't fit in the type!" assertion on debug build after
r331792:

================= fine.ll==============

@a = external global <16 x float>, align 64

declare void @goo(<2 x i256>)

define void @foo() #0 {
  %k = bitcast <16 x float>* @a to <2 x i256>*
  %1 = load <2 x i256>, <2 x i256>* %k, align 64
  call void @goo(<2 x i256> %1)
  ret void
}

attributes #0 = { nounwind "target-features"="+avx512bw" }

=======================================

>>> clang -v
clang version 7.0.0 (trunk 332713)
Target: x86_64-unknown-linux-gnu
Thread model: posix
...

>>> llc fine.ll
llc: .../llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1154: llvm::SDValue
llvm::SelectionDAG::getConstant(uint64_t, const llvm::SDLoc&, llvm::EVT, bool,
bool): Assertion `(EltVT.getSizeInBits() >= 64 || (uint64_t)((int64_t)Val >>
EltVT.getSizeInBits()) + 1 < 2) && "getConstant with a uint64_t value that
doesn't fit in the type!"' failed.
Stack dump:
0.      Program arguments: .../debug_build/bin/llc nice.ll
1.      Running pass 'Function Pass Manager' on module 'nice.ll'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@foo'
#0 0x00000000037503dd llvm::sys::PrintStackTrace(llvm::raw_ostream&)
.../llvm/lib/Support/Unix/Signals.inc:399:0
#1 0x000000000375046e PrintStackTraceSignalHandler(void*)
.../llvm/lib/Support/Unix/Signals.inc:463:0
#2 0x000000000374e954 llvm::sys::RunSignalHandlers()
.../llvm/lib/Support/Signals.cpp:49:0
#3 0x000000000374fd75 SignalHandler(int)
.../llvm/lib/Support/Unix/Signals.inc:253:0
#4 0x00007f1978e345e0 __restore_rt (/lib64/libpthread.so.0+0xf5e0)
#5 0x00007f1977a261f7 __GI_raise (/lib64/libc.so.6+0x351f7)
#6 0x00007f1977a278e8 __GI_abort (/lib64/libc.so.6+0x368e8)
#7 0x00007f1977a1f266 __assert_fail_base (/lib64/libc.so.6+0x2e266)
#8 0x00007f1977a1f312 (/lib64/libc.so.6+0x2e312)
#9 0x0000000003559d3f llvm::SelectionDAG::getConstant(unsigned long,
llvm::SDLoc const&, llvm::EVT, bool, bool)
.../llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1155:0
#10 0x00000000035fbe4b llvm::DAGTypeLegalizer::JoinIntegers(llvm::SDValue,
llvm::SDValue) .../llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:1079:0
#11 0x00000000036166db
llvm::DAGTypeLegalizer::SplitVecOp_BITCAST(llvm::SDNode*)
.../llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1731:0
#12 0x0000000003615174
llvm::DAGTypeLegalizer::SplitVectorOperand(llvm::SDNode*, unsigned int)
.../llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1536:0
#13 0x00000000035f7b93 llvm::DAGTypeLegalizer::run()
.../llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:329:0
#14 0x00000000035fcd1f llvm::SelectionDAG::LegalizeTypes()
.../llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:1195:0
#15 0x00000000035a6429 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
.../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:769:0
#16 0x00000000035a59b4
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&)
.../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:668:0
#17 0x00000000035ab8ac
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
.../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1736:0
#18 0x00000000035a4694
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
.../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:470:0
#19 0x00000000023b3bbe (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
.../llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:177:0
#20 0x0000000002b507ef
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
.../llvm/lib/CodeGen/MachineFunctionPass.cpp:62:0
#21 0x0000000002fbb8c8 llvm::FPPassManager::runOnFunction(llvm::Function&)
.../llvm/lib/IR/LegacyPassManager.cpp:1520:0
#22 0x0000000002fbba5b llvm::FPPassManager::runOnModule(llvm::Module&)
.../llvm/lib/IR/LegacyPassManager.cpp:1541:0
#23 0x0000000002fbbde7 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
.../llvm/lib/IR/LegacyPassManager.cpp:1597:0
#24 0x0000000002fbc4d8 llvm::legacy::PassManagerImpl::run(llvm::Module&)
.../llvm/lib/IR/LegacyPassManager.cpp:1700:0
#25 0x0000000002fbc719 llvm::legacy::PassManager::run(llvm::Module&)
.../llvm/lib/IR/LegacyPassManager.cpp:1732:0
#26 0x0000000001461d6f compileModule(char**, llvm::LLVMContext&)
.../llvm/tools/llc/llc.cpp:575:0
#27 0x00000000014605b1 main .../llvm/tools/llc/llc.cpp:345:0
#28 0x00007f1977a12c05 __libc_start_main (/lib64/libc.so.6+0x21c05)
#29 0x000000000145e569 _start (.../debug_build/bin/llc+0x145e569)
Aborted (core dumped)

This started failing after r331792
------------------------------------------------------------------------
r331792 | arsenm | 2018-05-08 20:43:05 +0200 (Tue, 08 May 2018) | 1 line
Changed paths:
   M /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp

DAG: Use correct shift width type
------------------------------------------------------------------------

-- 
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/20180518/66428b2d/attachment.html>


More information about the llvm-bugs mailing list