llvm-6502/lib/CodeGen/SelectionDAG
Chris Lattner ee4ea92358 Use the new TargetLowering::ComputeNumSignBits method to eliminate
sign_extend_inreg operations.  Though ComputeNumSignBits is still rudimentary,
this is enough to compile this:

short test(short X, short x) {
  int Y = X+x;
  return (Y >> 1);
}
short test2(short X, short x) {
  int Y = (short)(X+x);
  return Y >> 1;
}

into:

_test:
        add r2, r3, r4
        srawi r3, r2, 1
        blr
_test2:
        add r2, r3, r4
        extsh r2, r2
        srawi r3, r2, 1
        blr

instead of:

_test:
        add r2, r3, r4
        srawi r2, r2, 1
        extsh r3, r2
        blr
_test2:
        add r2, r3, r4
        extsh r2, r2
        srawi r2, r2, 1
        extsh r3, r2
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28146 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-06 09:30:03 +00:00
..
DAGCombiner.cpp Use the new TargetLowering::ComputeNumSignBits method to eliminate 2006-05-06 09:30:03 +00:00
LegalizeDAG.cpp Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference. 2006-05-03 01:29:57 +00:00
Makefile
ScheduleDAG.cpp Remove and simplify some more machineinstr/machineoperand stuff. 2006-05-04 18:16:01 +00:00
ScheduleDAGList.cpp Fix VC++ compilation error. 2006-05-05 01:47:05 +00:00
ScheduleDAGSimple.cpp
SelectionDAG.cpp
SelectionDAGISel.cpp When inserting casts, be careful of where we put them. We cannot insert 2006-05-06 09:10:37 +00:00
SelectionDAGPrinter.cpp
TargetLowering.cpp Add some really really simple code for computing sign-bit propagation. 2006-05-06 09:27:13 +00:00