<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - [AVX512]: 3.8 and trunk llc fails on gather.qps and scatter.qps"
   href="https://llvm.org/bugs/show_bug.cgi?id=26338">26338</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[AVX512]: 3.8 and trunk llc fails on gather.qps and scatter.qps
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>llc
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>anton.mitrokhin@phystech.edu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15728" name="attach_15728" title="Reproducer for gather.qps.512 llc fail">attachment 15728</a> <a href="attachment.cgi?id=15728&action=edit" title="Reproducer for gather.qps.512 llc fail">[details]</a></span>
Reproducer for gather.qps.512 llc fail

; Here is a small reproducer:
;foo_scatter.ll:

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: argmemonly nounwind
declare void @llvm.x86.avx512.scatter.qps.512(i8*, i8, <8 x i64>, <8 x float>,
i32) #0

; Function Attrs: nounwind
define void @f_fu() #1 {
foreach_reset:
  call void @llvm.x86.avx512.scatter.qps.512(i8* undef, i8 127, <8 x i64> <i64
932, i64 936, i64 940, i64 944, i64 948, i64 952, i64 956, i64 1024>, <8 x
float> undef, i32 1) #1
  ret void
}

attributes #0 = { argmemonly nounwind }
attributes #1 = { nounwind }

!llvm.ident = !{!0}

!0 = !{!"clang version 3.8.0 (branches/release_38)"}


foo_gather.ll:
see attachment

Run llc (3.8 or trunk):
llc -mcpu=knl foo_scatter.ll
llc -mcpu=knl foo_gather.ll

Both commands will output something similar to:
llc:
/export/users/nightly/llvm/llvm-3.8/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1110:
llvm::SDValue llvm::SelectionDAG::getConstant(uint64_t, llvm::SDLoc, llvm::EVT,
bool, bool): Assertion `(EltVT.getSizeInBits() >= 64 || (uint64_t)((int64_t)Val
<span class="quote">>> EltVT.getSizeInBits()) + 1 < 2) && "getConstant with a uint64_t value that</span >
doesn't fit in the type!"' failed.
#0 0x0000000001144048 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/llvm/bin-3.8/bin/llc+0x1144048)
#1 0x00000000011447b7 (/llvm/bin-3.8/bin/llc+0x11447b7)
#2 0x00007fccb27da430 __restore_rt (/lib64/libpthread.so.0+0x10430)
#3 0x00007fccb176f9c8 __GI_raise (/lib64/libc.so.6+0x349c8)
#4 0x00007fccb177165a __GI_abort (/lib64/libc.so.6+0x3665a)
#5 0x00007fccb1768187 __assert_fail_base (/lib64/libc.so.6+0x2d187)
#6 0x00007fccb1768232 (/lib64/libc.so.6+0x2d232)
#7 0x0000000000848041 (/llvm/bin-3.8/bin/llc+0x848041)
#8 0x0000000000667bd4 (/llvm/bin-3.8/bin/llc+0x667bd4)
#9 0x000000000064f855 llvm::X86TargetLowering::LowerOperation(llvm::SDValue,
llvm::SelectionDAG&) const (/llvm/bin-3.8/bin/llc+0x64f855)
#10 0x00000000007fd767 (/llvm/bin-3.8/bin/llc+0x7fd767)
#11 0x00000000007fcb47 llvm::SelectionDAG::Legalize()
(/llvm/bin-3.8/bin/llc+0x7fcb47)
#12 0x00000000008cc250 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/llvm/bin-3.8/bin/llc+0x8cc250)
#13 0x00000000008cabe7
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/llvm/bin-3.8/bin/llc+0x8cabe7)
#14 0x00000000008c7bf6
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/llvm/bin-3.8/bin/llc+0x8c7bf6)
#15 0x0000000000606ba1 (/llvm/bin-3.8/bin/llc+0x606ba1)
#16 0x0000000000a9cbf9
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/llvm/bin-3.8/bin/llc+0xa9cbf9)
#17 0x0000000001032c64 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/llvm/bin-3.8/bin/llc+0x1032c64)
#18 0x0000000001032eab llvm::FPPassManager::runOnModule(llvm::Module&)
(/llvm/bin-3.8/bin/llc+0x1032eab)
#19 0x0000000001033375 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/llvm/bin-3.8/bin/llc+0x1033375)
#20 0x000000000052db9d main (/llvm/bin-3.8/bin/llc+0x52db9d)
#21 0x00007fccb175b700 __libc_start_main (/lib64/libc.so.6+0x20700)
#22 0x00000000005279f9 _start (/llvm/bin-3.8/bin/llc+0x5279f9)
Stack dump:
0.      Program arguments: llc -mcpu=knl foo_gather.ll
1.      Running pass 'Function Pass Manager' on module 'foo_gather.ll'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@f_f'
Aborted (core dumped)</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>