[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp README.txt
Nate Begeman
natebegeman at mac.com
Sun May 7 19:52:51 PDT 2006
Changes in directory llvm/lib/Target/PowerPC:
PPCISelDAGToDAG.cpp updated: 1.181 -> 1.182
README.txt updated: 1.86 -> 1.87
---
Log message:
Update some stuff now that the new rlwimi code has gone in
---
Diffs of the changes: (+0 -70)
PPCISelDAGToDAG.cpp | 1
README.txt | 69 ----------------------------------------------------
2 files changed, 70 deletions(-)
Index: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.181 llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.182
--- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.181 Sat May 6 19:23:38 2006
+++ llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Sun May 7 21:52:37 2006
@@ -405,7 +405,6 @@
TLI.ComputeMaskedBits(Op0, TgtMask, LKZ, LKO);
TLI.ComputeMaskedBits(Op1, TgtMask, RKZ, RKO);
- // FIXME: rotrwi / rotlwi
if ((LKZ | RKZ) == 0x00000000FFFFFFFFULL) {
unsigned PInsMask = ~RKZ;
unsigned PTgtMask = ~LKZ;
Index: llvm/lib/Target/PowerPC/README.txt
diff -u llvm/lib/Target/PowerPC/README.txt:1.86 llvm/lib/Target/PowerPC/README.txt:1.87
--- llvm/lib/Target/PowerPC/README.txt:1.86 Fri May 5 00:36:15 2006
+++ llvm/lib/Target/PowerPC/README.txt Sun May 7 21:52:38 2006
@@ -85,75 +85,6 @@
===-------------------------------------------------------------------------===
-#define ARRAY_LENGTH 16
-
-union bitfield {
- struct {
-#ifndef __ppc__
- unsigned int field0 : 6;
- unsigned int field1 : 6;
- unsigned int field2 : 6;
- unsigned int field3 : 6;
- unsigned int field4 : 3;
- unsigned int field5 : 4;
- unsigned int field6 : 1;
-#else
- unsigned int field6 : 1;
- unsigned int field5 : 4;
- unsigned int field4 : 3;
- unsigned int field3 : 6;
- unsigned int field2 : 6;
- unsigned int field1 : 6;
- unsigned int field0 : 6;
-#endif
- } bitfields, bits;
- unsigned int u32All;
- signed int i32All;
- float f32All;
-};
-
-
-typedef struct program_t {
- union bitfield array[ARRAY_LENGTH];
- int size;
- int loaded;
-} program;
-
-
-void AdjustBitfields(program* prog, unsigned int fmt1)
-{
- prog->array[0].bitfields.field0 = fmt1;
- prog->array[0].bitfields.field1 = fmt1 + 1;
-}
-
-We currently generate:
-
-_AdjustBitfields:
- lwz r2, 0(r3)
- addi r5, r4, 1
- rlwinm r2, r2, 0, 0, 19
- rlwinm r5, r5, 6, 20, 25
- rlwimi r2, r4, 0, 26, 31
- or r2, r2, r5
- stw r2, 0(r3)
- blr
-
-We should teach someone that or (rlwimi, rlwinm) with disjoint masks can be
-turned into rlwimi (rlwimi)
-
-The better codegen would be:
-
-_AdjustBitfields:
- lwz r0,0(r3)
- rlwinm r4,r4,0,0xff
- rlwimi r0,r4,0,26,31
- addi r4,r4,1
- rlwimi r0,r4,6,20,25
- stw r0,0(r3)
- blr
-
-===-------------------------------------------------------------------------===
-
Compile this:
int %f1(int %a, int %b) {
More information about the llvm-commits
mailing list