[llvm] [LoopUnroll] Ensure we can accept both `llvm.loop.unroll.full` and `llvm.loop.unroll.enable` metadata on the same loop (NFC) (PR #182381)

Justin Fargnoli via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 10:00:01 PST 2026


justinfargnoli wrote:

> Could you please clarify what the expected semantics of this configuration are? Is it effectively equivalent to only setting enable? Or is there some difference from also setting full?

In the test case, the expected semantics are equivalent to just setting `enable`. 

I'm trying to ensure that frontends can emit both `llvm.loop.unroll.full` and `llvm.loop.unroll.enable` on the same loops, regardless of which will actually apply to a loop. 

@arsenm [suggested](https://github.com/llvm/llvm-project/pull/182381#discussion_r2831659688) writing a test that actually demonstrates the functionality instead of merely checking that it passes the verifier (which is all I'm really after).  

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


More information about the llvm-commits mailing list