sanjoy added a comment. Didn't look at the code, but this needs a test case that shows we don't hoist the second guard in for (;;) { guard(loop_varying); gurad(loop_invariant); } https://reviews.llvm.org/D50501