[llvm-bugs] [Bug 48836] New: "shufflevector vscale" results in crash (code gen)

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 21 09:11:59 PST 2021


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

            Bug ID: 48836
           Summary: "shufflevector vscale" results in crash (code gen)
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: loris.reiff at liblor.ch
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Created attachment 24406
  --> https://bugs.llvm.org/attachment.cgi?id=24406&action=edit
llc crash1.ll results in crash

Hi,

First of all, thanks for all the work on LLVM. It is an awesome project!

I think I stumbled upon a bug in the code generation process. The attached IR
code results in a crash.

How to reproduce:
llc crash1.ll

Also happens with other archs:
llc -mtriple=armv7 crash1.ll


Crash logs:
-----------

LLVM 11.0.0, x86_64 (Fedora 11.0.0-2.fc33)
```
warning: Possible incorrect use of EVT::getVectorNumElements() for scalable
vector. Scalable flag may be dropped, useEVT::getVectorElementCount() instead
warning: Possible incorrect use of EVT::getVectorNumElements() for scalable
vector. Scalable flag may be dropped, useEVT::getVectorElementCount() instead
warning: Possible incorrect use of EVT::getVectorNumElements() for scalable
vector. Scalable flag may be dropped, useEVT::getVectorElementCount() instead
warning: Compiler has made implicit assumption that TypeSize is not scalable.
This may or may not lead to broken code.
warning: Possible incorrect use of EVT::getVectorNumElements() for scalable
vector. Scalable flag may be dropped, useEVT::getVectorElementCount() instead
warning: Possible incorrect use of EVT::getVectorNumElements() for scalable
vector. Scalable flag may be dropped, useEVT::getVectorElementCount() instead
warning: Compiler has made implicit assumption that TypeSize is not scalable.
This may or may not lead to broken code.
LLVM ERROR: Do not know how to split the result of this operator!

PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: llc crash1.ll 
1.      Running pass 'Function Pass Manager' on module 'crash1.ll'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@crash'
 #0 0x00007fdc6d5fb27a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/lib64/libLLVM-11.so+0xa8b27a)
 #1 0x00007fdc6d5f94e4 llvm::sys::RunSignalHandlers()
(/lib64/libLLVM-11.so+0xa894e4)
 #2 0x00007fdc6d5f9676 (/lib64/libLLVM-11.so+0xa89676)
 #3 0x00007fdc6c7faa60 __restore_rt (/lib64/libc.so.6+0x3da60)
 #4 0x00007fdc6c7fa9d5 raise (/lib64/libc.so.6+0x3d9d5)
 #5 0x00007fdc6c7e38a4 abort (/lib64/libc.so.6+0x268a4)
 #6 0x00007fdc6d53e43a llvm::report_fatal_error(llvm::Twine const&, bool)
(/lib64/libLLVM-11.so+0x9ce43a)
 #7 0x00007fdc6d53e56a (/lib64/libLLVM-11.so+0x9ce56a)
 #8 0x00007fdc6dc2bc59 (/lib64/libLLVM-11.so+0x10bbc59)
 #9 0x00007fdc6dc0bcd0 (/lib64/libLLVM-11.so+0x109bcd0)
#10 0x00007fdc6dc0c331 llvm::SelectionDAG::LegalizeTypes()
(/lib64/libLLVM-11.so+0x109c331)
#11 0x00007fdc6dcfd831 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/lib64/libLLVM-11.so+0x118d831)
#12 0x00007fdc6dd01813
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/lib64/libLLVM-11.so+0x1191813)
#13 0x00007fdc6dd0360c
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/lib64/libLLVM-11.so+0x119360c)
#14 0x00007fdc6fa223f9 (/lib64/libLLVM-11.so+0x2eb23f9)
#15 0x00007fdc6d8ff637 (/lib64/libLLVM-11.so+0xd8f637)
#16 0x00007fdc6d7116d8 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/lib64/libLLVM-11.so+0xba16d8)
#17 0x00007fdc6d711b23 llvm::FPPassManager::runOnModule(llvm::Module&)
(/lib64/libLLVM-11.so+0xba1b23)
#18 0x00007fdc6d71055d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/lib64/libLLVM-11.so+0xba055d)
#19 0x00005570361ef73a (/usr/bin/llc+0x1373a)
#20 0x00005570361e8436 main (/usr/bin/llc+0xc436)
#21 0x00007fdc6c7e51e2 __libc_start_main (/lib64/libc.so.6+0x281e2)
#22 0x00005570361e854e _start (/usr/bin/llc+0xc54e)

```


