Go to file
Ehsan Amiri dbcfea9811 Extend trip count instead of truncating IV in LFTR, when legal
When legal, extending trip count in the loop control logic generates better code compared to truncating IV. This is because

(1) extending trip count is a loop invariant operation (see genLoopLimit where we prove trip count is loop invariant).
(2) Scalar Evolution seems to have problems understanding trunc when computing loop trip count. So removing them allows better analysis performed in Scalar Evolution. (In particular this fixes PR 28363 which is the motivation for this change).

I am not going to perform any performance test. Any degradation caused by this should be an indication of a bug elsewhere.

To prove legality, we rely on SCEV to prove zext(trunc(IV)) == IV (or similarly for sext). If this holds, we can prove equivalence of trunc(IV)==ExitCnt (1) and IV == zext(ExitCnt). Simply take zext of boths sides of (1) and apply the proven equivalence.

This commit contains changes in a newly added testcase which was not included in the previous commit (which was reverted later on).

https://reviews.llvm.org/D23075

llvm-svn: 278421
2016-08-11 21:31:40 +00:00
clang Don't enable PIE on i686-unknown-cloudabi. 2016-08-11 20:03:22 +00:00
clang-tools-extra [clang-tidy] fix readability-else-after-return test 2016-08-11 08:18:39 +00:00
compiler-rt [asan] abort_on_error=1 by default on Android. 2016-08-11 00:26:29 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Make min follow the OCL 1.0 specs 2016-07-25 22:36:22 +00:00
libcxx Remove test for the sign of a NaN - doesn't work on MIPS, not strictly legal. Fixes bug 28936 2016-08-11 18:46:24 +00:00
libcxxabi Depend directly on unwind when not building standalone 2016-08-09 21:28:52 +00:00
libunwind Allow building both shared and static library 2016-08-08 22:55:48 +00:00
lld Remove trailing whitespace. 2016-08-11 21:30:42 +00:00
lldb Modify coding conventions to mention include ordering. 2016-08-11 18:10:40 +00:00
llgo [llgo] add llgo source path to LLVM_GO_PACKAGES 2016-07-27 03:01:00 +00:00
llvm Extend trip count instead of truncating IV in LFTR, when legal 2016-08-11 21:31:40 +00:00
openmp Fixes for hierarchical barrier (possible hang if team size changed). 2016-08-11 13:04:00 +00:00
parallel-libs [StreamExecutor] Add DeviceMemory and kernel arg packing 2016-08-08 16:45:19 +00:00
polly [GPGPU] Ensure arrays where only parts are modified are copied to GPU 2016-08-10 10:58:19 +00:00