Issue |
148387
|
Summary |
[AArch64] Invalid size request on a scalable vector
|
Labels |
new issue
|
Assignees |
|
Reporter |
sjoerdmeijer
|
Compile this:
```
#include <algorithm>
int a;
extern short b[][1][1];
void c(int d[][1][1], short e[][1][1]) {
for (int f;;)
for (int g;; g += 3LL)
if (d)
for (int h; h < 2036854775797ULL; h += 4ULL)
for (int i(-49); i < 10; i++) {
b[h][g][g] = d[f][g][g] | std::min(0, d[0][f][g]);
a = std::max((unsigned long long)e[0][1][1],
(unsigned long long)401598999);
}
}
```
with `-Ofast -mcpu=grace` to get this error:
```
fatal error: error in backend: Invalid size request on a scalable vector.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-trunk/bin/clang++ -gdwarf-4 -g -o /app/output.s -fno-verbose-asm -S -target aarch64-linux-gnu --gcc-toolchain=/opt/compiler-explorer/arm64/gcc-12.2.0/aarch64-unknown-linux-gnu --sysroot=/opt/compiler-explorer/arm64/gcc-12.2.0/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot -fcolor-diagnostics -fno-crash-diagnostics -Ofast -mcpu=grace <source>
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '<source>'.
4. Running pass 'AArch64 Instruction Selection' on function '@_Z1cPA1_A1_iPA1_A1_s'
#0 0x0000000003c7a1b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3c7a1b8)
#1 0x0000000003c77b8c llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3c77b8c)
#2 0x0000000003bc83d3 llvm::CrashRecoveryContext::HandleExit(int) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3bc83d3)
#3 0x0000000003c6f3de llvm::sys::Process::Exit(int, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3c6f3de)
#4 0x0000000000da499b LLVMErrorHandler(void*, char const*, bool) cc1_main.cpp:0:0
#5 0x0000000003bd2303 llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3bd2303)
#6 0x0000000003bd2468 (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3bd2468)
#7 0x0000000003c1f0cd (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3c1f0cd)
#8 0x0000000003c1f0ec llvm::TypeSize::operator unsigned long() const (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3c1f0ec)
#9 0x000000000507170b calculateByteProvider(llvm::SDValue, unsigned int, unsigned int, std::optional<unsigned long>, unsigned int) DAGCombiner.cpp:0:0
#10 0x00000000050719c2 calculateByteProvider(llvm::SDValue, unsigned int, unsigned int, std::optional<unsigned long>, unsigned int) DAGCombiner.cpp:0:0
#11 0x0000000005071b25 calculateByteProvider(llvm::SDValue, unsigned int, unsigned int, std::optional<unsigned long>, unsigned int) DAGCombiner.cpp:0:0
#12 0x00000000050fb205 (anonymous namespace)::DAGCombiner::visitOR(llvm::SDNode*) DAGCombiner.cpp:0:0
#13 0x000000000511dc69 (anonymous namespace)::DAGCombiner::visit(llvm::SDNode*) DAGCombiner.cpp:0:0
#14 0x0000000005120825 (anonymous namespace)::DAGCombiner::combine(llvm::SDNode*) DAGCombiner.cpp:0:0
```
See also: https://godbolt.org/z/qTx87jfde
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs