These should both clearly work with our current model for zero width
integers, but don't until now!
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM!
llvm/lib/Support/APInt.cpp | ||
---|---|---|
348 | Just a pet peeve, I would much prefer that methods like zext and trunc allow the degenerate cases where you're extending or truncating to the same width. I think having separate "OrSelf" versions just adds clutter for no real benefit. |
Comment Actions
Thanks for the review Jay!
llvm/lib/Support/APInt.cpp | ||
---|---|---|
348 | I agree completely, would you like to allow this and deprecate the "OrSelf" versions? |
llvm/lib/Support/APInt.cpp | ||
---|---|---|
348 | I have four patches for this:
Is splitting it into four excessive? |
Just a pet peeve, I would much prefer that methods like zext and trunc allow the degenerate cases where you're extending or truncating to the same width. I think having separate "OrSelf" versions just adds clutter for no real benefit.