<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - compiler crash on the code with @llvm.x86.avx512.gather.dpi.512 intrinsic"
   href="https://bugs.llvm.org/show_bug.cgi?id=33772">33772</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>compiler crash on the code with @llvm.x86.avx512.gather.dpi.512 intrinsic
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: X86
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>babokin@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>llvm trunk

<span class="quote">> cat crash-gather.ll</span >
; 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 }

<span class="quote">> llc -mcpu=skylake-avx512 crash-gather.ll -O0</span >
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</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>