| Issue |
204163
|
| Summary |
[SLP] `tryToVectorizeGatheredLoads` compile-time hang with large masked-gather load cluster
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
saurabhk
|
## Summary
LLVM `opt -passes="default<O3>"` appears to hang in `SLPVectorizerPass` on a reduced IR testcase containing a large gathered-load cluster. The issue reproduces on LLVM 20.1.7 and latest release LLVM 22.1.7.
The hang goes away if SLP is disabled with `-vectorize-slp=false`.
## Reproducer
Attached reduced IR:
`slp-gather-load-hang-reproducer.lll`
[slp-gather-load-hang-reproducer.ll.txt](https://github.com/user-attachments/files/29005109/slp-gather-load-hang-reproducer.ll.txt)
Size: ~426 KB.
## Versions Tested
Reproduces with LLVM 22.1.7, built from tag `llvmorg-22.1.7`.
Also reproduced locally with LLVM 20.1.7.
Reproduction Command
```timeout 30s /path/to/opt -passes="default<O3>" slp-gather-load-hang-reproducer.ll -S -o /dev/null```
Actual result:
```exit code 124```
Control Command
```timeout 30s /path/to/opt -passes="default<O3>" -vectorize-slp=false slp-gather-load-hang-reproducer.ll -S -o /dev/null```
Result:
```exit code 0```
Pass-Manager Trace
With:
```timeout 10s /path/to/opt -debug-pass-manager -passes="default<O3>" slp-gather-load-hang-reproducer.ll -S -o /dev/null```
the timeout occurs while running:
```Running pass: SLPVectorizerPass on g0```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs