Asher Mancinelli 6b52fb25b9
[flang] Correctly handle !dir$ unroll with unrolling factors of 0 and 1 (#126170)
https://github.com/llvm/llvm-project/pull/123331 added support for the
unrolling directive. In the presence of an explicit unrolling factor,
that unrolling factor would be unconditionally passed into the metadata
even when it was 1 or 0. These special cases should instead disable
unrolling. Adding an explicit unrolling factor of 0 triggered this
assertion which is fixed by this patch:

```
unsigned int unrollCountPragmaValue(const llvm::Loop*):
Assertion `Count >= 1 && "Unroll count must be positive."' failed.
```

Updated tests and documentation.
2025-02-10 08:21:22 -08:00
..
2024-05-15 13:10:16 +01:00
2024-12-18 07:02:37 -08:00
2024-12-18 07:02:37 -08:00