mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 11:16:06 +00:00

We recently discovered that the loop with a dynamic upper bound is unexpectedly unrolled during the NVVM to PTX process. By attaching the `llvm.loop_annotation`, we can control the unrolling behavior precisely. This PR enables the `cf.cond_br` to retain the loop annotation of `scf.for` after the `convert-scf-to-cf` pass. This change allows users to have precise control over the loop behavior during backend transformation. --------- Co-authored-by: Xiaolei Shi <xiaoleis@nvidia.com>