Zext doesn't change the number of trailing zeros, so narrow cttz(zext(x)) -> zext(cttz(x)) if the 'ZeroIsUndef' parameter is 'true'.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Feel free to add tests as preliminary steps - no pre-commit review needed for that.
It would be more flexible to make a "sext -> zext" transform as an independent fold - it doesn't require that zero is undef?
https://alive2.llvm.org/ce/z/kZ7BR6
Enough tests?