diff options
author | Asher Mancinelli <ashermancinelli@gmail.com> | 2025-02-10 08:21:22 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-10 08:21:22 -0800 |
commit | 6b52fb25b90e575b507343bde0162d3d652ff666 (patch) | |
tree | c02480adde6563746a3c273b61082f44225eaa58 /llvm/lib/CodeGen/MachineOperand.cpp | |
parent | f3cd2238383f695c719e7eab6aebec828781ec91 (diff) | |
download | llvm-6b52fb25b90e575b507343bde0162d3d652ff666.zip llvm-6b52fb25b90e575b507343bde0162d3d652ff666.tar.gz llvm-6b52fb25b90e575b507343bde0162d3d652ff666.tar.bz2 |
[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.
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions