Open
Description
From rust-lang/rust#138497:
define i8 @src(i8 %x) {
%cttz = call i8 @llvm.cttz.i8(i8 %x, i1 false)
%lshr = lshr i8 %x, %cttz
ret i8 %lshr
}
define i8 @tgt(i8 %x) {
%cttz = call i8 @llvm.cttz.i8(i8 %x, i1 false)
%lshr = lshr exact i8 %x, %cttz
ret i8 %lshr
}
https://alive2.llvm.org/ce/z/KFemjy
This then allows folding icmp eq %lshr, 0
.