llvm-6502/test
Richard Sandiford 44b486ed78 [SystemZ] Add long branch pass
Before this change, the SystemZ backend would use BRCL for all branches
and only consider shortening them to BRC when generating an object file.
E.g. a branch on equal would use the JGE alias of BRCL in assembly output,
but might be shortened to the JE alias of BRC in ELF output.  This was
a useful first step, but it had two problems:

(1) The z assembler isn't traditionally supposed to perform branch shortening
    or branch relaxation.  We followed this rule by not relaxing branches
    in assembler input, but that meant that generating assembly code and
    then assembling it would not produce the same result as going directly
    to object code; the former would give long branches everywhere, whereas
    the latter would use short branches where possible.

(2) Other useful branches, like COMPARE AND BRANCH, do not have long forms.
    We would need to do something else before supporting them.

    (Although COMPARE AND BRANCH does not change the condition codes,
    the plan is to model COMPARE AND BRANCH as a CC-clobbering instruction
    during codegen, so that we can safely lower it to a separate compare
    and long branch where necessary.  This is not a valid transformation
    for the assembler proper to make.)

This patch therefore moves branch relaxation to a pre-emit pass.
For now, calls are still shortened from BRASL to BRAS by the assembler,
although this too is not really the traditional behaviour.

The first test takes about 1.5s to run, and there are likely to be
more tests in this vein once further branch types are added.  The feeling
on IRC was that 1.5s is a bit much for a single test, so I've restricted
it to SystemZ hosts for now.

The patch exposes (and fixes) some typos in the main CodeGen/SystemZ tests.
A later patch will remove the {{g}}s from that directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182274 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-20 14:23:08 +00:00
..
Analysis AArch64: use MCJIT by default and enable related tests. 2013-05-06 16:51:08 +00:00
Archive
Assembler Correct invalid debug info metadata 2013-03-12 19:04:24 +00:00
Bindings/Ocaml Use the attribute group reference instead of the attribute directly. 2013-02-20 07:48:23 +00:00
Bitcode Unify clang/llvm attributes for asan/tsan/msan (LLVM part) 2013-02-26 06:58:09 +00:00
BugPoint
CodeGen [SystemZ] Add long branch pass 2013-05-20 14:23:08 +00:00
DebugInfo Generate debug info for by-value struct args even if they are not used. 2013-05-16 23:44:12 +00:00
ExecutionEngine Disable remote MCJIT on pre-v6 ARM 2013-05-20 07:46:06 +00:00
Feature Clarify that llvm.used can contain aliases. 2013-04-22 14:58:02 +00:00
FileCheck Add 'CHECK-DAG' support 2013-05-14 20:34:12 +00:00
Instrumentation [msan] Switch TLS globals to initial-exec model. 2013-05-16 09:14:05 +00:00
Integer Rewrite test/Integer tests to use FileCheck instead of grep 2013-04-08 20:18:15 +00:00
JitListener
Linker Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
MC [PowerPC] Merge/rename PPC fixup types 2013-05-17 12:37:21 +00:00
Object Temporarily disable this test because it is failing when using libc++. 2013-05-19 14:59:08 +00:00
Other Attributes: Don't print trailing whitespace on the function attribute comment. 2013-04-19 11:43:21 +00:00
TableGen Allow TableGen DAG arguments to be just a name. 2013-03-24 19:36:51 +00:00
tools Use pointers to iterate over symbols. 2013-04-24 19:47:55 +00:00
Transforms Move the remaining simplify-libcalls tests to instcombine, merging most of them into a single file. 2013-05-19 13:28:39 +00:00
Unit Propagate path to ASan/MSan symbolizer into test environment to produce useful reports on errors. 2013-04-04 07:41:00 +00:00
Verifier Also verify llvm.compiler_used. 2013-04-22 15:16:51 +00:00
YAMLParser
CMakeLists.txt Add obj2yaml to test dependencies 2013-04-05 07:26:37 +00:00
lit.cfg AArch64: use MCJIT by default and enable related tests. 2013-05-06 16:51:08 +00:00
lit.site.cfg.in Allow host triple to be correctly overridden in CMake builds 2013-05-04 07:36:23 +00:00
Makefile Allow host triple to be correctly overridden in CMake builds 2013-05-04 07:36:23 +00:00
Makefile.tests Remove obsolete object file dumpers 2013-04-12 04:07:13 +00:00
TestRunner.sh