Open bongjunj opened 1 month ago
Missing freeze?
----------------------------------------
define i1 @src(i8 %x, i8 %y) {
#0:
%#1 = or i8 %x, %y
%cmp = icmp uge i8 %y, %#1
%cmpeq = icmp eq i8 %x, 0
%r = or i1 %cmp, %cmpeq
ret i1 %r
}
=>
define i1 @tgt(i8 %x, i8 %y) {
#0:
%fy = freeze i8 %y
%#1 = or i8 %x, %fy
%cmp = icmp eq i8 %#1, %fy
ret i1 %cmp
}
Transformation seems to be correct!
Alive2 report: https://alive2.llvm.org/ce/z/gu_KaN
(y >= (x | y)) | (x = 0) -> (x | y) = y