Evaluating @view macro before @tturbo

I am revising a piece of code where I am removing unnecessary copies by creating views. At places where I have @tturbo decorators, I get errors because LoopVectorization does not like the @view. Is it possible to make the preferred solution work by first expanding the @view and then @tturbo? I added working solutions that either come with an additional line, or writing view as a function that would make it inconsistent with the rest of my code.

using LoopVectorization

a = rand(128, 128, 128)
b = similar(a)

# original with unnecessary copy
b[10:20, 10:20, 10:20] .= a[10:20, 10:20, 10:20]

# preferred solution
# @tturbo b[10:20, 10:20, 10:20] .= @view a[10:20, 10:20, 10:20]

# two line fix
av = @view a[10:20, 10:20, 10:20]
@tturbo b[10:20, 10:20, 10:20] .= av

# one line fix
@tturbo b[10:20, 10:20, 10:20] .= view(a, 10:20, 10:20, 10:20)

It looks to me like Loopvectorization works better when writting out the loops.

Try :

@tturbo for i in 1:10, j in 1:10, k in 1:10
    b[i,j,k] = a[i,j,k]
end

of course, inside a function. Furthermore, always look at @code_warntype and benchmarkTool.@btime when you are doing these kinds of transformations.