Correct if-then-else LLVM asm example.
As was present vividly breaks LLVM IR constraints on SSA and basic-blocks: same var being assigned twice, no control transfer at the end of basic block. Compare with the original: http://www.mdevan.org/llvm-py/kaleidoscope/PythonLangImpl5.html
This commit is contained in:
parent
20d0bf9f2a
commit
bf484aa216
1 changed files with 2 additions and 1 deletions
|
|
@ -217,7 +217,8 @@ Kaleidoscope looks something like this:
|
|||
br i1 %ifcond, label %then, label %else
|
||||
|
||||
then: ; preds = %entry
|
||||
%calltmp1 = call double @bar()
|
||||
%calltmp = call double @foo()
|
||||
br label %ifcont
|
||||
|
||||
else: ; preds = %entry
|
||||
%calltmp1 = call double @bar()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue