Found a bug.
This commit is contained in:
parent
03d7080396
commit
fecb71bc07
5 changed files with 70 additions and 19 deletions
16
llvm.ll
Normal file
16
llvm.ll
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
@.str = private unnamed_addr constant [3 x i8] c"%i
|
||||
", align 1
|
||||
declare i32 @printf(ptr noalias nocapture, ...)
|
||||
|
||||
; Ident "main": EAdd (TMono (Ident "Int")) (ELit (TMono (Ident "Int")) (LInt 3)) (EApp (TMono (Ident "Int")) (EId (Ident "sc_0",TArr (TPol (Ident "t1")) (TPol (Ident "t1")))) (ELit (TMono (Ident "Int")) (LInt 3)))
|
||||
define i64 @main() {
|
||||
%1 = call i64 @sc_0(i64 3)
|
||||
%2 = add i64 3, %1
|
||||
call i32 (ptr, ...) @printf(ptr noundef @.str, i64 noundef %2)
|
||||
ret i64 0
|
||||
}
|
||||
|
||||
; Ident "sc_0": EId (Ident "x_0",TPol (Ident "t1"))
|
||||
define "TPol (Ident "t1")" @sc_0("TPol (Ident "t1")" %x_0) {
|
||||
ret i64 %x_0
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue