[clang] [lldb] [llvm] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 16 05:25:42 PDT 2024
================
@@ -28729,7 +28731,7 @@ static SDValue GenerateFixedLengthSVETBL(SDValue Op, SDValue Op1, SDValue Op2,
unsigned BitsPerElt = VTOp1.getVectorElementType().getSizeInBits();
unsigned IndexLen = MinSVESize / BitsPerElt;
unsigned ElementsPerVectorReg = VTOp1.getVectorNumElements();
- uint64_t MaxOffset = APInt(BitsPerElt, -1, false).getZExtValue();
+ uint64_t MaxOffset = APInt(BitsPerElt, -1, true).getZExtValue();
----------------
RKSimon wrote:
Seems convoluted - `APInt::getAllOnes(BitsPerElt).getZExtValue()` or just do a `~0ULL >> (64 - BitsPerElt)`?
https://github.com/llvm/llvm-project/pull/80309
More information about the cfe-commits
mailing list