Issue 149730
Summary [LV] Crash in llvm::VPlanTransforms::buildPlainCFG
Labels new issue
Assignees
Reporter sjoerdmeijer
    See also: https://godbolt.org/z/xaKeMP6zh

This input:

```
bool a;
short b;
void fn1(bool c, short d[][2][2]) {
  for (char e = 0; e < (char)b; e++)
    for (char f(c); f < 020; f += 2)
      a = d[f][f][f] ?: d[e][f][e] - d[e][f + 2][e];
}
```

compiled with: `-std=c++11 -Ofast -floop-interchange  -mcpu=grace`

Results in this crash:

```
 #0 0x0000000003c90a38 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3c90a38)
 #1 0x0000000003c8e40c llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3c8e40c)
 #2 0x0000000003bde738 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007bd8f5e42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x000000000589fc68 llvm::VPlanTransforms::buildPlainCFG(llvm::Loop*, llvm::LoopInfo&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x589fc68)
 #5 0x000000000574ceaa llvm::LoopVectorizationPlanner::buildVPlansWithVPRecipes(llvm::ElementCount, llvm::ElementCount) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x574ceaa)
 #6 0x000000000574d6a3 llvm::LoopVectorizationPlanner::plan(llvm::ElementCount, unsigned int) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x574d6a3)
```

I haven't created an IR reproducer yet.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to