[InstCombine] cttz(sext(x)) -> cttz(zext(x))
```
----------------------------------------
define i32 @src(i16 %x, i1 %b) {
%0:
%z = sext i16 %x to i32
%p = cttz i32 %z, %b
ret i32 %p
}
=>
define i32 @tgt(i16 %x, i1 %b) {
%0:
%z = zext i16 %x to i32
%p = cttz i32 %z, %b
ret i32 %p
}
Transformation seems to be correct!
```
https://alive2.llvm.org/ce/z/evomeg
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D101764
parent
1c1406f2
Please register or sign in to comment