LLVM 12, Ubuntu 18.04, x86_64 (installed with https://apt.llvm.org/llvm.sh)
```
warning: Possible incorrect use of EVT::getVectorNumElements() for scalable
vector. Scalable flag may be dropped, use
EVT::getVectorElementCount() instead
warning: Possible incorrect use of EVT::getVectorNumElements() for scalable
vector. Scalable flag may be dropped, use
EVT::getVectorElementCount() instead
warning: Possible incorrect use of EVT::getVectorNumElements() for scalable
vector. Scalable flag may be dropped, use
EVT::getVectorElementCount() instead
warning: Compiler has made implicit assumption that TypeSize is not scalable.
This may or may not lead to broken code.
warning: Possible incorrect use of EVT::getVectorNumElements() for scalable
vector. Scalable flag may be dropped, use
EVT::getVectorElementCount() instead
warning: Possible incorrect use of EVT::getVectorNumElements() for scalable
vector. Scalable flag may be dropped, use
EVT::getVectorElementCount() instead
warning: Compiler has made implicit assumption that TypeSize is not scalable.
This may or may not lead to broken code.
warning: Compiler has made implicit assumption that TypeSize is not scalable.
This may or may not lead to broken code.
warning: Possible incorrect use of EVT::getVectorNumElements() for scalable
vector. Scalable flag may be dropped, use
EVT::getVectorElementCount() instead
warning: Possible incorrect use of EVT::getVectorNumElements() for scalable
vector. Scalable flag may be dropped, use
EVT::getVectorElementCount() instead
LLVM ERROR: Scalarization of scalable vectors is not supported.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: llc-12 test.ll
1.      Running pass 'Function Pass Manager' on module 'test.ll'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@crash'
 #0 0x00007f3d60b013a3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xb5c3a3)
 #1 0x00007f3d60aff6d0 llvm::sys::RunSignalHandlers()
(/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xb5a6d0)
 #2 0x00007f3d60b01a0f (/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xb5ca0f)
 #3 0x00007f3d5fd98980 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
 #4 0x00007f3d5f094fb7 raise
/build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x00007f3d5f096921 abort /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
 #6 0x00007f3d60a5ca79 (/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xab7a79)
 #7 0x00007f3d60a5c896 (/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xab7896)
 #8 0x00007f3d6110b2b8 (/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0x11662b8)
 #9 0x00007f3d6110f09b llvm::SelectionDAG::LegalizeTypes()
(/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0x116a09b)
#10 0x00007f3d611e82d6 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0x12432d6)
#11 0x00007f3d611e7a7d
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0x1242a7d)
#12 0x00007f3d611e5716
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0x1240716)
#13 0x00007f3d62ce28b5 (/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0x2d3d8b5)
#14 0x00007f3d60e0b31e
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xe6631e)
#15 0x00007f3d60c28a1d llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xc83a1d)
#16 0x00007f3d60c2e023 llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xc89023)
#17 0x00007f3d60c2909f llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xc8409f)
#18 0x000000000040e920 main (/usr/lib/llvm-12/bin/llc+0x40e920)
#19 0x00007f3d5f077bf7 __libc_start_main
/build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344:0
#20 0x000000000040c1aa _start (/usr/lib/llvm-12/bin/llc+0x40c1aa)
```

Cheers,
Loris

-- 
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/20210121/7d75f1c7/attachment-0001.html>


More information about the llvm-bugs mailing list