I’m not a LoopVectorization user so others will chime in but did you look at the package’s Readme, in particular this part:
We expect that any time you use the
@turbomacro with a given block of code that you:
…
3. Are not relying on a specific execution order.@turbocan and will re-order operations and loops inside its scope, so the correctness cannot depend on a particular order. You cannot implementcumsumwith@turbo.