llvm-6502/test
Sanjoy Das 39d6da003d [IndVars] Make loop varying predicates loop invariant.
Summary:
Was D9784: "Remove loop variant range check when induction variable is
strictly increasing"

This change re-implements D9784 with the two differences:

 1. It does not use SCEVExpander and does not generate new
    instructions.  Instead, it does a quick local search for existing
    `llvm::Value`s that it needs when modifying the `icmp`
    instruction.

 2. It is more general -- it deals with both increasing and decreasing
    induction variables.

I've added all of the tests included with D9784, and two more.

As an example on what this change does (copied from D9784):

Given C code:

```
for (int i = M; i < N; i++) // i is known not to overflow
  if (i < 0) break;
  a[i] = 0;
}
```

This transformation produces:

```
for (int i = M; i < N; i++)
  if (M < 0) break;
  a[i] = 0;
}
```

Which can be unswitched into:

```
if (!(M < 0))
  for (int i = M; i < N; i++)
    a[i] = 0;
}
```

I went back and forth on whether the top level logic should live in
`SimplifyIndvar::eliminateIVComparison` or be put into its own
routine.  Right now I've put it under `eliminateIVComparison` because
even though the `icmp` is not *eliminated*, it no longer is an IV
comparison.  I'm open to putting it in its own helper routine if you
think that is better.

Reviewers: reames, nicholas, atrick

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243331 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-27 21:42:49 +00:00
..
Analysis Roll forward r243250 2015-07-26 19:10:03 +00:00
Assembler DI/Verifier: Fix argument bitrot in DILocalVariable 2015-07-24 23:59:25 +00:00
Bindings [OCaml] Do not use -warn-error in tests. 2015-07-17 17:33:23 +00:00
Bitcode Add argmemonly attribute. 2015-07-11 10:30:36 +00:00
BugPoint Fix typo in comment 2015-07-26 11:37:05 +00:00
CodeGen [X86][SSE] Added shuffle tests to demonstrate missed bitmask. 2015-07-27 20:41:57 +00:00
DebugInfo DI/Verifier: Fix argument bitrot in DILocalVariable 2015-07-24 23:59:25 +00:00
ExecutionEngine [RuntimeDyld] MachO: Add support for ARM scattered vanilla relocations. 2015-07-24 17:40:04 +00:00
Feature Revert the new EH instructions 2015-07-10 07:15:17 +00:00
FileCheck
Instrumentation [asan] Rename the ABI versioning symbol to '__asan_version_mismatch_check' instead of abusing '__asan_init' 2015-07-23 10:54:06 +00:00
Integer
JitListener
LibDriver Add support for producing thin archives in llvm-lib. 2015-07-17 16:01:11 +00:00
Linker Linker: Do not expect comdat to exist in source module. 2015-06-22 21:46:51 +00:00
LTO Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
MC Implemented encoding and intrinsics of the following instructions 2015-07-26 14:41:44 +00:00
Object Support printing relocations in files with no section table. 2015-07-23 09:11:05 +00:00
Other [llvm-extract] Drop comdats from declarations 2015-07-06 18:48:02 +00:00
SymbolRewriter
TableGen [TableGen] Improve decoding options for non-orthogonal instructions 2015-07-15 08:04:27 +00:00
tools llvm/test/tools/dsymutil/ARM/lit.local.cfg: Fix possibly typo, s/X86/ARM/. 2015-07-24 11:55:11 +00:00
Transforms [IndVars] Make loop varying predicates loop invariant. 2015-07-27 21:42:49 +00:00
Unit
Verifier Revert the new EH instructions 2015-07-10 07:15:17 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh