Commit e219e495 by Ilya Enkovich Committed by Ilya Enkovich

targhooks.c (default_get_mask_mode): Use BLKmode in case target doesn't support…

targhooks.c (default_get_mask_mode): Use BLKmode in case target doesn't support required vector mode.

gcc/

2015-10-29  Ilya Enkovich  <enkovich.gnu@gmail.com>

	* targhooks.c (default_get_mask_mode): Use BLKmode in
	case target doesn't support required vector mode.
	* stor-layout.c (layout_type); Check for BLKmode.

From-SVN: r229794
parent 175a31e4
2015-11-05 Ilya Enkovich <enkovich.gnu@gmail.com>
* targhooks.c (default_get_mask_mode): Use BLKmode in
case target doesn't support required vector mode.
* stor-layout.c (layout_type); Check for BLKmode.
2015-11-04 Aditya Kumar <aditya.k7@samsung.com> 2015-11-04 Aditya Kumar <aditya.k7@samsung.com>
Sebastian Pop <s.pop@samsung.com> Sebastian Pop <s.pop@samsung.com>
...@@ -2174,7 +2174,8 @@ layout_type (tree type) ...@@ -2174,7 +2174,8 @@ layout_type (tree type)
TYPE_SATURATING (type) = TYPE_SATURATING (TREE_TYPE (type)); TYPE_SATURATING (type) = TYPE_SATURATING (TREE_TYPE (type));
TYPE_UNSIGNED (type) = TYPE_UNSIGNED (TREE_TYPE (type)); TYPE_UNSIGNED (type) = TYPE_UNSIGNED (TREE_TYPE (type));
/* Several boolean vector elements may fit in a single unit. */ /* Several boolean vector elements may fit in a single unit. */
if (VECTOR_BOOLEAN_TYPE_P (type)) if (VECTOR_BOOLEAN_TYPE_P (type)
&& type->type_common.mode != BLKmode)
TYPE_SIZE_UNIT (type) TYPE_SIZE_UNIT (type)
= size_int (GET_MODE_SIZE (type->type_common.mode)); = size_int (GET_MODE_SIZE (type->type_common.mode));
else else
......
...@@ -1087,10 +1087,16 @@ default_get_mask_mode (unsigned nunits, unsigned vector_size) ...@@ -1087,10 +1087,16 @@ default_get_mask_mode (unsigned nunits, unsigned vector_size)
unsigned elem_size = vector_size / nunits; unsigned elem_size = vector_size / nunits;
machine_mode elem_mode machine_mode elem_mode
= smallest_mode_for_size (elem_size * BITS_PER_UNIT, MODE_INT); = smallest_mode_for_size (elem_size * BITS_PER_UNIT, MODE_INT);
machine_mode vector_mode;
gcc_assert (elem_size * nunits == vector_size); gcc_assert (elem_size * nunits == vector_size);
return mode_for_vector (elem_mode, nunits); vector_mode = mode_for_vector (elem_mode, nunits);
if (VECTOR_MODE_P (vector_mode)
&& !targetm.vector_mode_supported_p (vector_mode))
vector_mode = BLKmode;
return vector_mode;
} }
/* By default, the cost model accumulates three separate costs (prologue, /* By default, the cost model accumulates three separate costs (prologue,
......
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