llvm-project
llvm-project copied to clipboard
[InstCombine] Add of select and zext/sext of the select condition not simplified
define i64 @src0(i1 %c) {
%tmp0 = select i1 %c, i64 64, i64 1
%ext = zext i1 %c to i64
%tmp1 = add i64 %tmp0, %ext
ret i64 %tmp1
}
define i64 @tgt0(i1 %c) {
%tmp0 = select i1 %c, i64 65, i64 1
ret i64 %tmp0
}
Some more variants: https://alive2.llvm.org/ce/z/bmtPuH
Fix in progress at: https://reviews.llvm.org/D153963