aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/README_ALTIVEC.txt
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-18 18:30:19 +0000
committerChris Lattner <sabre@nondot.org>2006-04-18 18:30:19 +0000
commit87140126e88d4fe4f9aedac06dd4e9beec3b5301 (patch)
tree1c9d7b75d614865a9b9e535974114e547356f207 /lib/Target/PowerPC/README_ALTIVEC.txt
parent0090120c2b8ac3fea5427f6fae6f36fc3dc50dca (diff)
downloadexternal_llvm-87140126e88d4fe4f9aedac06dd4e9beec3b5301.zip
external_llvm-87140126e88d4fe4f9aedac06dd4e9beec3b5301.tar.gz
external_llvm-87140126e88d4fe4f9aedac06dd4e9beec3b5301.tar.bz2
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/README_ALTIVEC.txt')
-rw-r--r--lib/Target/PowerPC/README_ALTIVEC.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/README_ALTIVEC.txt b/lib/Target/PowerPC/README_ALTIVEC.txt
index ad315bd..886723d 100644
--- a/lib/Target/PowerPC/README_ALTIVEC.txt
+++ b/lib/Target/PowerPC/README_ALTIVEC.txt
@@ -85,3 +85,26 @@ This is probably only reasonable for a post-pass scheduler.
//===----------------------------------------------------------------------===//
+For this function:
+
+void test(vector float *A, vector float *B) {
+ vector float C = (vector float)vec_cmpeq(*A, *B);
+ if (!vec_any_eq(*A, *B))
+ *B = (vector float){0,0,0,0};
+ *A = C;
+}
+
+we get the following basic block:
+
+ ...
+ lvx v2, 0, r4
+ lvx v3, 0, r3
+ vcmpeqfp v4, v3, v2
+ vcmpeqfp. v2, v3, v2
+ bne cr6, LBB1_2 ; cond_next
+
+The vcmpeqfp/vcmpeqfp. instructions currently cannot be merged when the
+vcmpeqfp. result is used by a branch. This can be improved.
+
+//===----------------------------------------------------------------------===//
+