Advertisement
Guest User

Untitled

a guest
Sep 14th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 1.11 KB | None | 0 0
  1. define i1 @test1(i32 %x, i32 %y, i32 %z) nounwind readnone {
  2.   %A = shl i32 %x, %z
  3.   %B = shl i32 %y, %z
  4.   %C = icmp eq i32 %A, %B
  5.   ret i1 %C
  6. }
  7.  
  8. define i1 @test2(i32 %x, i32 %y, i32 %z) nounwind readnone {
  9.   %A = mul nuw nsw i32 %x, %z
  10.   %B = mul nuw nsw i32 %y, %z
  11.   %C = icmp eq i32 %A, %B
  12.   ret i1 %C
  13. }
  14.  
  15. define i1 @test3(i32 %x, i32 %y, i32 %z) nounwind readnone {
  16.   %A = lshr exact i32 %x, %z
  17.   %B = lshr exact i32 %y, %z
  18.   %C = icmp eq i32 %A, %B
  19.   ret i1 %C
  20. }
  21.  
  22. define i1 @test4(i32 %x, i32 %y, i32 %z) nounwind readnone {
  23.   %A = ashr exact i32 %x, %z
  24.   %B = ashr exact i32 %y, %z
  25.   %C = icmp eq i32 %A, %B
  26.   ret i1 %C
  27. }
  28.  
  29. define i1 @test5(i32 %x, i32 %y, i32 %z) nounwind readnone {
  30.   %A = sdiv exact i32 %x, %z
  31.   %B = sdiv exact i32 %y, %z
  32.   %C = icmp eq i32 %A, %B
  33.   ret i1 %C
  34. }
  35.  
  36. define i1 @test6(i32 %x, i32 %y, i32 %z) nounwind readnone {
  37.   %A = udiv exact i32 %x, %z
  38.   %B = udiv exact i32 %y, %z
  39.   %C = icmp eq i32 %A, %B
  40.   ret i1 %C
  41. }
  42.  
  43. define i1 @test7(i32 %x, i32 %y, i32 %z) nounwind readnone {
  44.   %A = xor i32 %x, %z
  45.   %B = xor i32 %y, %z
  46.   %C = icmp eq i32 %A, %B
  47.   ret i1 %C
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement