[llvm] [llvm] Add support for zero-width integers in MathExtras.h (PR #87193)
Markus Böck via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 6 14:50:23 PDT 2024
https://github.com/zero9178 commented:
Code generally looks good to me, although I'd personally replace many of `N == 0 ? x : y` with
```
if (N == 0)
return x;
return y;
```
this is imo more readable especially when y is a relatively large expression.
Regarding the state of 0-bit support, this PR only handles `sext` right? Is everything else already supported and tested? Would it be more accurate to say in the PR title and description that this only adds support for `sext` of 0-bit integers?
https://github.com/llvm/llvm-project/pull/87193
More information about the llvm-commits
mailing list