Last year review D144634 introduced mapping of loop construct with a bind clause to for/distribute/simd, depending on specifics. I can only see the last diff, but judging from the comments this was first implemented in codegen.
The only comment about doing it in sema seemed to refer to creating temporary AST nodes in codegen (to use with Emit... functions).
The consequence of doing it in sema is that we need to keep around the original directive, plus the one after mapping, and doing different things depending on whether for directive came from the source or was the result of the mapping. All of that seems like an unnecessary complexity.
I think that moving it back to codegen, and keeping the loop directive in the AST would be much cleaner.
Are there any reasons for doing it in sema that I missed?