llvm/test
Richard Sandiford 6824f127f9 [SystemZ] Be more careful about inverting CC masks
System z branches have a mask to select which of the 4 CC values should
cause the branch to be taken.  We can invert a branch by inverting the mask.
However, not all instructions can produce all 4 CC values, so inverting
the branch like this can lead to some oddities.  For example, integer
comparisons only produce a CC of 0 (equal), 1 (less) or 2 (greater).
If an integer EQ is reversed to NE before instruction selection,
the branch will test for 1 or 2.  If instead the branch is reversed
after instruction selection (by inverting the mask), it will test for
1, 2 or 3.  Both are correct, but the second isn't really canonical.
This patch therefore keeps track of which CC values are possible
and uses this when inverting a mask.

Although this is mostly cosmestic, it fixes undefined behavior
for the CIJNLH in branch-08.ll.  Another fix would have been
to mask out bit 0 when generating the fused compare and branch,
but the point of this patch is that we shouldn't need to do that
in the first place.

The patch also makes it easier to reuse CC results from other instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187495 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 12:30:20 +00:00
..
Analysis
Assembler Debug Info: enable verifier for testing cases. 2013-07-29 20:18:19 +00:00
Bindings/Ocaml
Bitcode Make .bc en/decoding of AttrKind stable 2013-07-26 04:16:55 +00:00
BugPoint
CodeGen [SystemZ] Be more careful about inverting CC masks 2013-07-31 12:30:20 +00:00
DebugInfo Move file to X86 and add a triple to fix darwin bots for now. 2013-07-30 00:20:06 +00:00
ExecutionEngine [mips] Remove XFAIL from test-ptr-reloc-remote.ll 2013-07-24 17:14:05 +00:00
Feature
FileCheck
Instrumentation Debug Info: update testing cases to pass verifier. 2013-07-29 18:12:58 +00:00
Integer
JitListener Debug Info: update testing cases to pass verifier. 2013-07-29 18:12:58 +00:00
Linker Debug Info Verifier: enable verification of DICompileUnit. 2013-07-26 20:04:30 +00:00
MC [SystemZ] Add RISBLG and RISBHG instruction definitions 2013-07-31 11:17:35 +00:00
Object Add support for the 's' operation to llvm-ar. 2013-07-29 12:40:31 +00:00
Other Use pipefail when available. 2013-07-26 22:32:58 +00:00
TableGen Fix a bug in TableGen where the intrinsic function name recognizer could mis-identify names if one was a prefix substring of the other 2013-07-25 12:32:00 +00:00
tools Remove the mblaze backend from llvm. 2013-07-25 18:55:05 +00:00
Transforms Preserve fast-math flags when folding (fsub x, (fneg y)) to (fadd x, y). 2013-07-30 23:53:17 +00:00
Unit
Verifier
YAMLParser
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests Remove dead code from the makefile build system. 2013-07-25 20:25:31 +00:00
TestRunner.sh