[llvm-bugs] [Bug 31088] New: Segfault in SelectionDAG for <1 x half>

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 21 03:14:01 PST 2016


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

            Bug ID: 31088
           Summary: Segfault in SelectionDAG for <1 x half>
           Product: libraries
           Version: 3.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: jonathanchesterfield at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Example input:

define <1 x half> @ir_fadd_v1f16(<1 x half> %arg0, <1 x half> %arg1) {
  %retval = fadd <1 x half> %arg0, %arg1
  ret <1 x half> %retval
}

llc -version
LLVM version 3.9.1
Optimised build.
Default target: x86_64-unknown-linux-gnu

llc tmp.ll

#0 0x00000000014a9995 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/bin/llc+0x14a9995)
#1 0x00000000014aa006 SignalHandler(int) (/usr/local/bin/llc+0x14aa006)
#2 0x00007f975eb1c8d0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0xf8d0)
#3 0x00000000013836ea llvm::SelectionDAG::getNode(unsigned int, llvm::SDLoc
const&, llvm::EVT, llvm::SDValue) (/usr/local/bin/llc+0x13836ea)
#4 0x000000000141e46a
llvm::DAGTypeLegalizer::PromoteFloatRes_UnaryOp(llvm::SDNode*)
(/usr/local/bin/llc+0x141e46a)
#5 0x000000000141d97e llvm::DAGTypeLegalizer::PromoteFloatResult(llvm::SDNode*,
unsigned int) (/usr/local/bin/llc+0x141d97e)
#6 0x00000000013e83ff llvm::DAGTypeLegalizer::run()
(/usr/local/bin/llc+0x13e83ff)
#7 0x00000000013ed336 llvm::SelectionDAG::LegalizeTypes()
(/usr/local/bin/llc+0x13ed336)
#8 0x00000000013b44b5 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/usr/local/bin/llc+0x13b44b5)
#9 0x00000000013b426f
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/usr/local/bin/llc+0x13b426f)
#10 0x00000000013b1bdc
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/usr/local/bin/llc+0x13b1bdc)
#11 0x0000000000cb4541 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/usr/local/bin/llc+0xcb4541)
#12 0x0000000000fb5ccb
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/usr/local/bin/llc+0xfb5ccb)
#13 0x00000000011843af llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/bin/llc+0x11843af)
#14 0x000000000118459b llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/local/bin/llc+0x118459b)
#15 0x0000000001184997 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/bin/llc+0x1184997)
#16 0x000000000063be5a compileModule(char**, llvm::LLVMContext&)
(/usr/local/bin/llc+0x63be5a)
#17 0x000000000063966b main (/usr/local/bin/llc+0x63966b)
#18 0x00007f975d92bb45 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b45)
#19 0x0000000000638953 _start (/usr/local/bin/llc+0x638953)
Stack dump:
0.      Program arguments: /usr/local/bin/llc tmp.ll
1.      Running pass 'Function Pass Manager' on module 'tmp.ll'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@ir_fadd_v1f16'
Segmentation fault


I've checked similar functions and they're fine - half, <2 x half>, <1 x
float>, float are OK. I haven't checked whether this reproduces on trunk.

Expected behaviour was no segfault, codegen broadly equivalent to a scalar
half.

Cheers

-- 
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/20161121/d00a713c/attachment-0001.html>


More information about the llvm-bugs mailing list