[llvm-bugs] [Bug 30354] New: mul i1024 crashes llc

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 12 10:14:45 PDT 2016


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

            Bug ID: 30354
           Summary: mul i1024 crashes llc
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: chfast at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

This test (based on test/CodeGen/X86/mul-i256.ll)

; RUN: llc < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

define void @test(i1024* %a, i1024* %b, i1024* %out) #0 {
entry:
  %av = load i1024, i1024* %a
  %bv = load i1024, i1024* %b
  %r = mul i1024 %av, %bv
  store i1024 %r, i1024* %out
  ret void
}

attributes #0 = { norecurse nounwind uwtable "target-cpu"="x86-64"
"target-features"="+fxsr,+mmx,+sse,+sse2,+x87" }

crashes llc with

llc:
/home/chfast/Projects/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1085:
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.
#0 0x000000000293425a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/chfast/Projects/llvm/llvm/lib/Support/Unix/Signals.inc:402:0
#1 0x00000000029345f9 PrintStackTraceSignalHandler(void*)
/home/chfast/Projects/llvm/llvm/lib/Support/Unix/Signals.inc:466:0
#2 0x00000000029326af llvm::sys::RunSignalHandlers()
/home/chfast/Projects/llvm/llvm/lib/Support/Signals.cpp:44:0
#3 0x0000000002933aba SignalHandler(int)
/home/chfast/Projects/llvm/llvm/lib/Support/Unix/Signals.inc:256:0
#4 0x00007f44a5ca83d0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x113d0)
#5 0x00007f44a4a1b418 gsignal
/build/glibc-GKVZIf/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#6 0x00007f44a4a1d01a abort /build/glibc-GKVZIf/glibc-2.23/stdlib/abort.c:91:0
#7 0x00007f44a4a13bd7 __assert_fail_base
/build/glibc-GKVZIf/glibc-2.23/assert/assert.c:92:0
#8 0x00007f44a4a13c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#9 0x0000000002783482 llvm::SelectionDAG::getConstant(unsigned long,
llvm::SDLoc const&, llvm::EVT, bool, bool)
/home/chfast/Projects/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1086:0
#10 0x000000000286d092 llvm::DAGTypeLegalizer::ExpandIntRes_MUL(llvm::SDNode*,
llvm::SDValue&, llvm::SDValue&)
/home/chfast/Projects/llvm/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:2209:0
#11 0x0000000002864bbc
llvm::DAGTypeLegalizer::ExpandIntegerResult(llvm::SDNode*, unsigned int)
/home/chfast/Projects/llvm/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1330:0
#12 0x0000000002815863 llvm::DAGTypeLegalizer::run()
/home/chfast/Projects/llvm/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:238:0
#13 0x000000000281b0c8 llvm::SelectionDAG::LegalizeTypes()
/home/chfast/Projects/llvm/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:1176:0
#14 0x00000000027c8749 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
/home/chfast/Projects/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:773:0
#15 0x00000000027c7dc8
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,
false, false, void>, false, true>,
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false,
false, void>, false, true>, bool&)
/home/chfast/Projects/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:684:0
#16 0x00000000027cbf86
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
/home/chfast/Projects/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1489:0
#17 0x00000000027c6ca7
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/home/chfast/Projects/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:509:0
#18 0x0000000001aca8c3 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/home/chfast/Projects/llvm/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:176:0
#19 0x00000000020a1d73
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/home/chfast/Projects/llvm/llvm/lib/CodeGen/MachineFunctionPass.cpp:62:0
#20 0x0000000002433006 llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/chfast/Projects/llvm/llvm/lib/IR/LegacyPassManager.cpp:1522:0
#21 0x000000000243319f llvm::FPPassManager::runOnModule(llvm::Module&)
/home/chfast/Projects/llvm/llvm/lib/IR/LegacyPassManager.cpp:1543:0
#22 0x000000000243351a (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/chfast/Projects/llvm/llvm/lib/IR/LegacyPassManager.cpp:1599:0
#23 0x0000000002433c2f llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/chfast/Projects/llvm/llvm/lib/IR/LegacyPassManager.cpp:1702:0
#24 0x0000000002433e3b llvm::legacy::PassManager::run(llvm::Module&)
/home/chfast/Projects/llvm/llvm/lib/IR/LegacyPassManager.cpp:1734:0
#25 0x0000000000ec757f compileModule(char**, llvm::LLVMContext&)
/home/chfast/Projects/llvm/llvm/tools/llc/llc.cpp:509:0
#26 0x0000000000ec5d6e main
/home/chfast/Projects/llvm/llvm/tools/llc/llc.cpp:274:0
#27 0x00007f44a4a06830 __libc_start_main
/build/glibc-GKVZIf/glibc-2.23/csu/../csu/libc-start.c:325:0
#28 0x0000000000ec4059 _start (bin/llc+0xec4059)
Stack dump:
0.    Program arguments: bin/llc
/home/chfast/Projects/llvm/llvm/test/CodeGen/X86/mul-i256.ll 
1.    Running pass 'Function Pass Manager' on module
'/home/chfast/Projects/llvm/llvm/test/CodeGen/X86/mul-i256.ll'.
2.    Running pass 'X86 DAG->DAG Instruction Selection' on function '@test2'

-- 
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/20160912/cb57be9e/attachment.html>


More information about the llvm-bugs mailing list