Changes in directory llvm/lib/Target/PowerPC:
README.txt updated: 1.39 -> 1.40 --- Log message: Add another important case we miss --- Diffs of the changes: (+19 -0) README.txt | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+) Index: llvm/lib/Target/PowerPC/README.txt diff -u llvm/lib/Target/PowerPC/README.txt:1.39 llvm/lib/Target/PowerPC/README.txt:1.40 --- llvm/lib/Target/PowerPC/README.txt:1.39 Thu Nov 17 12:26:56 2005 +++ llvm/lib/Target/PowerPC/README.txt Thu Dec 8 01:13:28 2005 @@ -222,3 +222,22 @@ instruction to avoid a copy AFTER the 2-addr instruction. The 2-addr pass currently only commutes to avoid inserting a copy BEFORE the two addr instr. +===-------------------------------------------------------------------------=== + +Compile offsets from allocas: + +int *%test() { + %X = alloca { int, int } + %Y = getelementptr {int,int}* %X, int 0, uint 1 + ret int* %Y +} + +into a single add, not two: + +_test: + addi r2, r1, -8 + addi r3, r2, 4 + blr + +--> important for C++. + _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits