llvm-6502/lib
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
..
Analysis Annotate APInt methods where it's not clear whether they are in place with warn_unused_result. 2013-11-16 16:25:41 +00:00
AsmParser
Bitcode Fix spacing, forward declare order. 2013-11-18 02:51:33 +00:00
CodeGen Revert r194865 and r194874. 2013-11-18 09:31:53 +00:00
DebugInfo
ExecutionEngine Revert r194865 and r194874. 2013-11-18 09:31:53 +00:00
IR Revert r194865 and r194874. 2013-11-18 09:31:53 +00:00
IRReader
Linker
LTO Use array_pod_sort instead of std::sort 2013-11-16 16:15:56 +00:00
MC Revert r194865 and r194874. 2013-11-18 09:31:53 +00:00
Object Path: Recognize COFF import library file magic. 2013-11-15 21:22:02 +00:00
Option
Support Revert r194865 and r194874. 2013-11-18 09:31:53 +00:00
TableGen
Target [mips] Fix 'ran out of registers' in MIPS32 with FP64 when generating code for (ConstantFP 0.0) 2013-11-18 13:12:43 +00:00
Transforms LoopVectorizer: Extend the induction variable to a larger type 2013-11-18 13:14:32 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile