| Issue |
169639
|
| Summary |
[AArch64] Possible incorrect use of EVT::getVectorNumElements()
|
| Labels |
backend:AArch64,
crash-on-valid
|
| Assignees |
|
| Reporter |
sjoerdmeijer
|
This IR:
```
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
target triple = "aarch64-unknown-linux-gnu"
define <vscale x 1 x i8> @_Z1ev(<vscale x 1 x i8> %broadcast.splatinsert15) {
entry:
ret <vscale x 1 x i8> %broadcast.splatinsert15
}
```
triggers this crash:
```
LLVM ERROR: Possible incorrect use of EVT::getVectorNumElements() for scalable vector. Scalable flag may be dropped, use EVT::getVectorElementCount() instead
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel <source>
1. Running pass 'Function Pass Manager' on module '<source>'.
2. Running pass 'AArch64 Instruction Selection' on function '@_Z1ev'
#0 0x0000000003bbfd48 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3bbfd48)
#1 0x0000000003bbcf14 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#2 0x000079d361842520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x000079d3618969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x000079d361842476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x000079d3618287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x00000000007ba4ca llvm::json::operator==(llvm::json::Value const&, llvm::json::Value const&) (.cold) JSON.cpp:0:0
#7 0x0000000003b07b49 (/opt/compiler-explorer/clang-trunk/bin/llc+0x3b07b49)
#8 0x000000000388e821 getCopyFromParts(llvm::SelectionDAG&, llvm::SDLoc const&, llvm::SDValue const*, unsigned int, llvm::MVT, llvm::EVT, llvm::Value const*, llvm::SDValue, std::optional<unsigned int>, std::optional<llvm::ISD::NodeType>) (.isra.0) SelectionDAGBuilder.cpp:0:0
#9 0x00000000038b0acc llvm::SelectionDAGISel::LowerArguments(llvm::Function const&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x38b0acc)
#10 0x000000000396d6a5 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x396d6a5)
```
See also: https://godbolt.org/z/Md8WshaYs
Reproduced from this source-code reproducer:
```
char a;
long b;
short c;
signed char *d;
void e() {
for (char f;;)
#pragma clang loop vectorize(enable)
for (char g(!b); g < 25; g++)
a = d[f] >= c;
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs