1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test
Cong Hou 20b64d0452 Allow X86::COND_NE_OR_P and X86::COND_NP_OR_E to be reversed.
Currently, AnalyzeBranch() fails non-equality comparison between floating points
on X86 (see https://llvm.org/bugs/show_bug.cgi?id=23875). This is because this
function can modify the branch by reversing the conditional jump and removing
unconditional jump if there is a proper fall-through. However, in the case of
non-equality comparison between floating points, this can turn the branch
"unanalyzable". Consider the following case:

jne.BB1
jp.BB1
jmp.BB2
.BB1:
...
.BB2:
...

AnalyzeBranch() will reverse "jp .BB1" to "jnp .BB2" and then "jmp .BB2" will be
removed:

jne.BB1
jnp.BB2
.BB1:
...
.BB2:
...

However, AnalyzeBranch() cannot analyze this branch anymore as there are two
conditional jumps with different targets. This may disable some optimizations
like block-placement: in this case the fall-through behavior is enforced even if
the fall-through block is very cold, which is suboptimal.

Actually this optimization is also done in block-placement pass, which means we
can remove this optimization from AnalyzeBranch(). However, currently
X86::COND_NE_OR_P and X86::COND_NP_OR_E are not reversible: there is no defined
negation conditions for them.

In order to reverse them, this patch defines two new CondCode X86::COND_E_AND_NP
and X86::COND_P_AND_NE. It also defines how to synthesize instructions for them.
Here only the second conditional jump is reversed. This is valid as we only need
them to do this "unconditional jump removal" optimization.


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

llvm-svn: 258847
2016-01-26 20:08:01 +00:00
..
Analysis [DemandedBits] Fix computation of demanded bits for ICmps 2016-01-25 14:49:36 +00:00
Assembler Fix constant folding of constant vector GEPs with undef or null as pointer argument. 2016-01-19 16:34:31 +00:00
Bindings Deprecate a few C APIs. 2015-12-18 23:46:42 +00:00
Bitcode [WinEH] Verify unwind edges against EH pad tree 2016-01-10 04:28:38 +00:00
BugPoint
CodeGen Allow X86::COND_NE_OR_P and X86::COND_NP_OR_E to be reversed. 2016-01-26 20:08:01 +00:00
DebugInfo Followup to 258750; update more tests to use .p2align . 2016-01-26 00:35:07 +00:00
Examples
ExecutionEngine [RuntimeDyld][AArch64] Add support for the MachO ARM64_RELOC_SUBTRACTOR reloc. 2016-01-21 21:59:50 +00:00
Feature MachineScheduler: Honor optnone functions in the pre-ra scheduler. 2016-01-20 22:38:25 +00:00
FileCheck
Instrumentation [sanitizer] [msan] Fix origin store of array types 2016-01-11 19:55:27 +00:00
Integer
JitListener Fix several accidental DOS line endings in source files 2016-01-03 17:22:03 +00:00
LibDriver
Linker [ThinLTO] Find all needed metadata when linking metadata as postpass 2016-01-25 22:04:56 +00:00
LTO [LTO] Restore original linkage of externals prior to splitting 2016-01-18 23:24:54 +00:00
MC Followup to 258750; update all MC tests to use .p2align . 2016-01-26 00:27:59 +00:00
Object Update the comments for the macho-invalid-zero-ncmds test and fix 2016-01-26 18:20:49 +00:00
Other Recommit r256952 "Filtering IR printing for print-after-all/print-before-all" 2016-01-06 22:55:03 +00:00
SymbolRewriter
TableGen [GlobalISel] Add a generic machine opcode for ADD. 2016-01-20 19:14:55 +00:00
tools [llvm-readobj] Add -elf-section-groups option 2016-01-26 19:46:39 +00:00
Transforms Reassociate: Reprocess RedoInsts after each inst 2016-01-26 18:42:36 +00:00
Unit
Verifier Add a "gc-transition" operand bundle 2016-01-20 19:50:25 +00:00
YAMLParser
.clang-format
CMakeLists.txt Introduce sanstats tool and llvm::CreateSanitizerStatReport function. 2016-01-16 00:31:11 +00:00
lit.cfg Introduce sanstats tool and llvm::CreateSanitizerStatReport function. 2016-01-16 00:31:11 +00:00
lit.site.cfg.in Make WinCOFFObjectWriter.cpp's timestamp writing not use ENABLE_TIMESTAMPS 2016-01-06 19:05:19 +00:00
Makefile check-llvm: Tweak the feature "timestamps" for autoconf. 2015-12-21 08:46:12 +00:00
Makefile.tests
TestRunner.sh