diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-13 20:20:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-13 20:20:58 +0000 |
commit | 6a250ecc99c76dcb07e6431c5cb99e495895ad82 (patch) | |
tree | 66a75db74570c88c32126b55ff8b7471eec2e389 /lib/Target/PowerPC/README.txt | |
parent | 594f4c69e6b67f9af648adfe3d05c2b72b313795 (diff) | |
download | llvm-6a250ecc99c76dcb07e6431c5cb99e495895ad82.tar.gz llvm-6a250ecc99c76dcb07e6431c5cb99e495895ad82.tar.bz2 llvm-6a250ecc99c76dcb07e6431c5cb99e495895ad82.tar.xz |
add note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/README.txt')
-rw-r--r-- | lib/Target/PowerPC/README.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/README.txt b/lib/Target/PowerPC/README.txt index 82af6677fa..11ad35a56c 100644 --- a/lib/Target/PowerPC/README.txt +++ b/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. |