aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Host.cpp
diff options
context:
space:
mode:
authorEvgeny Stupachenko <evstupac@gmail.com>2016-04-27 03:04:54 +0000
committerEvgeny Stupachenko <evstupac@gmail.com>2016-04-27 03:04:54 +0000
commit23ce61b66334b78ce7a0dd48c24fbf407ca12d8b (patch)
treeefea78cc6444d7653d38307f6734f96e4b3f412f /llvm/lib/Support/Host.cpp
parentc67651dd70b740765cdb809aa0c87236a7eedc1a (diff)
downloadllvm-23ce61b66334b78ce7a0dd48c24fbf407ca12d8b.zip
llvm-23ce61b66334b78ce7a0dd48c24fbf407ca12d8b.tar.gz
llvm-23ce61b66334b78ce7a0dd48c24fbf407ca12d8b.tar.bz2
The patch fixes PR27392.
Summary: It is incorrect to compare TripCount (which is BECount + 1) with extraiters (or Count) to check if we should enter unrolled loop or not, because TripCount can potentially overflow (when BECount is max unsigned integer). While comparing BECount with (Count - 1) is overflow safe and therefore correct. Reviewer: hfinkel Differential Revision: http://reviews.llvm.org/D19256 From: Evgeny Stupachenko <evstupac@gmail.com> llvm-svn: 267662
Diffstat (limited to 'llvm/lib/Support/Host.cpp')
0 files changed, 0 insertions, 0 deletions