[clang] [llvm] [LoopUnroll] Add flag to enforce loop unroll pragma regardless of expensive trip count (PR #180961)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 12 08:07:52 PST 2026


nikic wrote:

Yes, I know that this is not how it works right now, but I believe this is just an implementation bug, not an intentional choice. The unroll pragmas exist specifically to override these kinds of heuristics, and we should respect them.

If you believe that fixing this would cause problematic impact in practice, please provide evidence of that.

Adding a clang driver option is certainly unacceptable as a "stop-gap" measure. If you need a stop-gap measure, you need to keep this downstream.

https://github.com/llvm/llvm-project/pull/180961


More information about the cfe-commits mailing list