summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/README.txt
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/PowerPC/README.txt')
-rw-r--r--llvm/lib/Target/PowerPC/README.txt42
1 files changed, 6 insertions, 36 deletions
diff --git a/llvm/lib/Target/PowerPC/README.txt b/llvm/lib/Target/PowerPC/README.txt
index 58805562a87..1ba89aa448a 100644
--- a/llvm/lib/Target/PowerPC/README.txt
+++ b/llvm/lib/Target/PowerPC/README.txt
@@ -3,10 +3,15 @@ TODO:
* implement do-loop -> bdnz transform
* implement powerpc-64 for darwin
* use stfiwx in float->int
-* be able to combine sequences like the following into 2 instructions:
+
+* Fold add and sub with constant into non-extern, non-weak addresses so this:
lis r2, ha16(l2__ZTV4Cell)
la r2, lo16(l2__ZTV4Cell)(r2)
addi r2, r2, 8
+becomes:
+ lis r2, ha16(l2__ZTV4Cell+8)
+ la r2, lo16(l2__ZTV4Cell+8)(r2)
+
* Teach LLVM how to codegen this:
unsigned short foo(float a) { return a; }
@@ -24,10 +29,6 @@ _foo:
rlwinm r3, r2, 0, 16, 31
blr
-and:
- extern int X, Y; int* test(int C) { return C? &X : &Y; }
-as one load when using --enable-pic.
-
* Support 'update' load/store instructions. These are cracked on the G5, but
are still a codesize win.
@@ -170,37 +171,6 @@ things like this, rather than forcing llvm to generate the equivalent
===-------------------------------------------------------------------------===
-Compile this (standard bitfield insert of a constant):
-void %test(uint* %tmp1) {
- %tmp2 = load uint* %tmp1 ; <uint> [#uses=1]
- %tmp5 = or uint %tmp2, 257949696 ; <uint> [#uses=1]
- %tmp6 = and uint %tmp5, 4018143231 ; <uint> [#uses=1]
- store uint %tmp6, uint* %tmp1
- ret void
-}
-
-to:
-
-_test:
- lwz r0,0(r3)
- li r2,123
- rlwimi r0,r2,21,3,10
- stw r0,0(r3)
- blr
-
-instead of:
-
-_test:
- lis r2, -4225
- lwz r4, 0(r3)
- ori r2, r2, 65535
- oris r4, r4, 3936
- and r2, r4, r2
- stw r2, 0(r3)
- blr
-
-===-------------------------------------------------------------------------===
-
Compile this:
int %f1(int %a, int %b) {
OpenPOWER on IntegriCloud