I broke 2 of these with a patch, but were not covered by existing tests.
As I understand the language reference, ("The optimizers may change the order of volatile operations relative to non-volatile operations.") the loop can be distributed as long as there all volatile operations stay in the same loop. I this is meant to test the current implementation, can you add a comment to make this clear (such as "TODO: distribution of volatile may be possible under some circumstance, but the current implementation does not touch them")
This might not sufficiently check that no distribution occured. The br i1 %exitcond does match br i1 %exitcond.ldist1. Is there a guaranteed that the ldist loops are added before the original %for.body/%exitcond pair?
[nit] To avoid some ambiguity understanding the sentence: "Make sure the loop is not vectorized due to the volatile, even though it has no memory writes"
Add comment about what this is supposed to test? Such as "Ensure that volatile stores are not vectorized"