llvm-6502/lib/CodeGen
Chris Lattner 5a6bace3ab If a target zero or sign extends the result of its setcc, allow folding of
this into sign/zero extension instructions later.

On PPC, for example, this testcase:

%G = external global sbyte
implementation
void %test(int %X, int %Y) {
  %C = setlt int %X, %Y
  %D = cast bool %C to sbyte
  store sbyte %D, sbyte* %G
  ret void
}

Now codegens to:

        cmpw cr0, r3, r4
        li r3, 1
        li r4, 0
        blt .LBB_test_2 ;
.LBB_test_1:    ;
        or r3, r4, r4
.LBB_test_2:    ;
        addis r2, r2, ha16(L_G$non_lazy_ptr-"L00000$pb")
        lwz r2, lo16(L_G$non_lazy_ptr-"L00000$pb")(r2)
        stb r3, 0(r2)

instead of:

        cmpw cr0, r3, r4
        li r3, 1
        li r4, 0
        blt .LBB_test_2 ;
.LBB_test_1:    ;
        or r3, r4, r4
.LBB_test_2:    ;
***     rlwinm r3, r3, 0, 31, 31
        addis r2, r2, ha16(L_G$non_lazy_ptr-"L00000$pb")
        lwz r2, lo16(L_G$non_lazy_ptr-"L00000$pb")(r2)
        stb r3, 0(r2)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21148 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-07 19:43:53 +00:00
..
SelectionDAG If a target zero or sign extends the result of its setcc, allow folding of 2005-04-07 19:43:53 +00:00
AsmPrinter.cpp add support for prefix/suffix strings to go around GlobalValue(s) 2005-04-02 12:21:51 +00:00
BranchFolding.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
IntrinsicLowering.cpp First step in adding pcmarker intrinsic. Second step (soon) is adding backend support. 2005-03-28 20:05:49 +00:00
LiveInterval.cpp Prevent accessing past the end of the intervals vector, this fixes 2004-12-04 01:22:09 +00:00
LiveInterval.h Fix typeo 2004-11-18 04:31:10 +00:00
LiveIntervalAnalysis.cpp I didn't mean to check this in. :( 2005-03-10 20:59:51 +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 Just in case, handle something that is both a use and a def. 2005-01-19 17:11:51 +00:00
MachineBasicBlock.cpp print the machine CFG in the -print-machineinstrs dump 2005-04-01 06:48:38 +00:00
MachineCodeEmitter.cpp Fix the FIXME, nuke the JIT specific forceCompilationOf method. 2004-11-22 21:54:35 +00:00
MachineFunction.cpp Improve conformance with the Misha spelling benchmark suite 2005-01-30 00:09:23 +00:00
MachineInstr.cpp Allow machine operands to represent global variables with offsets. This is 2004-10-15 04:38:41 +00:00
Makefile Change Library Names Not To Conflict With Others When Installed 2004-10-27 23:18:45 +00:00
Passes.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
PHIElimination.cpp Changes For Bug 352 2004-09-01 22:55:40 +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 Simplify/speedup the PEI by not having to scan for uses of the callee saved 2005-01-23 23:13:12 +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 Update these register allocators to set the PhysRegUsed info in MachineFunction. 2005-01-23 22:45:13 +00:00
RegAllocLocal.cpp Update this pass to set PhysRegsUsed info in MachineFunction. 2005-01-23 22:51:56 +00:00
RegAllocSimple.cpp Update physregsused info. 2005-01-23 22:55:45 +00:00
TwoAddressInstructionPass.cpp Use the TargetInstrInfo::commuteInstruction method to commute instructions 2005-01-19 07:08:42 +00:00
UnreachableBlockElim.cpp Fix the missing symbols problem Bill was hitting. Patch contributed by 2005-03-17 15:38:16 +00:00
VirtRegMap.cpp Make sure to notice that explicit physregs are used in the function 2005-04-04 21:35:34 +00:00
VirtRegMap.h When a virtual register is folded into an instruction, keep track of whether 2004-10-01 23:15:36 +00:00