Advertisement
Zelatrix

current_ir

Jul 4th, 2021 (edited)
1,985
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 0.96 KB | None | 0 0
  1. This is the entry block:
  2. %"entry" = entry:
  3.   %".2" = bitcast [6 x i8]* @"fstr" to i64*
  4.   %".3" = alloca double
  5.   store double 0x3ff0000000000000, double* %".3"
  6.   %".5" = alloca double
  7.   store double 0x4024000000000000, double* %".5"
  8.   br label %"entry.cond"
  9.  
  10. This is the main function:
  11. define i32 @"main_fn"()
  12. {
  13. entry:
  14. entry.cond:
  15.   %".2" = load double, double* %".5"
  16.   %".3" = fcmp ogt double %".2",              0x0
  17.   %".4" = uitofp i1 %".3" to double
  18.   %".5" = fptosi double %".4" to i1
  19.   br i1 %".5", label %"entry.if", label %"entry.endif"
  20. entry.if:
  21.   %".7" = load double, double* %".3"
  22.   %".8" = call i32 (i64*, ...) @"printf"(i64* %".2", double %".7")
  23.   %".9" = load double, double* %".3"
  24.   %".10" = fmul double %".9", 0x4000000000000000
  25.   store double %".10", double* %".3"
  26.   %".12" = load double, double* %".5"
  27.   %".13" = fsub double %".12", 0x3ff0000000000000
  28.   store double %".13", double* %".5"
  29.   br label %"entry.cond"
  30. entry.endif:
  31.   ret void
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement