1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/lib/Transforms/Scalar
Zinovy Nis 6b7238f3b4 [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

llvm-svn: 216160
2014-08-21 08:25:45 +00:00
..
ADCE.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
CMakeLists.txt MergedLoadStoreMotion pass 2014-07-18 19:13:09 +00:00
ConstantHoisting.cpp ConstantHoisting.cpp: Add <tuple> for std::tie, since r207593 removed FileSystem.h, it includes <tuple>. 2014-04-30 06:44:50 +00:00
ConstantProp.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
CorrelatedValuePropagation.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
DCE.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
DeadStoreElimination.cpp Revert "r214897 - Remove dead zero store to calloc initialized memory" 2014-08-06 19:30:38 +00:00
EarlyCSE.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
FlattenCFGPass.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
GVN.cpp Introduce a helper to combine instruction metadata. 2014-08-15 15:46:38 +00:00
IndVarSimplify.cpp [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
JumpThreading.cpp AA metadata refactoring (introduce AAMDNodes) 2014-07-24 12:16:19 +00:00
LICM.cpp Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
LLVMBuild.txt Add proper dependencies to LLVMBuild.txt in llvm/lib. 2013-12-10 05:39:34 +00:00
LoadCombine.cpp Fixing a few -Woverloaded-virtual warnings by exposing the hidden virtual function as well. No functional changes intended. 2014-07-30 19:23:59 +00:00
LoopDeletion.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
LoopIdiomRecognize.cpp Remove extra whitespace in function declaration. No functionality change. 2014-06-14 03:48:29 +00:00
LoopInstSimplify.cpp Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
LoopRerollPass.cpp Feeding isSafeToSpeculativelyExecute its DataLayout pointer 2014-07-10 14:41:31 +00:00
LoopRotation.cpp Fix typos in comments and doc 2014-08-05 23:27:34 +00:00
LoopStrengthReduce.cpp Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
LoopUnrollPass.cpp After unrolling a loop with llvm.loop.unroll.count metadata (unroll factor 2014-07-24 22:36:40 +00:00
LoopUnswitch.cpp Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
LowerAtomic.cpp IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
Makefile
MemCpyOptimizer.cpp Don't eliminate memcpy's when the address of the pointer may itself be relevant. Fixes PR18304. Patch by David Wiberg! 2014-07-14 18:52:02 +00:00
MergedLoadStoreMotion.cpp Fix for multi-line comment warning 2014-08-07 23:19:55 +00:00
PartiallyInlineLibCalls.cpp PartiallyInlineLibCalls: Check sqrt result type before transforming it. 2014-08-01 23:21:21 +00:00
Reassociate.cpp [Reassociation] Add support for reassociation with unsafe algebra. 2014-08-14 15:23:01 +00:00
Reg2Mem.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
SampleProfile.cpp Remove some calls to std::move. 2014-08-01 14:31:55 +00:00
Scalar.cpp Initialize FlattenCFG pass 2014-08-13 20:31:52 +00:00
Scalarizer.cpp Add scoped-noalias metadata 2014-07-24 14:25:39 +00:00
ScalarReplAggregates.cpp AA metadata refactoring (introduce AAMDNodes) 2014-07-24 12:16:19 +00:00
SCCP.cpp SCCP: update for cmpxchg returning { iN, i1 } now. 2014-06-13 14:54:09 +00:00
SeparateConstOffsetFromGEP.cpp Partially revert r210444 due to performance regression 2014-07-16 23:25:00 +00:00
SimplifyCFGPass.cpp Remove 'using std::errro_code' from lib. 2014-06-13 02:24:39 +00:00
Sink.cpp Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
SROA.cpp Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
StructurizeCFG.cpp Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
TailRecursionElimination.cpp We may visit a call that uses an alloca multiple times in callUsesLocalStack, sometimes with IsNocapture true and sometimes with IsNocapture false. We accidentally skipped work we needed to do in the IsNocapture=false case if we were called with IsNocapture=true the first time. Fixes PR20405! 2014-07-23 06:24:49 +00:00