Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ModuleID = '<stdin>'
- source_filename = "test.c"
- target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-unknown-linux-gnu"
- @.str = private unnamed_addr constant [20 x i8] c"Enter two numbers: \00", align 1
- @.str.1 = private unnamed_addr constant [6 x i8] c"%f %f\00", align 1
- @.str.2 = private unnamed_addr constant [9 x i8] c"c1 = %f\0A\00", align 1
- ; Function Attrs: noinline nounwind optnone uwtable
- define i32 @main() #0 {
- entry:
- %retval = alloca i32, align 4
- %a = alloca float, align 4
- %b = alloca float, align 4
- %c = alloca float, align 4
- store i32 0, i32* %retval, align 4
- %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i32 0, i32 0))
- %call1 = call i32 (i8*, ...) @__isoc99_scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), float* %a, float* %b)
- %0 = load float, float* %a, align 4
- %1 = load float, float* %b, align 4
- %add = fadd float %0, %1
- store float %add, float* %c, align 4
- %2 = load float, float* %c, align 4
- %conv = fpext float %2 to double
- %call2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i32 0, i32 0), double %conv)
- ret i32 0
- }
- declare i32 @printf(i8*, ...) #1
- declare i32 @__isoc99_scanf(i8*, ...) #1
- attributes #0 = { noinline nounwind optnone uwtable "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,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
- attributes #1 = { "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-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,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
- !llvm.module.flags = !{!0}
- !llvm.ident = !{!1}
- !0 = !{i32 1, !"wchar_size", i32 4}
- !1 = !{!"clang version 5.0.0 (trunk 304972)"}
Add Comment
Please, Sign In to add comment