Basic Comparisons

This commit is contained in:
gingerBill
2016-08-01 00:34:15 +01:00
parent 70f6282f41
commit 88e05ad2b2
7 changed files with 124 additions and 46 deletions
+2
View File
@@ -1,4 +1,6 @@
int main() {
float a = 0.5;
float b = 1.5;
int c = a < b;
return 0;
}
-14
View File
@@ -2,19 +2,5 @@ define void @main() {
entry:
%0 = alloca i64, align 8 ; a
store i64 zeroinitializer, i64* %0
%1 = alloca i64, align 8 ; b
store i64 zeroinitializer, i64* %1
store i64 1, i64* %0
store i64 2, i64* %1
%2 = load i64, i64* %0
%3 = add i64 %2, 1
store i64 %3, i64* %0
%4 = load i64, i64* %1
%5 = add i64 %4, 1
store i64 %5, i64* %1
%6 = load i64, i64* %1
%7 = load i64, i64* %0
%8 = add i64 %7, %6
store i64 %8, i64* %0
ret void
}
+1 -4
View File
@@ -1,6 +1,3 @@
main :: proc() {
a, b := 1, 2;
a++;
b++;
a += b;
a : int;
}