montimaj

test2.s

Jun 28th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.59 KB | None | 0 0
  1. ; ModuleID = '<stdin>'
  2. source_filename = "test.c"
  3. target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
  4. target triple = "x86_64-unknown-linux-gnu"
  5.  
  6. @.str = private unnamed_addr constant [20 x i8] c"Enter two numbers: \00", align 1
  7. @.str.1 = private unnamed_addr constant [6 x i8] c"%f %f\00", align 1
  8. @.str.2 = private unnamed_addr constant [9 x i8] c"c1 = %f\0A\00", align 1
  9.  
  10. ; Function Attrs: noinline nounwind optnone uwtable
  11. define i32 @main() #0 {
  12. entry:
  13.   %retval = alloca i32, align 4
  14.   %a = alloca float, align 4
  15.   %b = alloca float, align 4
  16.   %c = alloca float, align 4
  17.   store i32 0, i32* %retval, align 4
  18.   %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i32 0, i32 0))
  19.   %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)
  20.   %0 = load float, float* %a, align 4
  21.   %1 = load float, float* %b, align 4
  22.   %2 = fadd float %0, %1
  23.   %3 = fadd float %2, 5.000000e+00
  24.   %4 = call float @llvm.foo.foo_sqrt_test(float %3)
  25.   store float %4, float* %c, align 4
  26.   %5 = load float, float* %c, align 4
  27.   %conv = fpext float %5 to double
  28.   %call2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i32 0, i32 0), double %conv)
  29.   ret i32 0
  30. }
  31.  
  32. declare i32 @printf(i8*, ...) #1
  33.  
  34. declare i32 @__isoc99_scanf(i8*, ...) #1
  35.  
  36. ; Function Attrs: nounwind readnone
  37. declare float @llvm.foo.foo_sqrt_test(float) #2
  38.  
  39. 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" }
  40. 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" }
  41. attributes #2 = { nounwind readnone }
  42.  
  43. !llvm.module.flags = !{!0}
  44. !llvm.ident = !{!1}
  45.  
  46. !0 = !{i32 1, !"wchar_size", i32 4}
  47. !1 = !{!"clang version 5.0.0 (trunk 304972)"}
Add Comment
Please, Sign In to add comment