diff options
author | Ilya Enkovich <enkovich.gnu@gmail.com> | 2015-11-05 09:46:10 +0000 |
---|---|---|
committer | Ilya Enkovich <ienkovich@gcc.gnu.org> | 2015-11-05 09:46:10 +0000 |
commit | e219e495bc5f009f59c5bdabf8905f7630d10fc6 (patch) | |
tree | 5c64d4d4e5bf6e0a1b34ef887efc1b7dec23697e /gcc | |
parent | 175a31e4914dc8814c08f8961daf0d419e2f0cb7 (diff) | |
download | gcc-e219e495bc5f009f59c5bdabf8905f7630d10fc6.zip gcc-e219e495bc5f009f59c5bdabf8905f7630d10fc6.tar.gz gcc-e219e495bc5f009f59c5bdabf8905f7630d10fc6.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/stor-layout.c | 3 | ||||
-rw-r--r-- | gcc/targhooks.c | 8 |
3 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 99ad158..2e58c51 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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> Sebastian Pop <s.pop@samsung.com> diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 2e258ce..364a0b5 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -2174,7 +2174,8 @@ layout_type (tree type) TYPE_SATURATING (type) = TYPE_SATURATING (TREE_TYPE (type)); TYPE_UNSIGNED (type) = TYPE_UNSIGNED (TREE_TYPE (type)); /* 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) = size_int (GET_MODE_SIZE (type->type_common.mode)); else diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 6deb7b1..14324b7 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -1087,10 +1087,16 @@ default_get_mask_mode (unsigned nunits, unsigned vector_size) unsigned elem_size = vector_size / nunits; machine_mode elem_mode = smallest_mode_for_size (elem_size * BITS_PER_UNIT, MODE_INT); + machine_mode vector_mode; 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, |