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
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
70 ms | x64 debian > Clang.Driver::debug-pass-structure.c |
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
clang-format: please reformat the code