[llvm-commits] CVS: llvm/lib/Target/PowerPC/README_ALTIVEC.txt
Chris Lattner
lattner at cs.uiuc.edu
Tue Apr 18 22:55:18 PDT 2006
Changes in directory llvm/lib/Target/PowerPC:
README_ALTIVEC.txt updated: 1.31 -> 1.32
---
Log message:
add a note
---
Diffs of the changes: (+30 -0)
README_ALTIVEC.txt | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+)
Index: llvm/lib/Target/PowerPC/README_ALTIVEC.txt
diff -u llvm/lib/Target/PowerPC/README_ALTIVEC.txt:1.31 llvm/lib/Target/PowerPC/README_ALTIVEC.txt:1.32
--- llvm/lib/Target/PowerPC/README_ALTIVEC.txt:1.31 Tue Apr 18 13:30:19 2006
+++ llvm/lib/Target/PowerPC/README_ALTIVEC.txt Wed Apr 19 00:55:06 2006
@@ -108,3 +108,33 @@
//===----------------------------------------------------------------------===//
+The code generated for this is truly aweful:
+
+vector float test(float a, float b) {
+ return (vector float){ 0.0, a, 0.0, 0.0};
+}
+
+LCPI1_0: ; float
+ .space 4
+ .text
+ .globl _test
+ .align 4
+_test:
+ mfspr r2, 256
+ oris r3, r2, 4096
+ mtspr 256, r3
+ lis r3, ha16(LCPI1_0)
+ addi r4, r1, -32
+ stfs f1, -16(r1)
+ addi r5, r1, -16
+ lfs f0, lo16(LCPI1_0)(r3)
+ stfs f0, -32(r1)
+ lvx v2, 0, r4
+ lvx v3, 0, r5
+ vmrghw v3, v3, v2
+ vspltw v2, v2, 0
+ vmrghw v2, v2, v3
+ mtspr 256, r2
+ blr
+
+//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list