<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 - FastISel causes assertion "i8 shifts should be handled by autogenerated table""
   href="https://bugs.llvm.org/show_bug.cgi?id=36731">36731</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>FastISel causes assertion "i8 shifts should be handled by autogenerated table"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.0
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>v.churavy@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20062" name="attach_20062" title="Reduced input file">attachment 20062</a> <a href="attachment.cgi?id=20062&action=edit" title="Reduced input file">[details]</a></span>
Reduced input file

I am currently looking into upgrading the Julia frontend to use LLVM 6.0
With FastISel on I run into the assertion:

<span class="quote">> I->getType()->isIntegerTy(8) && "i8 shifts should be handled by autogenerated table"' failed.</span >

I reduced dumped the module with bugpoint to the attached input file, which
triggers the assertion with `llc -fast-isel bugpoint.ll`.

```
usr/tools/llc -fast-isel ~/bugpoint.ll 
llc:
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/Target/X86/X86FastISel.cpp:1793:
bool {anonymous}::X86FastISel::X86SelectShift(const llvm::Instruction*):
Assertion `!I->getType()->isIntegerTy(8) && "i8 shifts should be handled by
autogenerated table"' failed.
#0 0x00007f77a964940a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/Support/Unix/Signals.inc:402:0
#1 0x00007f77a964720e llvm::sys::RunSignalHandlers()
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/Support/Signals.cpp:50:0
#2 0x00007f77a9647382 SignalHandler(int)
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/Support/Unix/Signals.inc:242:0
#3 0x00007f77a877b4b0 (/lib/x86_64-linux-gnu/libc.so.6+0x354b0)
#4 0x00007f77a877b428 gsignal
/build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007f77a877d02a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007f77a8773bd7 __assert_fail_base
/build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92:0
#7 0x00007f77a8773c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x00007f77aab571e9 llvm::MachineRegisterInfo::getRegClass(unsigned int)
const
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/include/llvm/CodeGen/MachineRegisterInfo.h:602:0
#9 0x00007f77aab571e9 X86FastEmitPseudoSelect
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/Target/X86/X86FastISel.cpp:2326:0
#10 0x00007f77aab571e9 X86SelectSelect
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/Target/X86/X86FastISel.cpp:2400:0
#11 0x00007f77aab571e9 (anonymous
namespace)::X86FastISel::fastSelectInstruction(llvm::Instruction const*)
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/Target/X86/X86FastISel.cpp:3596:0
#12 0x00007f77a9b8df08 llvm::FastISel::selectInstruction(llvm::Instruction
const*)
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/CodeGen/SelectionDAG/FastISel.cpp:1437:0
#13 0x00007f77a9ce1a1c
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1505:0
#14 0x00007f77a9ce3f25
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) [clone
.part.881] [clone .constprop.905]
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:467:0
#15 0x00007f77aab91fb4 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/Target/X86/X86ISelDAGToDAG.cpp:177:0
#16 0x00007f77a99267d5
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/CodeGen/MachineFunctionPass.cpp:62:0
#17 0x00007f77a974409b llvm::FPPassManager::runOnFunction(llvm::Function&)
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/IR/LegacyPassManager.cpp:1520:0
#18 0x00007f77a974415c llvm::FPPassManager::runOnModule(llvm::Module&)
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/IR/LegacyPassManager.cpp:1541:0
#19 0x00007f77a9743c9d llvm::legacy::PassManagerImpl::run(llvm::Module&)
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/lib/IR/LegacyPassManager.cpp:1597:0
#20 0x0000000000418e5d compileModule(char**, llvm::LLVMContext&) [clone
.constprop.391]
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/tools/llc/llc.cpp:572:0
#21 0x000000000040bc2d main
/builds/vchuravy/julia/deps/srccache/llvm-6.0.0/tools/llc/llc.cpp:346:0
#22 0x00007f77a8766830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#23 0x000000000040bde9 _start (usr/tools/llc+0x40bde9)
Stack dump:
0.      Program arguments: usr/tools/llc -fast-isel
/afs/csail.mit.edu/u/v/vchuravy/bugpoint.ll 
1.      Running pass 'Function Pass Manager' on module
'/afs/csail.mit.edu/u/v/vchuravy/bugpoint.ll'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@julia_bin_5346'
```</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>