llvm-6502/test/Transforms
Arnold Schwaighofer 07a3c481c6 LoopVectorizer: Extend the induction variable to a larger type
In some case the loop exit count computation can overflow. Extend the type to
prevent most of those cases.

The problem is loops like:
int main ()
{
  int a = 1;
  char b = 0;
  lbl:
    a &= 4;
    b--;
    if (b) goto lbl;
  return a;
}

The backedge count is 255. The induction variable type is i8. If we add one to
255 to get the exit count we overflow to zero.

To work around this issue we extend the type of the induction variable to i32 in
the case of i8 and i16.

PR17532

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195008 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-18 13:14:32 +00:00
..
ADCE
ArgumentPromotion ArgumentPromotion: correctly transfer TBAA tags and alignments. 2013-11-15 20:41:15 +00:00
BBVectorize Prevent LoopVectorizer and SLPVectorizer running if the target has no vector registers. 2013-09-18 12:43:35 +00:00
BranchFolding
CodeExtractor
CodeGenPrepare
ConstantMerge Corruptly merge constants with explicit and implicit alignments. 2013-11-12 20:21:43 +00:00
ConstProp
CorrelatedValuePropagation
DeadArgElim Fix a bug in Dead Argument Elimination. 2013-10-09 17:21:44 +00:00
DeadStoreElimination Fixing a heisenbug where the memory dependence analysis behaves differently 2013-11-14 01:10:52 +00:00
DebugIR Use right pointer type in DebugIR 2013-09-27 22:26:25 +00:00
EarlyCSE
FunctionAttrs
GCOVProfiling
GlobalDCE
GlobalOpt Quote potential shell expansions found in tests 2013-10-28 23:37:45 +00:00
GVN Fix PR17952. 2013-11-11 22:00:23 +00:00
IndVarSimplify Add test case for PR12377, it was fixed by r194116. 2013-11-06 11:55:41 +00:00
Inline Rename testing case to use - instead of _. 2013-11-04 18:52:06 +00:00
InstCombine Add the cold attribute to error-reporting call sites 2013-11-17 02:06:35 +00:00
InstSimplify Add a test that large offsets on GEPs on 32 bits targets are handled correctly. 2013-09-28 21:27:49 +00:00
Internalize Use LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN instead of the "dso list". 2013-10-31 20:51:58 +00:00
IPConstantProp
JumpThreading Don't eliminate a partially redundant load if it's in a landing pad. 2013-10-21 04:09:17 +00:00
LCSSA
LICM Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_type 2013-10-05 01:43:03 +00:00
LoopDeletion
LoopIdiom Teach loop-idiom about address space pointer sizes 2013-09-11 05:09:42 +00:00
LoopReroll Add a loop rerolling pass 2013-11-16 23:59:05 +00:00
LoopRotate
LoopSimplify UpdatePHINodes in BasicBlockUtils should not crash on duplicate predecessors 2013-10-04 23:41:05 +00:00
LoopStrengthReduce Fix "existant" typos 2013-10-29 02:35:28 +00:00
LoopUnroll Implement TTI getUnrollingPreferences for PowerPC 2013-09-11 21:20:40 +00:00
LoopUnswitch
LoopVectorize LoopVectorizer: Extend the induction variable to a larger type 2013-11-18 13:14:32 +00:00
LowerAtomic
LowerExpectIntrinsic
LowerInvoke
LowerSwitch
Mem2Reg
MemCpyOpt
MergeFunc Teach MergeFunctions about address spaces 2013-11-10 01:44:37 +00:00
MetaRenamer
ObjCARC [objc-arc] Convert the one directional retain/release relation assert to a conditional check + fail. 2013-11-05 16:02:40 +00:00
PhaseOrdering
PruneEH
Reassociate
Reg2Mem
SampleProfile SampleProfileLoader pass. Initial setup. 2013-11-13 12:22:21 +00:00
ScalarRepl Teach scalarrepl about address spaces 2013-10-30 22:54:58 +00:00
SCCP
SimplifyCFG FoldBranchToCommonDest merges branches into a single branch with or/and of the condition. It has a heuristics for estimating when some of the dependencies are processed by out-of-order processors. This patch adds another rule to the heuristics that says that if the "BonusInstruction" that we speculatively execute is used by the condition of the second branch then it is okay to hoist it. This change exposes more opportunities for other passes to transform the code. It does not matter that much that we if-convert the code because the selectiondag builder splits or/and branches into multiple branches when profitable. 2013-11-12 22:37:16 +00:00
Sink
SLPVectorizer Add llvm/test/Transforms/SLPVectorizer/ARM/lit.local.cfg. Tests there require ARM in targets. 2013-10-29 02:46:00 +00:00
SROA SROA: Handle casts involving vectors of pointers and integer scalars. 2013-09-21 20:36:04 +00:00
StripSymbols
StructurizeCFG StructurizeCFG: Add dependency on LowerSwitch pass 2013-10-02 17:04:59 +00:00
TailCallElim
TailDup