[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

Nate Begeman natebegeman at mac.com
Tue Nov 22 10:16:12 PST 2005



Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.77 -> 1.78
---
Log message:

Check in code to scalarize arbitrarily wide packed types for some simple
vector operations (load, add, sub, mul).

This allows us to codegen:
void %foo(<4 x float> * %a) {
entry:
  %tmp1 = load <4 x float> * %a;
  %tmp2 = add <4 x float> %tmp1, %tmp1
  store <4 x float> %tmp2, <4 x float> *%a
  ret void
}

on ppc as:
_foo:
        lfs f0, 12(r3)
        lfs f1, 8(r3)
        lfs f2, 4(r3)
        lfs f3, 0(r3)
        fadds f0, f0, f0
        fadds f1, f1, f1
        fadds f2, f2, f2
        fadds f3, f3, f3
        stfs f0, 12(r3)
        stfs f1, 8(r3)
        stfs f2, 4(r3)
        stfs f3, 0(r3)
        blr


---
Diffs of the changes:  (+3 -1)

 SelectionDAGNodes.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.77 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.78
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.77	Sun Nov 20 16:55:57 2005
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h	Tue Nov 22 12:15:59 2005
@@ -123,7 +123,9 @@
     // Simple abstract vector operators.  Unlike the integer and floating point
     // binary operators, these nodes also take two additional operands:
     // a constant element count, and a value type node indicating the type of
-    // the elements.  The order is count, type, op0, op1.
+    // the elements.  The order is op0, op1, count, type.  All vector opcodes,
+    // including VLOAD, must currently have count and type as their 3rd and 4th
+    // arguments.
     VADD, VSUB, VMUL,
 
     // MULHU/MULHS - Multiply high - Multiply two integers of type iN, producing






More information about the llvm-commits mailing list