[clang] [CIR] Implement loop-hint lowering (PR #247320)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 1 05:53:17 PST 2026
================
@@ -419,7 +419,7 @@ void test_do_while_false() {
// LLVM: [[LABEL1]]:
// LLVM: br label %[[LABEL2:.*]]
// LLVM: [[LABEL2]]:
-// LLVM: br i1 false, label %[[LABEL2]], label %[[LABEL4:.*]]
+// LLVM: br i1 false, label %[[LABEL2]], label %[[LABEL4:.*]], !llvm.loop {{[^,]*}}
----------------
xlauko wrote:
nit, follow-up: this edit only absorbs the new `!llvm.loop` on the dead `do {} while (false)` latch; classic emits no loop there. Folding the constant-false latch in CIRGen (as `EmitDoStmt` does) would make it unnecessary, and the same goes for `loop-cond-cleanup.cpp:416`.
https://github.com/llvm/llvm-project/pull/247320
More information about the cfe-commits
mailing list