Closed
Description
https://alive2.llvm.org/ce/z/4ZG-nD
define i1 @src(i64 %index, i64 %limit) {
%precond = icmp ult i64 %index, %limit
call void @llvm.assume(i1 %precond)
%sub.sat = call i64 @llvm.usub.sat.i64(i64 %index, i64 1)
%cmp = icmp ult i64 %sub.sat, %limit
ret i1 %cmp
}
define i1 @tgt(i64 %index, i64 %limit) {
ret i1 true
}
I think we should be able to handle this by adding a fact that the usub.sat result is ule its first argument, similar to what we do for min/max/abs.