DForm 5/6 extended mneumonics take 3 arguments.
[oota-llvm.git] / lib / Target / PowerPC / README.txt
1 Currently unimplemented:
2 * cast fp to bool
3 * signed right shift of long by reg
4
5 Current bugs:
6 * ulong to double.  ahhh, here's the problem:
7   floatdidf assumes signed longs.  so if the high but of a ulong
8   just happens to be set, you get the wrong sign.  The fix for this
9   is to call cmpdi2 to compare against zero, if so shift right by one,
10   convert to fp, and multiply by (add to itself).  the sequence would
11   look like:
12   {r3:r4} holds ulong a;
13   li r5, 0
14   li r6, 0 (set r5:r6 to ulong 0)
15   call cmpdi2 ==> sets r3 <, =, > 0
16   if r3 > 0
17   call floatdidf as usual
18   else
19   shift right ulong a, 1 (we could use emitShift)
20   call floatdidf
21   fadd f1, f1, f1 (fp left shift by 1)
22 * linking llvmg++ .s files with gcc instead of g++
23
24 Codegen improvements needed:
25 * PowerPCPEI.cpp needs to save/restore regs in the opposite order
26 * setCondInst needs to know branchless versions of seteq/setne/etc
27 * cast elimination pass (uint -> sbyte -> short, kill the byte -> short)
28 * should hint to the branch select pass that it doesn't need to print the
29   second unconditional branch, so we don't end up with things like:
30         b .LBBl42__2E_expand_function_8_674     ; loopentry.24
31         b .LBBl42__2E_expand_function_8_42      ; NewDefault
32         b .LBBl42__2E_expand_function_8_42      ; NewDefault
33
34 Current hacks:
35 * lazy insert of GlobalBaseReg definition at front of first MBB
36   A prime candidate for sabre's "slightly above ISel" passes.
37 * cast code is huge, unwieldy.  Should probably be broken up into
38   smaller pieces.
39 * visitLoadInst is getting awfully cluttered as well.
40
41 Currently failing tests:
42 * SingleSource
43   `- Regression
44   |  `- casts (ulong to fp failure)
45   `- Benchmarks
46   |  `- Shootout-C++ : most programs fail, miscompilations
47   `- UnitTests
48   |  `- C++Catch
49   |  `- SimpleC++Test
50   |  `- ConditionalExpr (also C++)
51 * MultiSource
52   |- Applications
53   |  `- burg: miscompilation
54   |  `- siod: llc bus error
55   |  `- hbd: miscompilation
56   |  `- d (make_dparser): miscompilation
57   `- Benchmarks
58      `- MallocBench/make: miscompilation