From 5f153584d969c290830c54ac9546867b5bdc2d59 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 18 Apr 2006 18:30:19 +0000 Subject: [PATCH] add a note llvm-svn: 27809 --- lib/Target/PowerPC/README_ALTIVEC.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lib/Target/PowerPC/README_ALTIVEC.txt b/lib/Target/PowerPC/README_ALTIVEC.txt index ad315bde88a..886723d5bf9 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. + +//===----------------------------------------------------------------------===// +