Advertisement
Zelatrix

new_ir

Jul 2nd, 2021 (edited)
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. ; ModuleID = "D:\early-deliverable\codegen.py"
  2. target triple = "x86_64-pc-windows-msvc"
  3. target datalayout = ""
  4.  
  5. define void @"main"()
  6. {
  7. entry:
  8. %".2" = bitcast [6 x i8]* @"fstr" to i64*
  9. %".3" = alloca double
  10. store double 0x4024000000000000, double* %".3"
  11. br label %"cond"
  12.  
  13. cond:
  14. %".5" = load double, double* %".3"
  15. %".6" = fcmp ogt double %".5", 0x0
  16. %".7" = uitofp i1 %".6" to double
  17. %".8" = fptosi double %".7" to i1
  18. br i1 %".8", label %"entry.if", label %"entry.endif"
  19.  
  20. entry.if:
  21. %".10" = load double, double* %".3"
  22. %".11" = call i32 (i64*, ...) @"printf"(i64* %".2", double %".10")
  23. %".12" = load double, double* %".3"
  24. %".13" = fsub double %".12", 0x3ff0000000000000
  25. store double %".13", double* %".3"
  26. br label %"cond"
  27. entry.endif:
  28. ret void
  29. }
  30.  
  31. declare i32 @"printf"(i64* %".1", ...)
  32.  
  33. @"fstr" = internal constant [6 x i8] c"%lf \0a\00"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement