llvm-project
cb89ffdd - [RISCV] Fix incorrect folding of select on ctlz/cttz (#155231)

Commit
1 year ago
[RISCV] Fix incorrect folding of select on ctlz/cttz (#155231) This patch tries to fix [#155014](https://github.com/llvm/llvm-project/issues/155014). The pattern of `ctlz`/`cttz` -> `icmp` -> `select` can occur when accounting for targets which don't support `cttz(0)` or `ctlz(0)`. We can replace this with a mask, but **only on power-of-2 bitwidths**.
Author
Parents
Loading