Advertisement
Guest User

Untitled

a guest
Jan 11th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 2.55 KB | None | 0 0
  1. ; ModuleID = '../tests/IntToFloat/add.c'
  2. source_filename = "../tests/IntToFloat/add.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. ; Function Attrs: norecurse nounwind uwtable
  7. define i32 @main(i32 %argc, i8** nocapture readonly %argv) local_unnamed_addr #0 {
  8. entry:
  9.   %arrayidx = getelementptr inbounds i8*, i8** %argv, i64 1
  10.   %0 = load i8*, i8** %arrayidx, align 8, !tbaa !1
  11.   %call.i = tail call i64 @strtol(i8* nocapture nonnull %0, i8** null, i32 10) #2
  12.   %conv.i = trunc i64 %call.i to i32
  13.   %1 = sitofp i32 %argc to double
  14.   %2 = sitofp i32 %conv.i to double
  15.   %3 = fadd double %1, %2
  16.   %4 = fcmp ogt double %3, 0x41F0000000000000
  17.   %5 = frem double %3, 0x41F0000000000000
  18.   %.1 = select i1 %4, double %5, double %3
  19.   %6 = fcmp ogt double %.1, 0x41DFFFFFFFC00000
  20.   %7 = fadd double %.1, 0xC1E0000000000000
  21.   %8 = fadd double %7, 0xC1E0000000000000
  22.   %.2 = select i1 %6, double %8, double %.1
  23.   %9 = fcmp olt double %3, 0xC1E0000000000000
  24.   %10 = fadd double %.2, 0x41DFFFFFFFC00000
  25.   %11 = fadd double %10, 0x41E0000000200000
  26.   %.0 = select i1 %9, double %11, double %.2
  27.   %12 = fptosi double %.0 to i32
  28.   ret i32 %12
  29. }
  30.  
  31. ; Function Attrs: nounwind
  32. declare i64 @strtol(i8* readonly, i8** nocapture, i32) local_unnamed_addr #1
  33.  
  34. attributes #0 = { norecurse nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "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" }
  35. attributes #1 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "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" }
  36. attributes #2 = { nounwind }
  37.  
  38. !llvm.ident = !{!0}
  39.  
  40. !0 = !{!"clang version 4.0.0 (https://github.com/llvm-mirror/clang 98d4f7f7bd5b8b7a797c5adbf8f39e3505cd94d5) (https://github.com/llvm-mirror/llvm 5e6a4929c6dd212b9be713f23313604aacb1822d)"}
  41. !1 = !{!2, !2, i64 0}
  42. !2 = !{!"any pointer", !3, i64 0}
  43. !3 = !{!"omnipotent char", !4, i64 0}
  44. !4 = !{!"Simple C++ TBAA"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement