llvm-6502/lib/CodeGen
Nate Begeman d2558e3e4a Teach the legalizer how to legalize FP_TO_UINT.
Teach the legalizer to promote FP_TO_UINT to FP_TO_SINT if the wider
  FP_TO_UINT is also illegal.  This allows us on PPC to codegen
  unsigned short foo(float a) { return a; }

as:
_foo:
.LBB_foo_0:     ; entry
        fctiwz f0, f1
        stfd f0, -8(r1)
        lwz r2, -4(r1)
        rlwinm r3, r2, 0, 16, 31
        blr

instead of:
_foo:
.LBB_foo_0:     ; entry
        fctiwz f0, f1
        stfd f0, -8(r1)
        lwz r2, -4(r1)
        lis r3, ha16(.CPI_foo_0)
        lfs f0, lo16(.CPI_foo_0)(r3)
        fcmpu cr0, f1, f0
        blt .LBB_foo_2  ; entry
.LBB_foo_1:     ; entry
        fsubs f0, f1, f0
        fctiwz f0, f0
        stfd f0, -16(r1)
        lwz r2, -12(r1)
        xoris r2, r2, 32768
.LBB_foo_2:     ; entry
        rlwinm r3, r2, 0, 16, 31
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22785 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-14 01:20:53 +00:00
..
SelectionDAG Teach the legalizer how to legalize FP_TO_UINT. 2005-08-14 01:20:53 +00:00
AsmPrinter.cpp Handle 64-bit constant exprs on 64-bit targets. 2005-08-08 04:26:32 +00:00
BranchFolding.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
ELFWriter.cpp new is not a valid default anywhere, so make this pure virtual 2005-07-28 18:13:59 +00:00
IntrinsicLowering.cpp Eliminate all remaining tabs and trailing spaces. 2005-07-27 06:12:32 +00:00
LiveInterval.cpp Print the symbolic register name in a register allocator debug dump. 2005-05-14 05:34:15 +00:00
LiveInterval.h Print the symbolic register name in a register allocator debug dump. 2005-05-14 05:34:15 +00:00
LiveIntervalAnalysis.cpp Fix debug info to not print out recently freed memory. 2005-07-27 23:11:25 +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 allow a virtual register to be associated with live-in values. 2005-05-13 07:08:07 +00:00
MachineBasicBlock.cpp Remove trailing whitespace 2005-04-21 22:36:52 +00:00
MachineCodeEmitter.cpp new is not a valid default anywhere, so make this pure virtual 2005-07-28 18:13:59 +00:00
MachineFunction.cpp print stack object alignment in -print-machineinstr dumps 2005-05-13 22:54:44 +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 * Order #includes alphabetically 2005-05-05 23:45:17 +00:00
PhysRegTracker.h
PrologEpilogInserter.cpp When inserting callee-save register reloads, make sure to skip over any 2005-05-15 03:09:58 +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