llvm-6502/lib
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
..
Analysis Fix an obvious oops 2005-08-10 00:59:40 +00:00
Archive Final Changes For PR495: 2005-07-08 03:08:58 +00:00
AsmParser
Bytecode Eliminate all remaining tabs and trailing spaces. 2005-07-27 06:12:32 +00:00
CodeGen Teach the legalizer how to legalize FP_TO_UINT. 2005-08-14 01:20:53 +00:00
Debugger For PR495: 2005-07-07 23:21:43 +00:00
ExecutionEngine one cannot allocate a global, until one is done initializing the global pointers 2005-08-01 17:35:40 +00:00
Linker For PR495: 2005-07-07 23:21:43 +00:00
Support Allow tools with "consume after" options (like lli) to take more positional 2005-08-08 21:57:27 +00:00
System Fix grammar: it's == "it is". 2005-08-02 16:04:59 +00:00
Target Make FP_TO_UINT Illegal. This allows us to generate significantly better 2005-08-14 01:17:16 +00:00
Transforms Ooops, don't forget to clear this. The real inner loop is now: 2005-08-13 07:42:01 +00:00
VMCore Testing a variable before it is defined doesn't work so well. It is a fairly small thing, so just let everyone build the .a file 2005-08-13 14:58:23 +00:00
Makefile