bitwiseInstructions.3.2.ll 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. ; RUN: llvm-dis < %s.bc| FileCheck %s
  2. ; RUN: verify-uselistorder < %s.bc
  3. ; bitwiseOperations.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
  4. ; The test checks that LLVM does not misread bitwise instructions from
  5. ; older bitcode files.
  6. define void @shl(i8 %x1){
  7. entry:
  8. ; CHECK: %res1 = shl i8 %x1, %x1
  9. %res1 = shl i8 %x1, %x1
  10. ; CHECK: %res2 = shl nuw i8 %x1, %x1
  11. %res2 = shl nuw i8 %x1, %x1
  12. ; CHECK: %res3 = shl nsw i8 %x1, %x1
  13. %res3 = shl nsw i8 %x1, %x1
  14. ; CHECK: %res4 = shl nuw nsw i8 %x1, %x1
  15. %res4 = shl nuw nsw i8 %x1, %x1
  16. ret void
  17. }
  18. define void @lshr(i8 %x1){
  19. entry:
  20. ; CHECK: %res1 = lshr i8 %x1, %x1
  21. %res1 = lshr i8 %x1, %x1
  22. ; CHECK: %res2 = lshr exact i8 %x1, %x1
  23. %res2 = lshr exact i8 %x1, %x1
  24. ret void
  25. }
  26. define void @ashr(i8 %x1){
  27. entry:
  28. ; CHECK: %res1 = ashr i8 %x1, %x1
  29. %res1 = ashr i8 %x1, %x1
  30. ; CHECK-NEXT: %res2 = ashr exact i8 %x1, %x1
  31. %res2 = ashr exact i8 %x1, %x1
  32. ret void
  33. }
  34. define void @and(i8 %x1){
  35. entry:
  36. ; CHECK: %res1 = and i8 %x1, %x1
  37. %res1 = and i8 %x1, %x1
  38. ret void
  39. }
  40. define void @or(i8 %x1){
  41. entry:
  42. ; CHECK: %res1 = or i8 %x1, %x1
  43. %res1 = or i8 %x1, %x1
  44. ret void
  45. }
  46. define void @xor(i8 %x1){
  47. entry:
  48. ; CHECK: %res1 = xor i8 %x1, %x1
  49. %res1 = xor i8 %x1, %x1
  50. ret void
  51. }