llvm/lib
Zinovy Nis 164cd0161e [INDVARS] Extend using of widening of induction variables for the cases of "sub nsw" and "mul nsw" instructions.
Currently only "add nsw" are widened. This patch eliminates tons of "sext" instructions for 64 bit code (and the corresponding target code) in cases like:

int N = 100;
float **A;

void foo(int x0, int x1)
{
        float * A_cur = &A[0][0];
        float * A_next = &A[1][0];
        for(int x = x0; x < x1; ++x).
        {
          // Currently only [x+N] case is widened. Others 2 cases lead to sext.
          // This patch fixes it, so all 3 cases do not need sext.
          const float div = A_cur[x + N] + A_cur[x - N] + A_cur[x * N];
          A_next[x] = div;
        }
}
...
> clang++ test.cpp -march=core-avx2 -Ofast  -fno-unroll-loops -fno-tree-vectorize -S -o -

Differential Revision: http://reviews.llvm.org/D4695



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216160 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-21 08:25:45 +00:00
..
Analysis Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
AsmParser Split parseAssembly into parseAssembly and parseAssemblyInto. 2014-08-19 22:05:47 +00:00
Bitcode BitcodeReader: Only create one basic block for each blockaddress 2014-08-16 01:54:37 +00:00
CodeGen Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
DebugInfo Don't own the buffer in object::Binary. 2014-08-19 18:44:46 +00:00
ExecutionEngine IntelJITEventListener updates to fix breaks by recent changes to EngineBuilder and DIContext. 2014-08-21 07:01:55 +00:00
IR Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
IRReader Modernize the .ll parsing interface. 2014-08-19 16:58:54 +00:00
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker Set comdats when lazily linking functions. 2014-08-15 20:17:08 +00:00
LTO Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
MC Don't allow MCStreamer::EmitIntValue to output 0-byte integers. 2014-08-20 22:46:38 +00:00
Object Fix a pair of use after free. Should bring the bots back. 2014-08-19 18:59:14 +00:00
Option [Option] Support MultiArg in --help 2014-08-15 21:35:07 +00:00
ProfileData Don't own the buffer in object::Binary. 2014-08-19 18:44:46 +00:00
Support Remove custom implementations of max/min in StringRef that was originally added to work an old gcc bug. I believe its been fixed by now. 2014-08-21 04:31:10 +00:00
TableGen Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Target Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
Transforms [INDVARS] Extend using of widening of induction variables for the cases of "sub nsw" and "mul nsw" instructions. 2014-08-21 08:25:45 +00:00
CMakeLists.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
LLVMBuild.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
Makefile ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00