[InstCombine] fold mul of sext bools to 'and'
Alive2: define i32 @src(i1 %x, i1 %y) { %0: %zx = sext i1 %x to i32 %zy = sext i1 %y to i32 %r = mul i32 %zx, %zy ret i32 %r } => define i32 @tgt(i1 %x, i1 %y) { %0: %a = and i1 %x, %y %r = zext i1 %a to i32 ret i32 %r } Transformation seems to be correct! https://alive2.llvm.org/ce/z/gaPQxA
Loading
Please sign in to comment