[llvm-bugs] [Bug 33772] New: compiler crash on the code with @llvm.x86.avx512.gather.dpi.512 intrinsic

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 13 11:34:30 PDT 2017


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

            Bug ID: 33772
           Summary: compiler crash on the code with
                    @llvm.x86.avx512.gather.dpi.512 intrinsic
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: babokin at gmail.com
                CC: llvm-bugs at lists.llvm.org

llvm trunk

> cat crash-gather.ll
; ModuleID = 'crash.bc'
;source_filename = "/home/dybaboki/dbabokin_ispc/tests/idiv.ispc"
target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
target triple = "i386-unknown-linux-gnu"

; Function Attrs: argmemonly nounwind readonly
declare <16 x i32> @llvm.x86.avx512.gather.dpi.512(<16 x i32>, i8*, <16 x i32>,
i16, i32) #12

; Function Attrs: alwaysinline nounwind readonly
define internal <16 x i32> @__gather_base_offsets32_i32(i8* readonly %ptr, i32
%offset_scale, <16 x i32> %offsets, <16 x i8> %vecmask) local_unnamed_addr #5 {
  %mask_vec_i1.i.i = icmp ne <16 x i8> %vecmask, zeroinitializer
  %mask_i16.i = bitcast <16 x i1> %mask_vec_i1.i.i to i16
  %res = tail call <16 x i32> @llvm.x86.avx512.gather.dpi.512(<16 x i32> undef,
i8* %ptr, <16 x i32> %offsets, i16 %mask_i16.i, i32 %offset_scale)
  ret <16 x i32> %res
}

attributes #5 = { alwaysinline nounwind readonly }
attributes #12 = { argmemonly nounwind readonly }

> llc -mcpu=skylake-avx512 crash-gather.ll -O0
llc:
/home/dybaboki/llvm/llvm-trunk-20170711/include/llvm/Support/Casting.h:248:
typename cast_retty<X, Y>::ret_type llvm::cast(Y &) [X = llvm::ConstantSDNode,
Y = llvm::SDValue]: Assertion `isa<X>(Val) && "cast<Ty>() argument of
incompatible type!"' failed.
#0 0x00000000011d817f llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(../llvm/bin-trunk-20170711/bin/llc+0x11d817f)
#1 0x00000000011d8486 SignalHandler(int)
(../llvm/bin-trunk-20170711/bin/llc+0x11d8486)
#2 0x00007fa60739b370 __restore_rt (/lib64/libpthread.so.0+0xf370)
#3 0x00007fa605f931d7 __GI_raise (/lib64/libc.so.6+0x351d7)
#4 0x00007fa605f948c8 __GI_abort (/lib64/libc.so.6+0x368c8)
#5 0x00007fa605f8c146 __assert_fail_base (/lib64/libc.so.6+0x2e146)
#6 0x00007fa605f8c1f2 (/lib64/libc.so.6+0x2e1f2)
#7 0x00000000006cb2cb LowerINTRINSIC_W_CHAIN(llvm::SDValue, llvm::X86Subtarget
const&, llvm::SelectionDAG&) (../llvm/bin-trunk-20170711/bin/llc+0x6cb2cb)
#8 0x0000000000fec55f (anonymous
namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*)
(../llvm/bin-trunk-20170711/bin/llc+0xfec55f)
#9 0x0000000000feb879 llvm::SelectionDAG::Legalize()
(../llvm/bin-trunk-20170711/bin/llc+0xfeb879)
#10 0x00000000010b5bbb llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(../llvm/bin-trunk-20170711/bin/llc+0x10b5bbb)
#11 0x00000000010b3261
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(../llvm/bin-trunk-20170711/bin/llc+0x10b3261)
#12 0x00000000010b0146
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(../llvm/bin-trunk-20170711/bin/llc+0x10b0146)
#13 0x000000000065fe71 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(../llvm/bin-trunk-20170711/bin/llc+0x65fe71)
#14 0x0000000000a572f4
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(../llvm/bin-trunk-20170711/bin/llc+0xa572f4)
#15 0x0000000000cff7bf llvm::FPPassManager::runOnFunction(llvm::Function&)
(../llvm/bin-trunk-20170711/bin/llc+0xcff7bf)
#16 0x0000000000cffa13 llvm::FPPassManager::runOnModule(llvm::Module&)
(../llvm/bin-trunk-20170711/bin/llc+0xcffa13)
#17 0x0000000000cfff06 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(../llvm/bin-trunk-20170711/bin/llc+0xcfff06)
#18 0x00000000005b8e66 compileModule(char**, llvm::LLVMContext&)
(../llvm/bin-trunk-20170711/bin/llc+0x5b8e66)
#19 0x00000000005b673b main (../llvm/bin-trunk-20170711/bin/llc+0x5b673b)
#20 0x00007fa605f7fb35 __libc_start_main (/lib64/libc.so.6+0x21b35)
#21 0x00000000005b59c1 _start (../llvm/bin-trunk-20170711/bin/llc+0x5b59c1)
Stack dump:
0.      Program arguments: ../llvm/bin-trunk-20170711/bin/llc
-mcpu=skylake-avx512 crash-gather.ll -O0
1.      Running pass 'Function Pass Manager' on module 'crash-gather.ll'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@__gather_base_offsets32_i32'
Aborted

-- 
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/20170713/9a1e8766/attachment-0001.html>


More information about the llvm-bugs mailing list