llvm-mirror/test
Adam Nemet c4071d355a [LoopStrengthReduce] Don't trim formula that uses a subset of required registers
Consider this use from the new testcase:

  LSR Use: Kind=ICmpZero, Offsets={0}, widest fixup type: i32
    reg({1000,+,-1}<nw><%for.body>)
    -3003 + reg({3,+,3}<nw><%for.body>)
    -1001 + reg({1,+,1}<nuw><nsw><%for.body>)
    -1000 + reg({0,+,1}<nw><%for.body>)
    -3000 + reg({0,+,3}<nuw><%for.body>)
    reg({-1000,+,1}<nw><%for.body>)
    reg({-3000,+,3}<nsw><%for.body>)

This is the last use we consider for a solution in SolveRecurse, so CurRegs is
a large set.  (CurRegs is the set of registers that are needed by the
previously visited uses in the in-progress solution.)

ReqRegs is {
  {3,+,3}<nw><%for.body>,
  {1,+,1}<nuw><nsw><%for.body>
}

This is the intersection of the regs used by any of the formulas for the
current use and CurRegs.

Now, the code requires a formula to contain *all* these regs (the comment is
simply wrong), otherwise the formula is immediately disqualified.  Obviously,
no formula for this use contains two regs so they will all get disqualified.

The fix modifies the check to allow the formula in this case.  The idea is
that neither of these formulae is introducing any new registers which is the
point of this early pruning as far as I understand.

In terms of set arithmetic, we now allow formulas whose used regs are a subset
of the required regs not just the other way around.

There are few more loops in the test-suite that are now successfully LSRed.  I
have benchmarked those and found very minimal change.

Fixes <rdar://problem/13965777>

llvm-svn: 207271
2014-04-25 21:02:21 +00:00
..
Analysis blockfreq: Only one mass distribution per node 2014-04-25 04:38:43 +00:00
Assembler Reject alias to undefined symbols in the verifier. 2014-03-12 20:15:49 +00:00
Bindings Fix the ocaml test to not create a alias to a declaration. 2014-03-12 21:20:42 +00:00
Bitcode Add 'musttail' marker to call instructions 2014-04-24 20:14:34 +00:00
BugPoint Mark llvm/test/BugPoint/compile-custom.ll as XFAIL:vg_leak. 2014-04-23 14:51:12 +00:00
CodeGen ARM: remove @llvm.arm.sevl 2014-04-25 17:51:25 +00:00
DebugInfo This reapplies r207235 with an additional bugfixes caught by the msan 2014-04-25 20:49:25 +00:00
ExecutionEngine Ignore old JIT tests in AARch64 - CMake style 2014-02-25 09:31:00 +00:00
Feature Disable each MachineFunctionPass for 'optnone' functions, unless that 2014-03-31 17:43:35 +00:00
FileCheck FileCheck: fix a bug with multiple --check-prefix options. Similar to r194565 2013-11-20 13:25:05 +00:00
Instrumentation [asan] Fix instrumentation of x86 intel syntax inline assembly. 2014-04-24 09:56:15 +00:00
Integer
JitListener Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
Linker Fix DataLayout::operator==(). 2014-04-22 17:47:03 +00:00
LTO This patch fixes LTO's RecordStreamer so that it records symbols in the MCExpr 2014-03-31 16:59:13 +00:00
MC [ARM64] Print preferred aliases for SFBM/UBFM in InstPrinter 2014-04-25 10:25:29 +00:00
Object [yaml2obj][ELF] ELF Relocations Support. 2014-04-11 04:13:39 +00:00
Other [PM] Add a new-PM-style CGSCC pass manager using the newly added 2014-04-21 11:12:00 +00:00
TableGen [TableGen] Correctly generate implicit anonymous prototype defs in multiclasses 2014-01-02 20:47:09 +00:00
tools ProfileData: Treat missing function counts as malformed 2014-04-25 02:45:33 +00:00
Transforms [LoopStrengthReduce] Don't trim formula that uses a subset of required registers 2014-04-25 21:02:21 +00:00
Unit With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. 2014-02-28 16:16:51 +00:00
Verifier Add 'musttail' marker to call instructions 2014-04-24 20:14:34 +00:00
YAMLParser [Support][YAML] Add support for accessing tags and tag handle substitution. 2013-10-18 22:38:04 +00:00
.clang-format Add .clang-format without column limit to subdirectory tests/. 2013-11-19 04:26:05 +00:00
CMakeLists.txt [CMake] check-llvm: Include "bugpoint" in dependent list. 2014-03-04 16:13:30 +00:00
lit.cfg ARM: update even more tests 2014-04-03 17:35:22 +00:00
lit.site.cfg.in Eliminate inappropriate use of FindProgramByName() from lli 2014-01-22 21:52:35 +00:00
Makefile With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. 2014-02-28 16:16:51 +00:00
Makefile.tests
TestRunner.sh