[PATCH] D144565: dwp check overflow

zhuna via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 22 19:23:09 PST 2023


zhuna8616 added inline comments.


================
Comment at: llvm/tools/llvm-dwp/llvm-dwp.cpp:475
+      }
+      ContributionOffsets[Index] = NewOffset.getLimitedValue();
     }
----------------
zhuna8616 wrote:
> ayermolo wrote:
> > Please make sure this doesn't break https://reviews.llvm.org/D137882
> > It relies on overflow behavior.
> When nothing overflows, getLimitedValue simply returns the raw data of this APInt. Since there is an overflow check, this is synonyms to something like getValue.
I tried it on your test case in https://reviews.llvm.org/D137882 and passed.
{F26615950}


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144565/new/

https://reviews.llvm.org/D144565



More information about the llvm-commits mailing list