1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test
Chris Lattner 5cbbcc56ad enhance the "change or icmp's into switch" xform to handle one value in an
'or sequence' that it doesn't understand.  This allows us to optimize
something insane like this:

int crud (unsigned char c, unsigned x)
 {
   if(((((((((( (int) c <= 32 ||
                    (int) c == 46) || (int) c == 44)
                  || (int) c == 58) || (int) c == 59) || (int) c == 60)
               || (int) c == 62) || (int) c == 34) || (int) c == 92)
            || (int) c == 39) != 0)
     foo();
 }

into:

define i32 @crud(i8 zeroext %c, i32 %x) nounwind ssp noredzone {
entry:
  %cmp = icmp ult i8 %c, 33
  br i1 %cmp, label %if.then, label %switch.early.test

switch.early.test:                                ; preds = %entry
  switch i8 %c, label %if.end [
    i8 39, label %if.then
    i8 44, label %if.then
    i8 58, label %if.then
    i8 59, label %if.then
    i8 60, label %if.then
    i8 62, label %if.then
    i8 46, label %if.then
    i8 92, label %if.then
    i8 34, label %if.then
  ]

by pulling the < comparison out ahead of the newly formed switch.

llvm-svn: 121680
2010-12-13 04:50:38 +00:00
..
Analysis Revert r121520, which may have introduced miscompilations. 2010-12-10 21:48:28 +00:00
Archive Revert test/Archive/check_binary_output.ll". It fails on a buildbot. 2010-12-07 05:57:02 +00:00
Assembler Fix PR 4170 by having ExtractValueInst::getIndexedType() reject out-of-bounds indexing. 2010-12-05 20:50:26 +00:00
Bindings/Ocaml
Bitcode Testcase for PR8494 (invalid bitcode crashing the bitcode reader). 2010-10-28 15:57:30 +00:00
BugPoint test: Check the feature 'loadable_module' with load modules in %llvmshlibdir. 2010-11-29 07:58:32 +00:00
CodeGen Missed some ADDI <-> ADDIK conversions in 121649. 2010-12-12 22:53:14 +00:00
DebugInfo Hide tests, that check .loc, .file in output assembly, from darwin9 buildbot. 2010-12-02 23:29:58 +00:00
ExecutionEngine XFAIL for now. If someone with access to an ARM/Linux host wants to have a look 2010-12-02 20:20:32 +00:00
Feature test: Check the feature 'loadable_module' with load modules in %llvmshlibdir. 2010-11-29 07:58:32 +00:00
FrontendAda Adjust this test for the fact that the stores are no longer 2010-12-02 20:56:51 +00:00
FrontendC Test case for r120740. Radar 8712503. 2010-12-02 21:25:55 +00:00
FrontendC++ This test dates from the time when llvm-gcc had problems if two types were 2010-12-02 18:19:23 +00:00
FrontendFortran Use -S rather than -c for the benefit of dragonegg. 2010-11-25 21:41:35 +00:00
FrontendObjC Remove explicit uses of -emit-llvm, the test infrastructure adds it 2010-11-25 21:46:07 +00:00
FrontendObjC++ Remove explicit uses of -emit-llvm, the test infrastructure adds it 2010-11-25 21:48:20 +00:00
Integer
lib Use LLVMCC_EMITIR_FLAG rather than hard-coding "-emit-llvm". 2010-11-25 21:19:52 +00:00
Linker Fix PR8300 by remembering to keep the bitcast in all cases. 2010-10-19 02:02:57 +00:00
LLVMC Remove -llvmc-temp-hack from tblgen. 2010-10-23 07:32:53 +00:00
MC Fixed version of 121434 with no new memory leaks. 2010-12-10 07:39:47 +00:00
Other test/Other/close-stderr.ll: Require the feature 'shell'. It is not executable on Win32 but it is executable on MSYS-bash. 2010-12-07 02:43:58 +00:00
Scripts macho-dump: Switch to C++ macho-dump tool. 2010-12-10 06:19:45 +00:00
TableGen Add support for using the `!if' operator when initializing variables: 2010-12-13 01:46:19 +00:00
Transforms enhance the "change or icmp's into switch" xform to handle one value in an 2010-12-13 04:50:38 +00:00
Unit Test: Fix Support.Path and _all_ of the unittest death tests. GetTempPath defaults to \Windows\. 2010-12-07 01:23:49 +00:00
Verifier
CMakeLists.txt macho-dump: Fix CMake build, following up to r121466. 2010-12-10 09:18:26 +00:00
lit.cfg test: Add the feature 'shell' on LLVM_ON_UNIX. 2010-12-07 02:43:51 +00:00
lit.site.cfg.in test: Add the new feature 'loadable_module'. 2010-11-29 00:20:09 +00:00
Makefile test: Use $SharedLibDir for loadable modules. On Cygming, loadable modules are not in lib/ but bin. 2010-11-29 00:20:21 +00:00
Makefile.tests
site.exp.in test: Use $SharedLibDir for loadable modules. On Cygming, loadable modules are not in lib/ but bin. 2010-11-29 00:20:21 +00:00
TestRunner.sh