Commit 2defb110 by Eric Botcazou Committed by Eric Botcazou

* tree.c (tree_size) <VECTOR_CST>: New case.

From-SVN: r185930
parent 552ab977
2012-03-28 Eric Botcazou <ebotcazou@adacore.com>
* tree.c (tree_size) <VECTOR_CST>: New case.
2012-03-28 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_modes_tieable_p): Handle 32bit AVX modes.
......
2012-03-28 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/vect7.ad[sb]: New test.
2012-03-28 Paul Thomas <pault@gcc.gnu.org>
Tobias Burnus <burnus@gcc.gnu.org>
......
-- { dg-do compile }
package body Vect7 is
procedure Assign is
v1 : constant v4sf := (-1.0, -2.0, -3.0, -4.0);
v2 : v4sf := v1;
v3 : v4sf;
begin
v3 := vzero;
v3 := vconst;
v3 := v1;
v3 := v2;
v3 := (1.0, -2.0, 3.0, -4.0);
v3 := (1.0, -2.0, 3.0, F);
v2 := vzero;
end;
end Vect7;
package Vect7 is
type v4sf is array (1 .. 4) of Float;
for v4sf'Alignment use 16;
pragma Machine_Attribute (v4sf, "vector_type");
vzero : constant v4sf := (0.0, 0.0, 0.0, 0.0);
vconst : constant v4sf := (1.0, 2.0, 3.0, 4.0);
vvar : v4sf := vconst;
F : Float := 5.0;
procedure Assign;
end Vect7;
......@@ -724,6 +724,10 @@ tree_size (const_tree node)
return (sizeof (struct tree_vec)
+ (TREE_VEC_LENGTH (node) - 1) * sizeof (tree));
case VECTOR_CST:
return (sizeof (struct tree_vector)
+ (TYPE_VECTOR_SUBPARTS (TREE_TYPE (node)) - 1) * sizeof (tree));
case STRING_CST:
return TREE_STRING_LENGTH (node) + offsetof (struct tree_string, str) + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment