[llvm-bugs] [Bug 27392] wrong code bug
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Apr 28 18:14:48 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27392
Evgeny Stupachenko <evstupac at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Evgeny Stupachenko <evstupac at gmail.com> ---
evstupac committed rL267662: The patch fixes PR27392..
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 at gmail.com>
Files:
/llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp
/llvm/trunk/test/Transforms/LoopUnroll/AArch64/runtime-loop.ll
/llvm/trunk/test/Transforms/LoopUnroll/runtime-loop.ll
/llvm/trunk/test/Transforms/LoopUnroll/runtime-loop1.ll
/llvm/trunk/test/Transforms/LoopUnroll/tripcount-overflow.ll
Users:
evstupac (Author)
http://reviews.llvm.org/rL267662
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160429/0f5c49fd/attachment.html>
More information about the llvm-bugs
mailing list