llvm-6502/test
Richard Sandiford 6c51f89498 [SystemZ] Fix sign of integer memcmp result
r188163 used CLC to implement memcmp.  Code that compares the result
directly against zero can test the CC value produced by CLC, but code
that needs an integer result must use IPM.  The sequence I'd used was:

   ipm <reg>
   sll <reg>, 2
   sra <reg>, 30

but I'd forgotten that this inverts the order, so that CC==1 ("less")
becomes an integer greater than zero, and CC==2 ("greater") becomes
an integer less than zero.  This sequence should only be used if the
CLC arguments are reversed to compensate.  The problem then is that
the branch condition must also be reversed when testing the CLC
result directly.

Rather than do that, I went for a different sequence that works with
the natural CLC order:

   ipm <reg>
   srl <reg>, 28
   rll <reg>, <reg>, 31

One advantage of this is that it doesn't clobber CC.  A disadvantage
is that any sign extension to 64 bits must be done separately,
rather than being folded into the shifts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188538 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-16 10:22:54 +00:00
..
Analysis [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Assembler [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Bindings/Ocaml [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Bitcode [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
BugPoint [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
CodeGen [SystemZ] Fix sign of integer memcmp result 2013-08-16 10:22:54 +00:00
DebugInfo [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
ExecutionEngine [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Feature [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
FileCheck [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Instrumentation [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Integer [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
JitListener [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Linker [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
MC This patch implements wait instruction for mips. Examples are added in test files. 2013-08-16 10:17:03 +00:00
Object [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Other [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +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 [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Transforms Add missing test for GEP + bitcast transformation 2013-08-16 02:59:17 +00:00
Unit [tests] Update to use lit_config and lit package, as appropriate. 2013-08-09 16:22:05 +00:00
Verifier [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
YAMLParser
CMakeLists.txt
lit.cfg [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
lit.site.cfg.in [tests] Update to use lit_config and lit package, as appropriate. 2013-08-09 16:22:05 +00:00
Makefile [tests] Remove dead VALGRIND and CLEANED_TESTSUITE makefile variables. 2013-08-08 20:59:27 +00:00
Makefile.tests Remove dead code from the makefile build system. 2013-07-25 20:25:31 +00:00
TestRunner.sh