In HLSL, the unroll count is the upper limit of number of loops, not the number of unrolled iterations per loop in output IR, as it means in LLVM. The HLSL definition means that using the [unroll(count)] can cut off loop iterations before the loop condition would have stopped iteration, and the loop is guaranteed to be completely unrolled. We don't respect this definition in DxCompiler.
In HLSL, the unroll count is the upper limit of number of loops, not the number of unrolled iterations per loop in output IR, as it means in LLVM. The HLSL definition means that using the [unroll(count)] can cut off loop iterations before the loop condition would have stopped iteration, and the loop is guaranteed to be completely unrolled. We don't respect this definition in DxCompiler.