Guest User

Untitled

a guest
Apr 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. define {i64, i1} @addo.apint.i64 ( i64 %left, i64 %right )
  2. {
  3. entry:
  4. %extleft = zext i64 %left to i65
  5. %extright = zext i64 %right to i65
  6. %sum = add i65 %extleft, %extright
  7. %res.0 = trunc i65 %sum to i64
  8. %overflow = and i65 %sum, -18446744073709551616
  9. %res.1 = icmp ne i65 %overflow, 0
  10. %final0 = insertvalue {i64, i1} undef, i64 %res.0, 0
  11. %final1 = insertvalue {i64, i1} %final0, i1 %res.1, 1
  12. ret {i64, i1} %final1
  13. }
  14.  
  15. define {i64, i1} @addo.intrinsics.i64 ( i64 %left, i64 %right )
  16. {
  17. entry:
  18. %call = call {i64, i1} @llvm.uadd.with.overflow.i64 ( i64 %left, i64 %right )
  19. ret {i64, i1} %call
  20. }
  21.  
  22. declare {i64, i1} @llvm.uadd.with.overflow.i64 ( i64 %left, i64 %right ) nounwind readnone
Add Comment
Please, Sign In to add comment