================ @@ -1242,9 +1242,17 @@ void CodeGenFunction::EmitDoStmt(const DoStmt &S, // As long as the condition is true, iterate the loop. if (EmitBoolCondBranch) { uint64_t BackedgeCount = getProfileCount(S.getBody()) - ParentCount; - Builder.CreateCondBr( + auto *I = Builder.CreateCondBr( BoolCondVal, LoopBody, LoopExit.getBlock(), createProfileWeightsForLoop(S.getCond(), BackedgeCount)); + + // Key Instructions: Emit the condition and branch as separate atoms to + // match existing loop stepping behaviour. FIXME: We could have the branch ---------------- jmorse wrote:
IMO "existing" should be expanded into what the stepping actually is, as this comment could unexpectedly go out of date. https://github.com/llvm/llvm-project/pull/134644 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits