Advertisement
Guest User

Untitled

a guest
Jan 11th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 3.01 KB | None | 0 0
  1. ; ModuleID = '../tests/IntToFloat/mul.c'
  2. source_filename = "../tests/IntToFloat/mul.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 = fmul double %1, %2
  16.   %4 = fcmp ult double %3, 0x4340000000000000
  17.   br i1 %4, label %BBelse, label %BBend
  18.  
  19. BBelse:                                           ; preds = %entry
  20.   %5 = fcmp ogt double %3, 0x41F0000000000000
  21.   %6 = frem double %3, 0x41F0000000000000
  22.   %.1 = select i1 %5, double %6, double %3
  23.   %7 = fcmp ogt double %.1, 0x41DFFFFFFFC00000
  24.   %8 = fadd double %.1, 0xC1E0000000000000
  25.   %9 = fadd double %8, 0xC1E0000000000000
  26.   %.2 = select i1 %7, double %9, double %.1
  27.   %10 = fcmp olt double %3, 0xC1E0000000000000
  28.   br i1 %10, label %BBSMin, label %BBend
  29.  
  30. BBend:                                            ; preds = %entry, %BBelse, %BBSMin
  31.   %.0 = phi double [ %13, %BBSMin ], [ %.2, %BBelse ], [ undef, %entry ]
  32.   %11 = fptosi double %.0 to i32
  33.   %cmp = icmp ne i32 %11, 20
  34.   %conv = zext i1 %cmp to i32
  35.   ret i32 %conv
  36.  
  37. BBSMin:                                           ; preds = %BBelse
  38.   %12 = fadd double %.2, 0x41DFFFFFFFC00000
  39.   %13 = fadd double %12, 0x41E0000000200000
  40.   br label %BBend
  41. }
  42.  
  43. ; Function Attrs: nounwind
  44. declare i64 @strtol(i8* readonly, i8** nocapture, i32) local_unnamed_addr #1
  45.  
  46. 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" }
  47. 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" }
  48. attributes #2 = { nounwind }
  49.  
  50. !llvm.ident = !{!0}
  51.  
  52. !0 = !{!"clang version 4.0.0 (https://github.com/llvm-mirror/clang 98d4f7f7bd5b8b7a797c5adbf8f39e3505cd94d5) (https://github.com/llvm-mirror/llvm 5e6a4929c6dd212b9be713f23313604aacb1822d)"}
  53. !1 = !{!2, !2, i64 0}
  54. !2 = !{!"any pointer", !3, i64 0}
  55. !3 = !{!"omnipotent char", !4, i64 0}
  56. !4 = !{!"Simple C++ TBAA"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement