From c9a318d8fa9b0e155b1ea13cf48148600d4cb42a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 4 Mar 2006 08:44:51 +0000 Subject: [PATCH] Add a note llvm-svn: 26523 --- llvm/lib/Target/README.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/llvm/lib/Target/README.txt b/llvm/lib/Target/README.txt index 2ce2575d1ca2..cdadb26806c0 100644 --- a/llvm/lib/Target/README.txt +++ b/llvm/lib/Target/README.txt @@ -101,3 +101,20 @@ into: This would be a win on ppc32, but not x86 or ppc64. +//===---------------------------------------------------------------------===// + +Pull add through mul/shift to handle this: + +int foo(int P[4][4], int i) { + return P[i+2][1]; +} + +better than this (no addi needed): + +_foo: + addi r2, r4, 2 + slwi r2, r2, 4 + add r2, r3, r2 + lwz r3, 4(r2) + blr +