[llvm] [Kaleidoscope] Fix ForExprAST::codegen (PR #88207)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 10:07:13 PDT 2024


================
@@ -682,53 +682,77 @@ Value *IfExprAST::codegen() {
 }
 
 // Output for-loop as:
+// entry:
 //   ...
 //   start = startexpr
-//   goto loop
+//   goto loopcond
+// loopcond:
+//   variable = phi [start, loopheader], [nextvariable, loop]
----------------
Logikable wrote:

Replace `loopheader` with `entry`.

https://github.com/llvm/llvm-project/pull/88207


More information about the llvm-commits mailing list