Last active
February 20, 2017 11:01
-
-
Save rhysd/8e59638ef8d3b3e5de645247a02efc24 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'foo.ml' | |
source_filename = "foo.ml" | |
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-apple-darwin15.6.0" | |
declare void @println_bool(i1) #0 | |
; Function Attrs: ssp uwtable | |
define i32 @main() #1 { | |
entry: | |
%"$k4" = alloca { double, i1 } | |
%"$k4.0" = getelementptr inbounds { double, i1 }, { double, i1 }* %"$k4", i32 0, i32 0 | |
store double 3.140000e+00, double* %"$k4.0" | |
%"$k4.1" = getelementptr inbounds { double, i1 }, { double, i1 }* %"$k4", i32 0, i32 1 | |
store i1 true, i1* %"$k4.1" | |
%"a$t1" = alloca { i64, { double, i1 }* } | |
%"a$t1.0" = getelementptr inbounds { i64, { double, i1 }* }, { i64, { double, i1 }* }* %"a$t1", i32 0, i32 0 | |
store i64 1, i64* %"a$t1.0" | |
%"a$t1.1" = getelementptr inbounds { i64, { double, i1 }* }, { i64, { double, i1 }* }* %"a$t1", i32 0, i32 1 | |
store { double, i1 }* %"$k4", { double, i1 }** %"a$t1.1" | |
%"$k9" = alloca { double, i1 } | |
%"$k9.0" = getelementptr inbounds { double, i1 }, { double, i1 }* %"$k9", i32 0, i32 0 | |
store double 3.130000e+00, double* %"$k9.0" | |
%"$k9.1" = getelementptr inbounds { double, i1 }, { double, i1 }* %"$k9", i32 0, i32 1 | |
store i1 true, i1* %"$k9.1" | |
%"b$t2" = alloca { i64, { double, i1 }* } | |
%"b$t2.0" = getelementptr inbounds { i64, { double, i1 }* }, { i64, { double, i1 }* }* %"b$t2", i32 0, i32 0 | |
store i64 1, i64* %"b$t2.0" | |
%"b$t2.1" = getelementptr inbounds { i64, { double, i1 }* }, { i64, { double, i1 }* }* %"b$t2", i32 0, i32 1 | |
store { double, i1 }* %"$k9", { double, i1 }** %"b$t2.1" | |
%tpl.left = getelementptr inbounds { i64, { double, i1 }* }, { i64, { double, i1 }* }* %"a$t1", i32 0, i32 0 | |
%0 = load i64, i64* %tpl.left | |
%tpl.right = getelementptr inbounds { i64, { double, i1 }* }, { i64, { double, i1 }* }* %"b$t2", i32 0, i32 0 | |
%1 = load i64, i64* %tpl.right | |
%eql = icmp eq i64 %0, %1 | |
%tpl.left1 = getelementptr inbounds { i64, { double, i1 }* }, { i64, { double, i1 }* }* %"a$t1", i32 0, i32 1 | |
%2 = load { double, i1 }*, { double, i1 }** %tpl.left1 | |
%tpl.right2 = getelementptr inbounds { i64, { double, i1 }* }, { i64, { double, i1 }* }* %"b$t2", i32 0, i32 1 | |
%3 = load { double, i1 }*, { double, i1 }** %tpl.right2 | |
%tpl.left3 = getelementptr inbounds { double, i1 }, { double, i1 }* %2, i32 0, i32 0 | |
%4 = load double, double* %tpl.left3 | |
%tpl.right4 = getelementptr inbounds { double, i1 }, { double, i1 }* %3, i32 0, i32 0 | |
%5 = load double, double* %tpl.right4 | |
%eql5 = fcmp oeq double %4, %5 | |
%tpl.left6 = getelementptr inbounds { double, i1 }, { double, i1 }* %2, i32 0, i32 1 | |
%6 = load i1, i1* %tpl.left6 | |
%tpl.right7 = getelementptr inbounds { double, i1 }, { double, i1 }* %3, i32 0, i32 1 | |
%7 = load i1, i1* %tpl.right7 | |
%eql8 = icmp eq i1 %6, %7 | |
%eql.tpl = and i1 %eql5, %eql8 | |
%eql.tpl9 = and i1 %eql, %eql.tpl | |
call void @println_bool(i1 %eql.tpl9) | |
ret i32 0 | |
} | |
attributes #0 = { "disable-tail-calls"="false" } | |
attributes #1 = { ssp uwtable "disable-tail-calls"="false" } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'foo.ml' | |
source_filename = "foo.ml" | |
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-apple-darwin15.6.0" | |
declare void @println_bool(i1) local_unnamed_addr #0 | |
; Function Attrs: ssp uwtable | |
define i32 @main() local_unnamed_addr #1 { | |
entry: | |
tail call void @println_bool(i1 false) | |
ret i32 0 | |
} | |
attributes #0 = { "disable-tail-calls"="false" } | |
attributes #1 = { ssp uwtable "disable-tail-calls"="false" } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment