Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. InstCombinePass ---------------------------------------- define i1 @PR1817_1(i32 %X) { #0: %A = icmp slt i32 %X, 10 %B = icmp ult i32 %X, 10 %C = and i1 %A, %B ret i1 %C } Transformation seems to be correct! (syntactically equal) -- 3. InstCombinePass ---------------------------------------- define i1 @PR1817_1(i32 %X) { #0: %A = icmp slt i32 %X, 10 %B = icmp ult i32 %X, 10 %C = and i1 %A, %B ret i1 %C } => define i1 @PR1817_1(i32 %X) { #0: %B = icmp ult i32 %X, 10 ret i1 %B } Transformation seems to be correct! -- 4. PassManager<Function> : Skipping NOP -- 5. PassManager<Function> : Skipping NOP -- 6. InstCombinePass ---------------------------------------- define i1 @PR1817_1_logical(i32 %X) { #0: %A = icmp slt i32 %X, 10 %B = icmp ult i32 %X, 10 %C = select i1 %A, i1 %B, i1 0 ret i1 %C } Transformation seems to be correct! (syntactically equal) -- 7. InstCombinePass ---------------------------------------- define i1 @PR1817_1_logical(i32 %X) { #0: %A = icmp slt i32 %X, 10 %B = icmp ult i32 %X, 10 %C = select i1 %A, i1 %B, i1 0 ret i1 %C } => define i1 @PR1817_1_logical(i32 %X) { #0: %B = icmp ult i32 %X, 10 ret i1 %B } Transformation seems to be correct! -- 8. PassManager<Function> : Skipping NOP -- 9. PassManager<Function> : Skipping NOP -- 10. InstCombinePass ---------------------------------------- define i1 @PR1817_2(i32 %X) { #0: %A = icmp slt i32 %X, 10 %B = icmp ult i32 %X, 10 %C = or i1 %A, %B ret i1 %C } Transformation seems to be correct! (syntactically equal) -- 11. InstCombinePass ---------------------------------------- define i1 @PR1817_2(i32 %X) { #0: %A = icmp slt i32 %X, 10 %B = icmp ult i32 %X, 10 %C = or i1 %A, %B ret i1 %C } => define i1 @PR1817_2(i32 %X) { #0: %A = icmp slt i32 %X, 10 ret i1 %A } Transformation seems to be correct! -- 12. PassManager<Function> : Skipping NOP -- 13. PassManager<Function> : Skipping NOP -- 14. InstCombinePass ---------------------------------------- define i1 @PR1817_2_logical(i32 %X) { #0: %A = icmp slt i32 %X, 10 %B = icmp ult i32 %X, 10 %C = select i1 %A, i1 1, i1 %B ret i1 %C } Transformation seems to be correct! (syntactically equal) -- 15. InstCombinePass ---------------------------------------- define i1 @PR1817_2_logical(i32 %X) { #0: %A = icmp slt i32 %X, 10 %B = icmp ult i32 %X, 10 %C = select i1 %A, i1 1, i1 %B ret i1 %C } => define i1 @PR1817_2_logical(i32 %X) { #0: %A = icmp slt i32 %X, 10 ret i1 %A } Transformation seems to be correct! -- 16. PassManager<Function> : Skipping NOP -- 17. PassManager<Function> : Skipping NOP -- 18. InstCombinePass ---------------------------------------- define i1 @PR2330(i32 %a, i32 %b) { #0: %cmp1 = icmp ult i32 %a, 8 %cmp2 = icmp ult i32 %b, 8 %and = and i1 %cmp2, %cmp1 ret i1 %and } Transformation seems to be correct! (syntactically equal) -- 19. InstCombinePass ---------------------------------------- define i1 @PR2330(i32 %a, i32 %b) { #0: %cmp1 = icmp ult i32 %a, 8 %cmp2 = icmp ult i32 %b, 8 %and = and i1 %cmp2, %cmp1 ret i1 %and } => define i1 @PR2330(i32 %a, i32 %b) { #0: %#1 = or i32 %b, %a %and = icmp ult i32 %#1, 8 ret i1 %and } Transformation seems to be correct! -- 20. PassManager<Function> : Skipping NOP -- 21. PassManager<Function> : Skipping NOP -- 22. InstCombinePass ---------------------------------------- define i1 @PR2330_logical(i32 %a, i32 %b) { #0: %cmp1 = icmp ult i32 %a, 8 %cmp2 = icmp ult i32 %b, 8 %and = select i1 %cmp2, i1 %cmp1, i1 0 ret i1 %and } Transformation seems to be correct! (syntactically equal) -- 23. InstCombinePass ---------------------------------------- define i1 @PR2330_logical(i32 %a, i32 %b) { #0: %cmp1 = icmp ult i32 %a, 8 %cmp2 = icmp ult i32 %b, 8 %and = select i1 %cmp2, i1 %cmp1, i1 0 ret i1 %and } Transformation seems to be correct! (syntactically equal) -- 24. PassManager<Function> : Skipping NOP -- 25. PassManager<Function> : Skipping NOP -- 26. InstCombinePass ---------------------------------------- define i1 @or_eq_with_one_bit_diff_constants1(i32 %x) { #0: %cmp1 = icmp eq i32 %x, 50 %cmp2 = icmp eq i32 %x, 51 %or = or i1 %cmp1, %cmp2 ret i1 %or } Transformation seems to be correct! (syntactically equal) -- 27. InstCombinePass ---------------------------------------- define i1 @or_eq_with_one_bit_diff_constants1(i32 %x) { #0: %cmp1 = icmp eq i32 %x, 50 %cmp2 = icmp eq i32 %x, 51 %or = or i1 %cmp1, %cmp2 ret i1 %or } => define i1 @or_eq_with_one_bit_diff_constants1(i32 %x) { #0: %#1 = and i32 %x, 4294967294 %or = icmp eq i32 %#1, 50 ret i1 %or } Transformation seems to be correct! -- 28. PassManager<Function> : Skipping NOP -- 29. PassManager<Function> : Skipping NOP -- 30. InstCombinePass ---------------------------------------- define i1 @or_eq_with_one_bit_diff_constants1_logical(i32 %x) { #0: %cmp1 = icmp eq i32 %x, 50 %cmp2 = icmp eq i32 %x, 51 %or = select i1 %cmp1, i1 1, i1 %cmp2 ret i1 %or } Transformation seems to be correct! (syntactically equal) -- 31. InstCombinePass ---------------------------------------- define i1 @or_eq_with_one_bit_diff_constants1_logical(i32 %x) { #0: %cmp1 = icmp eq i32 %x, 50 %cmp2 = icmp eq i32 %x, 51 %or = select i1 %cmp1, i1 1, i1 %cmp2 ret i1 %or } => define i1 @or_eq_with_one_bit_diff_constants1_logical(i32 %x) { #0: %#1 = and i32 %x, 4294967294 %or = icmp eq i32 %#1, 50 ret i1 %or } Transformation seems to be correct! -- 32. PassManager<Function> : Skipping NOP -- 33. PassManager<Function> : Skipping NOP -- 34. InstCombinePass ---------------------------------------- define i1 @and_ne_with_one_bit_diff_constants1(i32 %x) { #0: %cmp1 = icmp ne i32 %x, 51 %cmp2 = icmp ne i32 %x, 50 %and = and i1 %cmp1, %cmp2 ret i1 %and } Transformation seems to be correct! (syntactically equal) -- 35. InstCombinePass ---------------------------------------- define i1 @and_ne_with_one_bit_diff_constants1(i32 %x) { #0: %cmp1 = icmp ne i32 %x, 51 %cmp2 = icmp ne i32 %x, 50 %and = and i1 %cmp1, %cmp2 ret i1 %and } => define i1 @and_ne_with_one_bit_diff_constants1(i32 %x) { #0: %#1 = add i32 %x, 4294967244 %and = icmp ult i32 %#1, 4294967294 ret i1 %and } Transformation seems to be correct! -- 36. PassManager<Function> : Skipping NOP -- 37. PassManager<Function> : Skipping NOP -- 38. InstCombinePass ---------------------------------------- define i1 @and_ne_with_one_bit_diff_constants1_logical(i32 %x) { #0: %cmp1 = icmp ne i32 %x, 51 %cmp2 = icmp ne i32 %x, 50 %and = select i1 %cmp1, i1 %cmp2, i1 0 ret i1 %and } Transformation seems to be correct! (syntactically equal) -- 39. InstCombinePass ---------------------------------------- define i1 @and_ne_with_one_bit_diff_constants1_logical(i32 %x) { #0: %cmp1 = icmp ne i32 %x, 51 %cmp2 = icmp ne i32 %x, 50 %and = select i1 %cmp1, i1 %cmp2, i1 0 ret i1 %and } => define i1 @and_ne_with_one_bit_diff_constants1_logical(i32 %x) { #0: %#1 = add i32 %x, 4294967244 %and = icmp ult i32 %#1, 4294967294 ret i1 %and } Transformation seems to be correct! -- 40. PassManager<Function> : Skipping NOP -- 41. PassManager<Function> : Skipping NOP -- 42. InstCombinePass ---------------------------------------- define i1 @or_eq_with_one_bit_diff_constants2(i32 %x) { #0: %cmp1 = icmp eq i32 %x, 97 %cmp2 = icmp eq i32 %x, 65 %or = or i1 %cmp1, %cmp2 ret i1 %or } Transformation seems to be correct! (syntactically equal) -- 43. InstCombinePass ---------------------------------------- define i1 @or_eq_with_one_bit_diff_constants2(i32 %x) { #0: %cmp1 = icmp eq i32 %x, 97 %cmp2 = icmp eq i32 %x, 65 %or = or i1 %cmp1, %cmp2 ret i1 %or } => define i1 @or_eq_with_one_bit_diff_constants2(i32 %x) { #0: %#1 = and i32 %x, 4294967263 %or = icmp eq i32 %#1, 65 ret i1 %or } Transformation seems to be correct! -- 44. PassManager<Function> : Skipping NOP -- 45. PassManager<Function> : Skipping NOP -- 46. InstCombinePass ---------------------------------------- define i1 @or_eq_with_one_bit_diff_constants2_logical(i32 %x) { #0: %cmp1 = icmp eq i32 %x, 97 %cmp2 = icmp eq i32 %x, 65 %or = select i1 %cmp1, i1 1, i1 %cmp2 ret i1 %or } Transformation seems to be correct! (syntactically equal) -- 47. InstCombinePass ---------------------------------------- define i1 @or_eq_with_one_bit_diff_constants2_logical(i32 %x) { #0: %cmp1 = icmp eq i32 %x, 97 %cmp2 = icmp eq i32 %x, 65 %or = select i1 %cmp1, i1 1, i1 %cmp2 ret i1 %or } => define i1 @or_eq_with_one_bit_diff_constants2_logical(i32 %x) { #0: %#1 = and i32 %x, 4294967263 %or = icmp eq i32 %#1, 65 ret i1 %or } Transformation seems to be correct! -- 48. PassManager<Function> : Skipping NOP -- 49. PassManager<Function> : Skipping NOP -- 50. InstCombinePass ---------------------------------------- define i1 @and_ne_with_one_bit_diff_constants2(i19 %x) { #0: %cmp1 = icmp ne i19 %x, 65 %cmp2 = icmp ne i19 %x, 193 %and = and i1 %cmp1, %cmp2 ret i1 %and } Transformation seems to be correct! (syntactically equal) -- 51. InstCombinePass ---------------------------------------- define i1 @and_ne_with_one_bit_diff_constants2(i19 %x) { #0: %cmp1 = icmp ne i19 %x, 65 %cmp2 = icmp ne i19 %x, 193 %and = and i1 %cmp1, %cmp2 ret i1 %and } => define i1 @and_ne_with_one_bit_diff_constants2(i19 %x) { #0: %#1 = and i19 %x, 524159 %and = icmp ne i19 %#1, 65 ret i1 %and } Transformation seems to be correct! -- 52. PassManager<Function> : Skipping NOP -- 53. PassManager<Function> : Skipping NOP -- 54. InstCombinePass ---------------------------------------- define i1 @and_ne_with_one_bit_diff_constants2_logical(i19 %x) { #0: %cmp1 = icmp ne i19 %x, 65 %cmp2 = icmp ne i19 %x, 193 %and = select i1 %cmp1, i1 %cmp2, i1 0 ret i1 %and } Transformation seems to be correct! (syntactically equal) -- 55. InstCombinePass ---------------------------------------- define i1 @and_ne_with_one_bit_diff_constants2_logical(i19 %x) { #0: %cmp1 = icmp ne i19 %x, 65 %cmp2 = icmp ne i19 %x, 193 %and = select i1 %cmp1, i1 %cmp2, i1 0 ret i1 %and } => define i1 @and_ne_with_one_bit_diff_constants2_logical(i19 %x) { #0: %#1 = and i19 %x, 524159 %and = icmp ne i19 %#1, 65 ret i1 %and } Transformation seems to be correct! -- 56. PassManager<Function> : Skipping NOP -- 57. PassManager<Function> : Skipping NOP -- 58. InstCombinePass ---------------------------------------- define i1 @or_eq_with_one_bit_diff_constants3(i8 %x) { #0: %cmp1 = icmp eq i8 %x, 254 %cmp2 = icmp eq i8 %x, 126 %or = or i1 %cmp1, %cmp2 ret i1 %or } Transformation seems to be correct! (syntactically equal) -- 59. InstCombinePass ---------------------------------------- define i1 @or_eq_with_one_bit_diff_constants3(i8 %x) { #0: %cmp1 = icmp eq i8 %x, 254 %cmp2 = icmp eq i8 %x, 126 %or = or i1 %cmp1, %cmp2 ret i1 %or } => define i1 @or_eq_with_one_bit_diff_constants3(i8 %x) { #0: %#1 = and i8 %x, 127 %or = icmp eq i8 %#1, 126 ret i1 %or } Transformation seems to be correct! -- 60. PassManager<Function> : Skipping NOP -- 61. PassManager<Function> : Skipping NOP -- 62. InstCombinePass ---------------------------------------- define i1 @or_eq_with_one_bit_diff_constants3_logical(i8 %x) { #0: %cmp1 = icmp eq i8 %x, 254 %cmp2 = icmp eq i8 %x, 126 %or = select i1 %cmp1, i1 1, i1 %cmp2 ret i1 %or } Transformation seems to be correct! (syntactically equal) -- 63. InstCombinePass ---------------------------------------- define i1 @or_eq_with_one_bit_diff_constants3_logical(i8 %x) { #0: %cmp1 = icmp eq i8 %x, 254 %cmp2 = icmp eq i8 %x, 126 %or = select i1 %cmp1, i1 1, i1 %cmp2 ret i1 %or } => define i1 @or_eq_with_one_bit_diff_constants3_logical(i8 %x) { #0: %#1 = and i8 %x, 127 %or = icmp eq i8 %#1, 126 ret i1 %or } Transformation seems to be correct! -- 64. PassManager<Function> : Skipping NOP -- 65. PassManager<Function> : Skipping NOP -- 66. InstCombinePass ---------------------------------------- define i1 @and_ne_with_one_bit_diff_constants3(i8 %x) { #0: %cmp1 = icmp ne i8 %x, 65 %cmp2 = icmp ne i8 %x, 193 %and = and i1 %cmp1, %cmp2 ret i1 %and } Transformation seems to be correct! (syntactically equal) -- 67. InstCombinePass ---------------------------------------- define i1 @and_ne_with_one_bit_diff_constants3(i8 %x) { #0: %cmp1 = icmp ne i8 %x, 65 %cmp2 = icmp ne i8 %x, 193 %and = and i1 %cmp1, %cmp2 ret i1 %and } => define i1 @and_ne_with_one_bit_diff_constants3(i8 %x) { #0: %#1 = and i8 %x, 127 %and = icmp ne i8 %#1, 65 ret i1 %and } Transformation seems to be correct! -- 68. PassManager<Function> : Skipping NOP -- 69. PassManager<Function> : Skipping NOP -- 70. InstCombinePass ---------------------------------------- define i1 @and_ne_with_one_bit_diff_constants3_logical(i8 %x) { #0: %cmp1 = icmp ne i8 %x, 65 %cmp2 = icmp ne i8 %x, 193 %and = select i1 %cmp1, i1 %cmp2, i1 0 ret i1 %and } Transformation seems to be correct! (syntactically equal) -- 71. InstCombinePass ---------------------------------------- define i1 @and_ne_with_one_bit_diff_constants3_logical(i8 %x) { #0: %cmp1 = icmp ne i8 %x, 65 %cmp2 = icmp ne i8 %x, 193 %and = select i1 %cmp1, i1 %cmp2, i1 0 ret i1 %and } => define i1 @and_ne_with_one_bit_diff_constants3_logical(i8 %x) { #0: %#1 = and i8 %x, 127 %and = icmp ne i8 %#1, 65 ret i1 %and } Transformation seems to be correct! -- 72. PassManager<Function> : Skipping NOP -- 73. PassManager<Function> : Skipping NOP -- 74. InstCombinePass ---------------------------------------- define i1 @or_eq_with_diff_one(i8 %x) { #0: %cmp1 = icmp eq i8 %x, 13 %cmp2 = icmp eq i8 %x, 14 %or = or i1 %cmp1, %cmp2 ret i1 %or } Transformation seems to be correct! (syntactically equal) -- 75. InstCombinePass ---------------------------------------- define i1 @or_eq_with_diff_one(i8 %x) { #0: %cmp1 = icmp eq i8 %x, 13 %cmp2 = icmp eq i8 %x, 14 %or = or i1 %cmp1, %cmp2 ret i1 %or } => define i1 @or_eq_with_diff_one(i8 %x) { #0: %#1 = add i8 %x, 243 %or = icmp ult i8 %#1, 2 ret i1 %or } Transformation seems to be correct! -- 76. PassManager<Function> : Skipping NOP -- 77. PassManager<Function> : Skipping NOP -- 78. InstCombinePass ---------------------------------------- define i1 @or_eq_with_diff_one_logical(i8 %x) { #0: %cmp1 = icmp eq i8 %x, 13 %cmp2 = icmp eq i8 %x, 14 %or = select i1 %cmp1, i1 1, i1 %cmp2 ret i1 %or } Transformation seems to be correct! (syntactically equal) -- 79. InstCombinePass ---------------------------------------- define i1 @or_eq_with_diff_one_logical(i8 %x) { #0: %cmp1 = icmp eq i8 %x, 13 %cmp2 = icmp eq i8 %x, 14 %or = select i1 %cmp1, i1 1, i1 %cmp2 ret i1 %or } => define i1 @or_eq_with_diff_one_logical(i8 %x) { #0: %#1 = add i8 %x, 243 %or = icmp ult i8 %#1, 2 ret i1 %or } Transformation seems to be correct! -- 80. PassManager<Function> : Skipping NOP -- 81. PassManager<Function> : Skipping NOP -- 82. InstCombinePass ---------------------------------------- define i1 @and_ne_with_diff_one(i32 %x) { #0: %cmp1 = icmp ne i32 %x, 40 %cmp2 = icmp ne i32 %x, 39 %and = and i1 %cmp1, %cmp2 ret i1 %and } Transformation seems to be correct! (syntactically equal) -- 83. InstCombinePass ---------------------------------------- define i1 @and_ne_with_diff_one(i32 %x) { #0: %cmp1 = icmp ne i32 %x, 40 %cmp2 = icmp ne i32 %x, 39 %and = and i1 %cmp1, %cmp2 ret i1 %and } => define i1 @and_ne_with_diff_one(i32 %x) { #0: %#1 = add i32 %x, 4294967255 %and = icmp ult i32 %#1, 4294967294 ret i1 %and } Transformation seems to be correct! -- 84. PassManager<Function> : Skipping NOP -- 85. PassManager<Function> : Skipping NOP -- 86. InstCombinePass ---------------------------------------- define i1 @and_ne_with_diff_one_logical(i32 %x) { #0: %cmp1 = icmp ne i32 %x, 40 %cmp2 = icmp ne i32 %x, 39 %and = select i1 %cmp1, i1 %cmp2, i1 0 ret i1 %and } Transformation seems to be correct! (syntactically equal) -- 87. InstCombinePass ---------------------------------------- define i1 @and_ne_with_diff_one_logical(i32 %x) { #0: %cmp1 = icmp ne i32 %x, 40 %cmp2 = icmp ne i32 %x, 39 %and = select i1 %cmp1, i1 %cmp2, i1 0 ret i1 %and } => define i1 @and_ne_with_diff_one_logical(i32 %x) { #0: %#1 = add i32 %x, 4294967255 %and = icmp ult i32 %#1, 4294967294 ret i1 %and } Transformation seems to be correct! -- 88. PassManager<Function> : Skipping NOP -- 89. PassManager<Function> : Skipping NOP -- 90. InstCombinePass ---------------------------------------- define i1 @or_eq_with_diff_one_signed(i32 %x) { #0: %cmp1 = icmp eq i32 %x, 0 %cmp2 = icmp eq i32 %x, 4294967295 %or = or i1 %cmp1, %cmp2 ret i1 %or } Transformation seems to be correct! (syntactically equal) -- 91. InstCombinePass ---------------------------------------- define i1 @or_eq_with_diff_one_signed(i32 %x) { #0: %cmp1 = icmp eq i32 %x, 0 %cmp2 = icmp eq i32 %x, 4294967295 %or = or i1 %cmp1, %cmp2 ret i1 %or } => define i1 @or_eq_with_diff_one_signed(i32 %x) { #0: %#1 = add i32 %x, 1 %or = icmp ult i32 %#1, 2 ret i1 %or } Transformation seems to be correct! -- 92. PassManager<Function> : Skipping NOP -- 93. PassManager<Function> : Skipping NOP -- 94. InstCombinePass ---------------------------------------- define i1 @or_eq_with_diff_one_signed_logical(i32 %x) { #0: %cmp1 = icmp eq i32 %x, 0 %cmp2 = icmp eq i32 %x, 4294967295 %or = select i1 %cmp1, i1 1, i1 %cmp2 ret i1 %or } Transformation seems to be correct! (syntactically equal) -- 95. InstCombinePass ---------------------------------------- define i1 @or_eq_with_diff_one_signed_logical(i32 %x) { #0: %cmp1 = icmp eq i32 %x, 0 %cmp2 = icmp eq i32 %x, 4294967295 %or = select i1 %cmp1, i1 1, i1 %cmp2 ret i1 %or } => define i1 @or_eq_with_diff_one_signed_logical(i32 %x) { #0: %#1 = add i32 %x, 1 %or = icmp ult i32 %#1, 2 ret i1 %or } Transformation seems to be correct! -- 96. PassManager<Function> : Skipping NOP -- 97. PassManager<Function> : Skipping NOP -- 98. InstCombinePass ---------------------------------------- define i1 @and_ne_with_diff_one_signed(i64 %x) { #0: %cmp1 = icmp ne i64 %x, -1 %cmp2 = icmp ne i64 %x, 0 %and = and i1 %cmp1, %cmp2 ret i1 %and } Transformation seems to be correct! (syntactically equal) -- 99. InstCombinePass ---------------------------------------- define i1 @and_ne_with_diff_one_signed(i64 %x) { #0: %cmp1 = icmp ne i64 %x, -1 %cmp2 = icmp ne i64 %x, 0 %and = and i1 %cmp1, %cmp2 ret i1 %and } => define i1 @and_ne_with_diff_one_signed(i64 %x) { #0: %#1 = add i64 %x, -1 %and = icmp ult i64 %#1, -2 ret i1 %and } Transformation seems to be correct! -- 100. PassManager<Function> : Skipping NOP -- 101. PassManager<Function> : Skipping NOP -- 102. InstCombinePass ---------------------------------------- define i1 @and_ne_with_diff_one_signed_logical(i64 %x) { #0: %cmp1 = icmp ne i64 %x, -1 %cmp2 = icmp ne i64 %x, 0 %and = select i1 %cmp1, i1 %cmp2, i1 0 ret i1 %and } Transformation seems to be correct! (syntactically equal) -- 103. InstCombinePass ---------------------------------------- define i1 @and_ne_with_diff_one_signed_logical(i64 %x) { #0: %cmp1 = icmp ne i64 %x, -1 %cmp2 = icmp ne i64 %x, 0 %and = select i1 %cmp1, i1 %cmp2, i1 0 ret i1 %and } => define i1 @and_ne_with_diff_one_signed_logical(i64 %x) { #0: %#1 = add i64 %x, -1 %and = icmp ult i64 %#1, -2 ret i1 %and } Transformation seems to be correct! -- 104. PassManager<Function> : Skipping NOP -- 105. PassManager<Function> : Skipping NOP -- 106. InstCombinePass ---------------------------------------- define <2 x i1> @or_eq_with_one_bit_diff_constants2_splatvec(<2 x i32> %x) { #0: %cmp1 = icmp eq <2 x i32> %x, { 97, 97 } %cmp2 = icmp eq <2 x i32> %x, { 65, 65 } %or = or <2 x i1> %cmp1, %cmp2 ret <2 x i1> %or } Transformation seems to be correct! (syntactically equal) -- 107. InstCombinePass ---------------------------------------- define <2 x i1> @or_eq_with_one_bit_diff_constants2_splatvec(<2 x i32> %x) { #0: %cmp1 = icmp eq <2 x i32> %x, { 97, 97 } %cmp2 = icmp eq <2 x i32> %x, { 65, 65 } %or = or <2 x i1> %cmp1, %cmp2 ret <2 x i1> %or } => define <2 x i1> @or_eq_with_one_bit_diff_constants2_splatvec(<2 x i32> %x) { #0: %#1 = and <2 x i32> %x, { 4294967263, 4294967263 } %or = icmp eq <2 x i32> %#1, { 65, 65 } ret <2 x i1> %or } Transformation seems to be correct! -- 108. PassManager<Function> : Skipping NOP -- 109. PassManager<Function> : Skipping NOP -- 110. InstCombinePass ---------------------------------------- define <2 x i1> @and_ne_with_diff_one_splatvec(<2 x i32> %x) { #0: %cmp1 = icmp ne <2 x i32> %x, { 40, 40 } %cmp2 = icmp ne <2 x i32> %x, { 39, 39 } %and = and <2 x i1> %cmp1, %cmp2 ret <2 x i1> %and } Transformation seems to be correct! (syntactically equal) -- 111. InstCombinePass ---------------------------------------- define <2 x i1> @and_ne_with_diff_one_splatvec(<2 x i32> %x) { #0: %cmp1 = icmp ne <2 x i32> %x, { 40, 40 } %cmp2 = icmp ne <2 x i32> %x, { 39, 39 } %and = and <2 x i1> %cmp1, %cmp2 ret <2 x i1> %and } => define <2 x i1> @and_ne_with_diff_one_splatvec(<2 x i32> %x) { #0: %#1 = add <2 x i32> %x, { 4294967255, 4294967255 } %and = icmp ult <2 x i32> %#1, { 4294967294, 4294967294 } ret <2 x i1> %and } Transformation seems to be correct! -- 112. PassManager<Function> : Skipping NOP -- 113. PassManager<Function> : Skipping NOP -- 114. InstCombinePass ---------------------------------------- define void @simplify_before_foldAndOfICmps(ptr %p) { #0: %A8 = alloca i64 2, align 2 %L7 = load i16, ptr %A8, align 2 %G21 = gep ptr %A8, 2 x i8 255 %B11 = udiv i16 %L7, 65535 %G4 = gep ptr %A8, 2 x i16 %B11 %L2 = load i16, ptr %G4, align 2 %L = load i16, ptr %G4, align 2 %B23 = mul i16 %B11, %B11 %L4 = load i16, ptr %A8, align 2 %B21 = sdiv i16 %L7, %L4 %B7 = sub i16 0, %B21 %B18 = mul i16 %B23, %B7 %C10 = icmp ugt i16 %L, %B11 %B20 = and i16 %L7, %L2 %B1 = mul i1 %C10, 1 %C5 = icmp sle i16 %B21, %L %C11 = icmp ule i16 %B21, %L %C7 = icmp slt i16 %B20, 0 %B29 = srem i16 %L4, %B18 %B15 = add i1 %C7, %C10 %B19 = add i1 %C11, %B15 %C6 = icmp sge i1 %C11, %B19 %B33 = or i16 %B29, %L4 %C13 = icmp uge i1 %C5, %B1 %C3 = icmp ult i1 %C13, %C6 store i16 undef, ptr %G21, align 2 %C18 = icmp ule i1 %C10, %C7 %G26 = gep ptr null, 1 x i1 %C3 store i16 %B33, ptr %p, align 2 store i1 %C18, ptr %p, align 1 store ptr %G26, ptr %p, align 8 ret void } Transformation seems to be correct! (syntactically equal) -- 115. InstCombinePass ---------------------------------------- define void @simplify_before_foldAndOfICmps(ptr %p) { #0: %A8 = alloca i64 2, align 2 %L7 = load i16, ptr %A8, align 2 %G21 = gep ptr %A8, 2 x i8 255 %B11 = udiv i16 %L7, 65535 %G4 = gep ptr %A8, 2 x i16 %B11 %L2 = load i16, ptr %G4, align 2 %L = load i16, ptr %G4, align 2 %B23 = mul i16 %B11, %B11 %L4 = load i16, ptr %A8, align 2 %B21 = sdiv i16 %L7, %L4 %B7 = sub i16 0, %B21 %B18 = mul i16 %B23, %B7 %C10 = icmp ugt i16 %L, %B11 %B20 = and i16 %L7, %L2 %B1 = mul i1 %C10, 1 %C5 = icmp sle i16 %B21, %L %C11 = icmp ule i16 %B21, %L %C7 = icmp slt i16 %B20, 0 %B29 = srem i16 %L4, %B18 %B15 = add i1 %C7, %C10 %B19 = add i1 %C11, %B15 %C6 = icmp sge i1 %C11, %B19 %B33 = or i16 %B29, %L4 %C13 = icmp uge i1 %C5, %B1 %C3 = icmp ult i1 %C13, %C6 store i16 undef, ptr %G21, align 2 %C18 = icmp ule i1 %C10, %C7 %G26 = gep ptr null, 1 x i1 %C3 store i16 %B33, ptr %p, align 2 store i1 %C18, ptr %p, align 1 store ptr %G26, ptr %p, align 8 ret void } => define void @simplify_before_foldAndOfICmps(ptr %p) { #0: store i1 1, ptr %p, align 1 store ptr null, ptr %p, align 8 ret void } **************************************** WARNING: Source function is always UB. It can be refined by any target function. Please make sure this is what you wanted. **************************************** Transformation seems to be correct! -- 116. PassManager<Function> : Skipping NOP -- 117. PassManager<Function> : Skipping NOP -- 118. InstCombinePass ---------------------------------------- define void @simplify_before_foldAndOfICmps2(ptr %p, ptr %A8) { #0: %L7 = load i16, ptr %A8, align 2 %G21 = gep ptr %A8, 2 x i8 255 %B11 = udiv i16 %L7, 65535 %G4 = gep ptr %A8, 2 x i16 %B11 %L2 = load i16, ptr %G4, align 2 %L = load i16, ptr %G4, align 2 %B23 = mul i16 %B11, %B11 %L4 = load i16, ptr %A8, align 2 %B21 = sdiv i16 %L7, %L4 %B7 = sub i16 0, %B21 %B18 = mul i16 %B23, %B7 %C10 = icmp ugt i16 %L, %B11 %B20 = and i16 %L7, %L2 %B1 = mul i1 %C10, 1 %C5 = icmp sle i16 %B21, %L %C11 = icmp ule i16 %B21, %L %C7 = icmp slt i16 %B20, 0 %B29 = srem i16 %L4, %B18 %B15 = add i1 %C7, %C10 %B19 = add i1 %C11, %B15 %C6 = icmp sge i1 %C11, %B19 %B33 = or i16 %B29, %L4 %C13 = icmp uge i1 %C5, %B1 %C3 = icmp ult i1 %C13, %C6 store i16 undef, ptr %G21, align 2 %C18 = icmp ule i1 %C10, %C7 %G26 = gep ptr null, 1 x i1 %C3 store i16 %B33, ptr %p, align 2 store i1 %C18, ptr %p, align 1 store ptr %G26, ptr %p, align 8 ret void } Transformation seems to be correct! (syntactically equal) -- 119. InstCombinePass ---------------------------------------- define void @simplify_before_foldAndOfICmps2(ptr %p, ptr %A8) { #0: %L7 = load i16, ptr %A8, align 2 %G21 = gep ptr %A8, 2 x i8 255 %B11 = udiv i16 %L7, 65535 %G4 = gep ptr %A8, 2 x i16 %B11 %L2 = load i16, ptr %G4, align 2 %L = load i16, ptr %G4, align 2 %B23 = mul i16 %B11, %B11 %L4 = load i16, ptr %A8, align 2 %B21 = sdiv i16 %L7, %L4 %B7 = sub i16 0, %B21 %B18 = mul i16 %B23, %B7 %C10 = icmp ugt i16 %L, %B11 %B20 = and i16 %L7, %L2 %B1 = mul i1 %C10, 1 %C5 = icmp sle i16 %B21, %L %C11 = icmp ule i16 %B21, %L %C7 = icmp slt i16 %B20, 0 %B29 = srem i16 %L4, %B18 %B15 = add i1 %C7, %C10 %B19 = add i1 %C11, %B15 %C6 = icmp sge i1 %C11, %B19 %B33 = or i16 %B29, %L4 %C13 = icmp uge i1 %C5, %B1 %C3 = icmp ult i1 %C13, %C6 store i16 undef, ptr %G21, align 2 %C18 = icmp ule i1 %C10, %C7 %G26 = gep ptr null, 1 x i1 %C3 store i16 %B33, ptr %p, align 2 store i1 %C18, ptr %p, align 1 store ptr %G26, ptr %p, align 8 ret void } => define void @simplify_before_foldAndOfICmps2(ptr %p, ptr %A8) { #0: %L7 = load i16, ptr %A8, align 2 %#1 = icmp eq i16 %L7, 65535 %B11 = zext i1 %#1 to i16 %#2 = zext i1 %#1 to i64 %G4 = gep ptr %A8, 2 x i64 %#2 %L2 = load i16, ptr %G4, align 2 %L4 = load i16, ptr %A8, align 2 %B21 = sdiv i16 %L7, %L4 %#3 = select i1 %#1, i16 %B21, i16 0 %B18 = sub i16 0, %#3 %C10 = icmp ugt i16 %L2, %B11 %B20 = and i16 %L7, %L2 %C5 = icmp sgt i16 %B21, %L2 %C11 = icmp ule i16 %B21, %L2 %C7 = icmp slt i16 %B20, 0 %B29 = srem i16 %L4, %B18 %B15 = xor i1 %C7, %C10 %#4 = and i1 %C11, %B15 %C6 = xor i1 %#4, 1 %B33 = or i16 %B29, %L4 %#5 = and i1 %C5, %C6 %C3 = and i1 %#5, %C10 %#6 = xor i1 %C10, 1 %C18 = or i1 %C7, %#6 %#7 = sext i1 %C3 to i64 %G26 = gep ptr null, 1 x i64 %#7 store i16 %B33, ptr %p, align 2 store i1 %C18, ptr %p, align 1 store ptr %G26, ptr %p, align 8 ret void } Transformation doesn't verify! (unsound) ERROR: Mismatch in memory Example: ptr %p = pointer(non-local, block_id=1, offset=0) / Address=#x0000000000000008 ptr %A8 = pointer(non-local, block_id=2, offset=2) / Address=#x0000000000000004 Source: i16 %L7 = #xffff (65535, -1) ptr %G21 = pointer(non-local, block_id=2, offset=0) / Address=#x0000000000000002 i16 %B11 = #x0001 (1) ptr %G4 = pointer(non-local, block_id=2, offset=4) / Address=#x0000000000000006 i16 %L2 = poison i16 %L = poison i16 %B23 = #x0001 (1) i16 %L4 = #xffff (65535, -1) i16 %B21 = #x0001 (1) i16 %B7 = #xffff (65535, -1) i16 %B18 = #xffff (65535, -1) i1 %C10 = poison i16 %B20 = poison i1 %B1 = poison i1 %C5 = poison i1 %C11 = poison i1 %C7 = poison i16 %B29 = #x0000 (0) i1 %B15 = poison i1 %B19 = poison i1 %C6 = poison i16 %B33 = #xffff (65535, -1) i1 %C13 = poison i1 %C3 = poison i1 %C18 = poison ptr %G26 = poison SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: 0 Block 1 > size: 12 align: 1 alloc type: 0 alive: true address: 8 Contents: 4: #x10 / written with 1 bits / byte #1 *: #x40 Block 2 > size: 6 align: 2 alloc type: 0 alive: true address: 2 Contents: 2: #xff 5: #x00 3: #xff 4: #x00 *: poison Target: i16 %L7 = #xffff (65535, -1) i1 %#1 = #x1 (1) i16 %B11 = #x0001 (1) i64 %#2 = #x0000000000000001 (1) ptr %G4 = pointer(non-local, block_id=2, offset=4) / Address=#x0000000000000006 i16 %L2 = poison i16 %L4 = #xffff (65535, -1) i16 %B21 = #x0001 (1) i16 %#3 = #x0001 (1) i16 %B18 = #xffff (65535, -1) i1 %C10 = poison i16 %B20 = poison i1 %C5 = poison i1 %C11 = poison i1 %C7 = poison i16 %B29 = #x0000 (0) i1 %B15 = poison i1 %#4 = poison i1 %C6 = poison i16 %B33 = #xffff (65535, -1) i1 %#5 = poison i1 %C3 = poison i1 %#6 = poison i1 %C18 = poison i64 %#7 = poison ptr %G26 = poison Mismatch in pointer(non-local, block_id=2, offset=0) Source value: #x00 Target value: poison Pass: InstCombinePass Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-passes=instcombine' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats' Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_VXunSeEn_UO8b.bc" ------------------- SMT STATS ------------------- Num queries: 165 Num invalid: 0 Num skips: 0 Num trivial: 130 (44.1%) Num timeout: 1 (0.6%) Num errors: 0 (0.0%) Num SAT: 79 (47.9%) Num UNSAT: 85 (51.5%) Alive2: Transform doesn't verify; aborting!
/home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/and-or-icmps.ll -passes=instcombine -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/and-or-icmps.ll # RUN: at line 2 + /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/and-or-icmps.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/and-or-icmps.ll