Changes in directory llvm/lib/Target/PowerPC:
README.txt updated: 1.100 -> 1.101 --- Log message: add note --- 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.100 llvm/lib/Target/PowerPC/README.txt:1.101 --- llvm/lib/Target/PowerPC/README.txt:1.100 Fri Sep 22 00:01:56 2006 +++ llvm/lib/Target/PowerPC/README.txt Fri Oct 13 15:20:58 2006 @@ -11,6 +11,25 @@ ===-------------------------------------------------------------------------=== +Compile: + +void foo(int *P) { + if (P) *P = 0; +} + +into: + +_foo: + cmpwi cr0,r3,0 + beqlr cr0 + li r0,0 + stw r0,0(r3) + blr + +This is effectively a simple form of predication. + +===-------------------------------------------------------------------------=== + Teach the .td file to pattern match PPC::BR_COND to appropriate bc variant, so we don't have to always run the branch selector for small functions. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits