summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorMax Kazantsev <max.kazantsev@azul.com>2017-07-14 06:35:03 +0000
committerMax Kazantsev <max.kazantsev@azul.com>2017-07-14 06:35:03 +0000
commitf80ffa1a7851bcbd6c7b598372c11ceb71a6598f (patch)
tree7a49948c80100c1e0222528fbbeff5a833a6668f /clang/lib/Basic/Targets.cpp
parentc5bcc587aec549b7e30104fd65530493deba9942 (diff)
downloadbcm5719-llvm-f80ffa1a7851bcbd6c7b598372c11ceb71a6598f.tar.gz
bcm5719-llvm-f80ffa1a7851bcbd6c7b598372c11ceb71a6598f.zip
[IRCE] Fix corner case with Start = INT_MAX
When iterating through loop for (int i = INT_MAX; i > 0; i--) We fail to generate the pre-loop for it. It happens because we use the overflown value in a comparison predicate when identifying whether or not we need it. In old logic, we used SLE predicate against Greatest value which exceeds all seen values of the IV and might be overflown. Now we use the GreatestSeen value of this IV with SLT predicate. Also added a test that ensures that a pre-loop is generated for such loops. Differential Revision: https://reviews.llvm.org/D35347 llvm-svn: 308001
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud