Last active
July 27, 2019 03:38
-
-
Save tanmayb123/fbd954387085865a6d7122cc04ea9bb8 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 = '/tmp/webcompile/_8542_0.bc' | |
source_filename = "/tmp/webcompile/_8542_0.cc" | |
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-ellcc-linux" | |
; Function Attrs: noinline nounwind optnone | |
define i32 @_Z5toIntf(float) #0 { | |
%2 = alloca float, align 4 | |
store float %0, float* %2, align 4 | |
%3 = load float, float* %2, align 4 | |
%4 = fptosi float %3 to i32 | |
ret i32 %4 | |
} | |
; Function Attrs: noinline nounwind optnone | |
define float @_Z7toFloati(i32) #0 { | |
%2 = alloca i32, align 4 | |
store i32 %0, i32* %2, align 4 | |
%3 = load i32, i32* %2, align 4 | |
%4 = sitofp i32 %3 to float | |
ret float %4 | |
} | |
; Function Attrs: noinline nounwind optnone | |
define float @_Z3maxff(float, float) #0 { | |
%3 = alloca float, align 4 | |
%4 = alloca float, align 4 | |
%5 = alloca float, align 4 | |
store float %0, float* %4, align 4 | |
store float %1, float* %5, align 4 | |
%6 = load float, float* %4, align 4 | |
%7 = load float, float* %5, align 4 | |
%8 = fcmp ogt float %6, %7 | |
br i1 %8, label %9, label %11 | |
; <label>:9: ; preds = %2 | |
%10 = load float, float* %4, align 4 | |
store float %10, float* %3, align 4 | |
br label %19 | |
; <label>:11: ; preds = %2 | |
%12 = load float, float* %5, align 4 | |
%13 = load float, float* %4, align 4 | |
%14 = fcmp ogt float %12, %13 | |
br i1 %14, label %15, label %17 | |
; <label>:15: ; preds = %11 | |
%16 = load float, float* %5, align 4 | |
store float %16, float* %3, align 4 | |
br label %19 | |
; <label>:17: ; preds = %11 | |
%18 = load float, float* %4, align 4 | |
store float %18, float* %3, align 4 | |
br label %19 | |
; <label>:19: ; preds = %17, %15, %9 | |
%20 = load float, float* %3, align 4 | |
ret float %20 | |
} | |
; Function Attrs: noinline nounwind optnone | |
define i32 @_Z3maxii(i32, i32) #0 { | |
%3 = alloca i32, align 4 | |
%4 = alloca i32, align 4 | |
store i32 %0, i32* %3, align 4 | |
store i32 %1, i32* %4, align 4 | |
%5 = load i32, i32* %3, align 4 | |
%6 = call float @_Z7toFloati(i32 %5) | |
%7 = load i32, i32* %4, align 4 | |
%8 = call float @_Z7toFloati(i32 %7) | |
%9 = call float @_Z3maxff(float %6, float %8) | |
%10 = call i32 @_Z5toIntf(float %9) | |
ret i32 %10 | |
} | |
; Function Attrs: noinline norecurse nounwind optnone | |
define i32 @main() #1 { | |
%1 = alloca i32, align 4 | |
%2 = alloca i32, align 4 | |
%3 = call i32 @_Z3maxii(i32 5, i32 6) | |
store i32 %3, i32* %1, align 4 | |
%4 = call float @_Z3maxff(float 0x4016666660000000, float 0x401F333340000000) | |
%5 = fptosi float %4 to i32 | |
store i32 %5, i32* %2, align 4 | |
ret i32 0 | |
} | |
attributes #0 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+sse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } | |
attributes #1 = { noinline norecurse nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+sse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } | |
!llvm.module.flags = !{!0} | |
!llvm.ident = !{!1} | |
!0 = !{i32 1, !"wchar_size", i32 4} | |
!1 = !{!"ecc version 2017-08-23 (http://ellcc.org) based on clang version 6.0.0 (trunk 311547)"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment