[llvm-bugs] [Bug 36731] New: FastISel causes assertion "i8 shifts should be handled by autogenerated table"

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 14 07:51:47 PDT 2018


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

            Bug ID: 36731
           Summary: FastISel causes assertion "i8 shifts should be handled
                    by autogenerated table"
           Product: new-bugs
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: v.churavy at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20062
  --> https://bugs.llvm.org/attachment.cgi?id=20062&action=edit
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:

> I->getType()->isIntegerTy(8) && "i8 shifts should be handled by autogenerated table"' failed.

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'
```

-- 
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/20180314/5fce326b/attachment-0001.html>


More information about the llvm-bugs mailing list