llvm-6502/lib/CodeGen
Chris Lattner 229ab2e7b2 implement some more logical compares with constants, so that:
int foo1(int x, int y) {
  int t1 = x >= 0;
  int t2 = y >= 0;
  return t1 & t2;
}
int foo2(int x, int y) {
  int t1 = x == -1;
  int t2 = y == -1;
  return t1 & t2;
}

produces:

_foo1:
        or r2, r4, r3
        srwi r2, r2, 31
        xori r3, r2, 1
        blr
_foo2:
        and r2, r4, r3
        addic r2, r2, 1
        li r2, 0
        addze r3, r2
        blr

instead of:

_foo1:
        srwi r2, r4, 31
        xori r2, r2, 1
        srwi r3, r3, 31
        xori r3, r3, 1
        and r3, r2, r3
        blr
_foo2:
        addic r2, r4, 1
        li r2, 0
        addze r2, r2
        addic r3, r3, 1
        li r3, 0
        addze r3, r3
        and r3, r2, r3
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21547 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-25 21:20:28 +00:00
..
SelectionDAG implement some more logical compares with constants, so that: 2005-04-25 21:20:28 +00:00
AsmPrinter.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
BranchFolding.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
IntrinsicLowering.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
LiveInterval.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
LiveInterval.h Fix typeo 2004-11-18 04:31:10 +00:00
LiveIntervalAnalysis.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
LiveIntervalAnalysis.h Allow the live interval analysis pass to be a bit more aggressive about 2005-03-09 23:05:19 +00:00
LiveVariables.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
MachineBasicBlock.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
MachineCodeEmitter.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
MachineFunction.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
MachineInstr.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
Makefile Change Library Names Not To Conflict With Others When Installed 2004-10-27 23:18:45 +00:00
Passes.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
PHIElimination.cpp Convert tabs to spaces 2005-04-22 04:01:18 +00:00
PhysRegTracker.h Improved PhysRegTracker interface. RegAlloc lazily allocates the register tracker using a std::auto_ptr 2004-02-23 06:10:13 +00:00
PrologEpilogInserter.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
RegAllocIterativeScan.cpp Update these register allocators to set the PhysRegUsed info in MachineFunction. 2005-01-23 22:45:13 +00:00
RegAllocLinearScan.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
RegAllocLocal.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
RegAllocSimple.cpp Convert tabs to spaces 2005-04-22 04:01:18 +00:00
TwoAddressInstructionPass.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
UnreachableBlockElim.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
VirtRegMap.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
VirtRegMap.h Remove trailing whitespace 2005-04-21 22:36:52 +00:00