summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-13 20:20:58 +0000
committerChris Lattner <sabre@nondot.org>2006-10-13 20:20:58 +0000
commitbe131662c327551f13f02209ef6015ce57c23c9d (patch)
treede8c7011d646b034656373872fe1c3c365a59c3f /llvm/lib/Target/PowerPC
parentcf56917053d2d7b90af1d0a91ad7b415cad82328 (diff)
downloadbcm5719-llvm-be131662c327551f13f02209ef6015ce57c23c9d.tar.gz
bcm5719-llvm-be131662c327551f13f02209ef6015ce57c23c9d.zip
add note
llvm-svn: 30937
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/README.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/README.txt b/llvm/lib/Target/PowerPC/README.txt
index 82af6677fa6..11ad35a56cb 100644
--- a/llvm/lib/Target/PowerPC/README.txt
+++ b/llvm/lib/Target/PowerPC/README.txt
@@ -11,6 +11,25 @@ still a codesize win.
===-------------------------------------------------------------------------===
+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.
OpenPOWER on IntegriCloud