llvm-6502/lib
Chris Lattner 5f42a240ba Two things:
1. teach SimplifySetCC that '(srl (ctlz x), 5) == 0' is really x != 0.
2. Teach visitSELECT_CC to use SimplifySetCC instead of calling it and
   ignoring the result.  This allows us to compile:

bool %test(ulong %x) {
  %tmp = setlt ulong %x, 4294967296
  ret bool %tmp
}

to:

_test:
        cntlzw r2, r3
        cmplwi cr0, r3, 1
        srwi r2, r2, 5
        li r3, 0
        beq cr0, LBB1_2 ;
LBB1_1: ;
        mr r3, r2
LBB1_2: ;
        blr

instead of:

_test:
        addi r2, r3, -1
        cntlzw r2, r2
        cntlzw r3, r3
        srwi r2, r2, 5
        cmplwi cr0, r2, 0
        srwi r2, r3, 5
        li r3, 0
        bne cr0, LBB1_2 ;
LBB1_1: ;
        mr r3, r2
LBB1_2: ;
        blr

This isn't wonderful, but it's an improvement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30513 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-20 06:19:26 +00:00
..
Analysis Explain change with a comment. 2006-09-17 17:51:00 +00:00
Archive For PR797: 2006-08-25 19:54:53 +00:00
AsmParser Added some eye-candy for Subtarget type checking 2006-09-17 20:25:45 +00:00
Bytecode Small fixes for supporting dll* linkage types 2006-09-17 13:06:18 +00:00
CodeGen Two things: 2006-09-20 06:19:26 +00:00
Debugger For PR797: 2006-08-25 17:43:11 +00:00
ExecutionEngine Unbreak the JIT 2006-09-15 04:56:11 +00:00
Linker Adding dllimport, dllexport and external weak linkage types. 2006-09-14 18:23:27 +00:00
Support Instantiate Statistic<> in one place, not in every .o file that uses it. 2006-08-30 04:17:00 +00:00
System Use new config.h macro 2006-09-14 06:21:59 +00:00
Target This is already done 2006-09-20 04:59:33 +00:00
Transforms We went through all that trouble to compute whether it was safe to transform 2006-09-20 04:44:59 +00:00
VMCore add a helper method 2006-09-18 04:54:57 +00:00
Makefile Make some changes suggested by Chris: 2006-05-17 22:55:35 +00:00