summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-04-22 11:59:37 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-04-22 11:59:37 +0000
commit62dbb979c0bd3ab34d0b60b6fedfb66321d81dcf (patch)
tree0508793fb5118827e38d856e37c22957cf3ffc41 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent592cee666e17edd4402f355f36af51f41915efbe (diff)
[OPENMP] Fix use of unsigned counters in loops with zero trip count.
Patch fixes bugs in codegen for loops with unsigned counters and zero trip count. Previously preconditions for all loops were built using logic (Upper - Lower) > 0. But if the loop is a loop with zero trip count, then Upper - Lower is < 0 only for signed integer, for unsigned we're running into an underflow situation. In this patch we're using original Lower<Upper condition to check that loop body can be executed at least once. Also this allows to skip code generation for loops, if it is known that preconditions for the loop are always false. Differential Revision: http://reviews.llvm.org/D9103 llvm-svn: 235500
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions