There was a lot of discussion of this on the proposal, starting with (and well summarized by)
https://go.dev/issue/61515#issuecomment-1646194700. If we don't inline, there will be cases like yours that wanted to benchmark with inlining but don't get it. If we do inline, there will be cases that are unintentionally inlined and simplified in unexpected ways. Ultimately, the decision was to err on the side of avoiding accidental inlining since that seems to give a better experience for folks not thinking about detailed compiler internals.
In fact, we can see evidence of dealing with the latter case (unintentional inlining) in your example, with the "stringLine" global variable. A naive implementation might just put something like `line := "\r\n\r\n\r\n"` directly in the loop body. Then once Strings_TrimNewline is inlined, since `line` is a constant, all of the len(s) operations would become constant. The compiler may even make the slicing constants and turn 100% of the function body into a constant (I don't think our compiler currently does so, but there is no reason it couldn't). This would make the benchmark very misleading. You've avoided this problem by forcing the string to load from a global, but the idea behind b.Loop avoiding optimizations is that we don't want users to have to think of these things.