llvm.org GIT mirror llvm / a1dafe0
Fix signed overflow detected by ubsan This overflow does not affect algorithm, so just suppress it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316018 91177308-0d34-0410-b5e6-96231b3b80d8 Vitaly Buka 2 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
54385438 // First, transform the values such that they start at zero and ascend.
54395439 int64_t Base = Values[0];
54405440 for (auto &V : Values)
5441 V -= Base;
5441 V -= (uint64_t)(Base);
54425442
54435443 // Now we have signed numbers that have been shifted so that, given enough
54445444 // precision, there are no negative values. Since the rest of the transform