Test Failure: Transforms/InstCombine/and-or-icmp-min-max.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i1 @slt_and_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp slt i8 %x, %y
  %cmpeq = icmp eq i8 %x, 127
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @slt_and_max(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @slt_and_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp slt i8 %x, %y
  %cmpeq = icmp eq i8 %x, 127
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @slt_and_max_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @slt_and_max_commute(<2 x i8> %x, <2 x i8> %y) {
%0:
  %cmp = icmp slt <2 x i8> %x, %y
  %cmpeq = icmp eq <2 x i8> %x, { 127, 127 }
  %r = and <2 x i1> %cmpeq, %cmp
  ret <2 x i1> %r
}
=>
define <2 x i1> @slt_and_max_commute(<2 x i8> %x, <2 x i8> %y) {
%0:
  ret <2 x i1> { 0, 0 }
}
Transformation seems to be correct!


----------------------------------------
define i1 @slt_swap_and_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp sgt i8 %y, %x
  %cmpeq = icmp eq i8 %x, 127
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @slt_swap_and_max(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @slt_swap_and_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sgt i8 %y, %x
  %cmpeq = icmp eq i8 %x, 127
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @slt_swap_and_max_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @slt_swap_and_max_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp sgt i8 %y, %x
  %cmpeq = icmp eq i8 %x, 127
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @slt_swap_and_max_commute(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @slt_swap_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sgt i8 %y, %x
  %cmpeq = icmp eq i8 %x, 127
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @slt_swap_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ult_and_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp ult i8 %x, %y
  %cmpeq = icmp eq i8 %x, 255
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ult_and_max(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ult_and_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ult i8 %x, %y
  %cmpeq = icmp eq i8 %x, 255
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @ult_and_max_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ult_and_max_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp ult i8 %x, %y
  %cmpeq = icmp eq i8 %x, 255
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ult_and_max_commute(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ult_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ult i8 %x, %y
  %cmpeq = icmp eq i8 %x, 255
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @ult_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ult_swap_and_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp ugt i8 %y, %x
  %cmpeq = icmp eq i8 %x, 255
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ult_swap_and_max(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ult_swap_and_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ugt i8 %y, %x
  %cmpeq = icmp eq i8 %x, 255
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @ult_swap_and_max_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ult_swap_and_max_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp ugt i8 %y, %x
  %cmpeq = icmp eq i8 %x, 255
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ult_swap_and_max_commute(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ult_swap_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ugt i8 %y, %x
  %cmpeq = icmp eq i8 %x, 255
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @ult_swap_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @sgt_and_min(i9 %x, i9 %y) {
%0:
  %cmp = icmp sgt i9 %x, %y
  %cmpeq = icmp eq i9 %x, 256
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sgt_and_min(i9 %x, i9 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @sgt_and_min_logical(i9 %x, i9 %y) {
%0:
  %cmp = icmp sgt i9 %x, %y
  %cmpeq = icmp eq i9 %x, 256
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @sgt_and_min_logical(i9 %x, i9 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @sgt_and_min_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp sgt i8 %x, %y
  %cmpeq = icmp eq i8 %x, 128
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @sgt_and_min_commute(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @sgt_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sgt i8 %x, %y
  %cmpeq = icmp eq i8 %x, 128
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @sgt_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @sgt_swap_and_min(i8 %x, i8 %y) {
%0:
  %cmp = icmp slt i8 %y, %x
  %cmpeq = icmp eq i8 %x, 128
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sgt_swap_and_min(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @sgt_swap_and_min_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp slt i8 %y, %x
  %cmpeq = icmp eq i8 %x, 128
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @sgt_swap_and_min_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @sgt_swap_and_min_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp slt i8 %y, %x
  %cmpeq = icmp eq i8 %x, 128
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @sgt_swap_and_min_commute(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @sgt_swap_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp slt i8 %y, %x
  %cmpeq = icmp eq i8 %x, 128
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @sgt_swap_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ugt_and_min(i8 %x, i8 %y) {
%0:
  %cmp = icmp ugt i8 %x, %y
  %cmpeq = icmp eq i8 %x, 0
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ugt_and_min(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ugt_and_min_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ugt i8 %x, %y
  %cmpeq = icmp eq i8 %x, 0
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @ugt_and_min_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ugt_and_min_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp ugt i8 %x, %y
  %cmpeq = icmp eq i8 %x, 0
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ugt_and_min_commute(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ugt_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ugt i8 %x, %y
  %cmpeq = icmp eq i8 %x, 0
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @ugt_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ugt_swap_and_min(i8 %x, i8 %y) {
%0:
  %cmp = icmp ult i8 %y, %x
  %cmpeq = icmp eq i8 %x, 0
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ugt_swap_and_min(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ugt_swap_and_min_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ult i8 %y, %x
  %cmpeq = icmp eq i8 %x, 0
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @ugt_swap_and_min_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ugt_swap_and_min_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp ult i8 %y, %x
  %cmpeq = icmp eq i8 %x, 0
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ugt_swap_and_min_commute(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @ugt_swap_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ult i8 %y, %x
  %cmpeq = icmp eq i8 %x, 0
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @ugt_swap_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_or_not_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  %cmpeq = icmp ne i8 %x, 127
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sge_or_not_max(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_or_not_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  %cmpeq = icmp ne i8 %x, 127
  %r = select i1 %cmp, i1 1, i1 %cmpeq
  ret i1 %r
}
=>
define i1 @sge_or_not_max_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_or_not_max_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  %cmpeq = icmp ne i8 %x, 127
  %r = or i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @sge_or_not_max_commute(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_or_not_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  %cmpeq = icmp ne i8 %x, 127
  %r = select i1 %cmpeq, i1 1, i1 %cmp
  ret i1 %r
}
=>
define i1 @sge_or_not_max_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_swap_or_not_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %y, %x
  %cmpeq = icmp ne i8 %x, 127
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sge_swap_or_not_max(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_swap_or_not_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %y, %x
  %cmpeq = icmp ne i8 %x, 127
  %r = select i1 %cmp, i1 1, i1 %cmpeq
  ret i1 %r
}
=>
define i1 @sge_swap_or_not_max_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_swap_or_not_max_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %y, %x
  %cmpeq = icmp ne i8 %x, 127
  %r = or i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @sge_swap_or_not_max_commute(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_swap_or_not_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %y, %x
  %cmpeq = icmp ne i8 %x, 127
  %r = select i1 %cmpeq, i1 1, i1 %cmp
  ret i1 %r
}
=>
define i1 @sge_swap_or_not_max_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_or_not_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %x, %y
  %cmpeq = icmp ne i8 %x, 255
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @uge_or_not_max(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_or_not_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %x, %y
  %cmpeq = icmp ne i8 %x, 255
  %r = select i1 %cmp, i1 1, i1 %cmpeq
  ret i1 %r
}
=>
define i1 @uge_or_not_max_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_or_not_max_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %x, %y
  %cmpeq = icmp ne i8 %x, 255
  %r = or i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @uge_or_not_max_commute(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_or_not_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %x, %y
  %cmpeq = icmp ne i8 %x, 255
  %r = select i1 %cmpeq, i1 1, i1 %cmp
  ret i1 %r
}
=>
define i1 @uge_or_not_max_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_swap_or_not_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %y, %x
  %cmpeq = icmp ne i8 %x, 255
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @uge_swap_or_not_max(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_swap_or_not_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %y, %x
  %cmpeq = icmp ne i8 %x, 255
  %r = select i1 %cmp, i1 1, i1 %cmpeq
  ret i1 %r
}
=>
define i1 @uge_swap_or_not_max_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_swap_or_not_max_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %y, %x
  %cmpeq = icmp ne i8 %x, 255
  %r = or i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @uge_swap_or_not_max_commute(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_swap_or_not_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %y, %x
  %cmpeq = icmp ne i8 %x, 255
  %r = select i1 %cmpeq, i1 1, i1 %cmp
  ret i1 %r
}
=>
define i1 @uge_swap_or_not_max_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_or_not_min(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %x, %y
  %cmpeq = icmp ne i8 %x, 128
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sle_or_not_min(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_or_not_min_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %x, %y
  %cmpeq = icmp ne i8 %x, 128
  %r = select i1 %cmp, i1 1, i1 %cmpeq
  ret i1 %r
}
=>
define i1 @sle_or_not_min_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_or_not_min_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %x, %y
  %cmpeq = icmp ne i8 %x, 128
  %r = or i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @sle_or_not_min_commute(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_or_not_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %x, %y
  %cmpeq = icmp ne i8 %x, 128
  %r = select i1 %cmpeq, i1 1, i1 %cmp
  ret i1 %r
}
=>
define i1 @sle_or_not_min_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_swap_or_not_min(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %y, %x
  %cmpeq = icmp ne i8 %x, 128
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sle_swap_or_not_min(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_swap_or_not_min_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %y, %x
  %cmpeq = icmp ne i8 %x, 128
  %r = select i1 %cmp, i1 1, i1 %cmpeq
  ret i1 %r
}
=>
define i1 @sle_swap_or_not_min_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_swap_or_not_min_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %y, %x
  %cmpeq = icmp ne i8 %x, 128
  %r = or i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @sle_swap_or_not_min_commute(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_swap_or_not_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %y, %x
  %cmpeq = icmp ne i8 %x, 128
  %r = select i1 %cmpeq, i1 1, i1 %cmp
  ret i1 %r
}
=>
define i1 @sle_swap_or_not_min_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_or_not_min(i427 %x, i427 %y) {
%0:
  %cmp = icmp ule i427 %x, %y
  %cmpeq = icmp ne i427 %x, 0
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ule_or_not_min(i427 %x, i427 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_or_not_min_logical(i427 %x, i427 %y) {
%0:
  %cmp = icmp ule i427 %x, %y
  %cmpeq = icmp ne i427 %x, 0
  %r = select i1 %cmp, i1 1, i1 %cmpeq
  ret i1 %r
}
=>
define i1 @ule_or_not_min_logical(i427 %x, i427 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_or_not_min_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %x, %y
  %cmpeq = icmp ne i8 %x, 0
  %r = or i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ule_or_not_min_commute(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_or_not_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %x, %y
  %cmpeq = icmp ne i8 %x, 0
  %r = select i1 %cmpeq, i1 1, i1 %cmp
  ret i1 %r
}
=>
define i1 @ule_or_not_min_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_swap_or_not_min(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %y, %x
  %cmpeq = icmp ne i8 %x, 0
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ule_swap_or_not_min(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_swap_or_not_min_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %y, %x
  %cmpeq = icmp ne i8 %x, 0
  %r = select i1 %cmp, i1 1, i1 %cmpeq
  ret i1 %r
}
=>
define i1 @ule_swap_or_not_min_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_swap_or_not_min_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %y, %x
  %cmpeq = icmp ne i8 %x, 0
  %r = or i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ule_swap_or_not_min_commute(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_swap_or_not_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %y, %x
  %cmpeq = icmp ne i8 %x, 0
  %r = select i1 %cmpeq, i1 1, i1 %cmp
  ret i1 %r
}
=>
define i1 @ule_swap_or_not_min_commute_logical(i8 %x, i8 %y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_and_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  %cmpeq = icmp eq i8 %x, 127
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sge_and_max(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 127
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_and_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  %cmpeq = icmp eq i8 %x, 127
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @sge_and_max_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 127
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_and_max_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  %cmpeq = icmp eq i8 %x, 127
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @sge_and_max_commute(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 127
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  %cmpeq = icmp eq i8 %x, 127
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @sge_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 127
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_swap_and_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %y, %x
  %cmpeq = icmp eq i8 %x, 127
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sge_swap_and_max(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 127
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_swap_and_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %y, %x
  %cmpeq = icmp eq i8 %x, 127
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @sge_swap_and_max_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 127
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_swap_and_max_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %y, %x
  %cmpeq = icmp eq i8 %x, 127
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @sge_swap_and_max_commute(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 127
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_swap_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %y, %x
  %cmpeq = icmp eq i8 %x, 127
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @sge_swap_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 127
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_and_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %x, %y
  %cmpeq = icmp eq i8 %x, 255
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @uge_and_max(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 255
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_and_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %x, %y
  %cmpeq = icmp eq i8 %x, 255
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @uge_and_max_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 255
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_and_max_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %x, %y
  %cmpeq = icmp eq i8 %x, 255
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @uge_and_max_commute(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 255
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %x, %y
  %cmpeq = icmp eq i8 %x, 255
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @uge_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 255
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_swap_and_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %y, %x
  %cmpeq = icmp eq i8 %x, 255
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @uge_swap_and_max(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 255
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_swap_and_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %y, %x
  %cmpeq = icmp eq i8 %x, 255
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @uge_swap_and_max_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 255
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_swap_and_max_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %y, %x
  %cmpeq = icmp eq i8 %x, 255
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @uge_swap_and_max_commute(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 255
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @uge_swap_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %y, %x
  %cmpeq = icmp eq i8 %x, 255
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @uge_swap_and_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 255
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_and_min(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %x, %y
  %cmpeq = icmp eq i8 %x, 128
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sle_and_min(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 128
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_and_min_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %x, %y
  %cmpeq = icmp eq i8 %x, 128
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @sle_and_min_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 128
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_and_min_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %x, %y
  %cmpeq = icmp eq i8 %x, 128
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @sle_and_min_commute(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 128
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sle i8 %x, %y
  %cmpeq = icmp eq i8 %x, 128
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @sle_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 128
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_swap_and_min(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %y, %x
  %cmpeq = icmp eq i8 %x, 128
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sle_swap_and_min(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 128
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_swap_and_min_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %y, %x
  %cmpeq = icmp eq i8 %x, 128
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @sle_swap_and_min_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 128
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_swap_and_min_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %y, %x
  %cmpeq = icmp eq i8 %x, 128
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @sle_swap_and_min_commute(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 128
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sle_swap_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %y, %x
  %cmpeq = icmp eq i8 %x, 128
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @sle_swap_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 128
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_and_min(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %x, %y
  %cmpeq = icmp eq i8 %x, 0
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ule_and_min(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 0
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_and_min_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %x, %y
  %cmpeq = icmp eq i8 %x, 0
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @ule_and_min_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 0
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_and_min_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %x, %y
  %cmpeq = icmp eq i8 %x, 0
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ule_and_min_commute(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 0
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp ule i8 %x, %y
  %cmpeq = icmp eq i8 %x, 0
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @ule_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 0
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_swap_and_min(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %y, %x
  %cmpeq = icmp eq i8 %x, 0
  %r = and i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @ule_swap_and_min(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 0
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_swap_and_min_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %y, %x
  %cmpeq = icmp eq i8 %x, 0
  %r = select i1 %cmp, i1 %cmpeq, i1 0
  ret i1 %r
}
=>
define i1 @ule_swap_and_min_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 0
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_swap_and_min_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %y, %x
  %cmpeq = icmp eq i8 %x, 0
  %r = and i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @ule_swap_and_min_commute(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 0
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @ule_swap_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp uge i8 %y, %x
  %cmpeq = icmp eq i8 %x, 0
  %r = select i1 %cmpeq, i1 %cmp, i1 0
  ret i1 %r
}
=>
define i1 @ule_swap_and_min_commute_logical(i8 %x, i8 %y) {
%0:
  %cmpeq = icmp eq i8 %x, 0
  ret i1 %cmpeq
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_or_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  %cmpeq = icmp eq i8 %x, 127
  %r = or i1 %cmp, %cmpeq
  ret i1 %r
}
=>
define i1 @sge_or_max(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_or_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  %cmpeq = icmp eq i8 %x, 127
  %r = select i1 %cmp, i1 1, i1 %cmpeq
  ret i1 %r
}
=>
define i1 @sge_or_max_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_or_max_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  %cmpeq = icmp eq i8 %x, 127
  %r = or i1 %cmpeq, %cmp
  ret i1 %r
}
=>
define i1 @sge_or_max_commute(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @sge_or_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  %cmpeq = icmp eq i8 %x, 127
  %r = select i1 %cmpeq, i1 1, i1 %cmp
  ret i1 %r
}
=>
define i1 @sge_or_max_commute_logical(i8 %x, i8 %y) {
%0:
  %cmp = icmp sge i8 %x, %y
  ret i1 %cmp
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
i8 %x = #x7f (127)
i8 %y = poison

Source:
i1 %cmp = poison
i1 %cmpeq = #x1 (1)
i1 %r = #x1 (1)

Target:
i1 %cmp = poison
Source value: #x1 (1)
Target value: poison


------------------- SMT STATS -------------------
Num queries: 268
Num invalid: 0
Num skips:   0
Num trivial: 422 (61.2%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     100 (37.3%)
Num UNSAT:   168 (62.7%)

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -instcombine -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/and-or-icmp-min-max.ll

Alive2: Transform doesn't verify; aborting!
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/and-or-icmp-min-max.ll

 

<-- Back