aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-03-04 10:31:33 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-03-04 10:31:33 +0000
commitb147c5b92f3bbcda3d5d464d65bdf76e666c34a5 (patch)
treec2f8b971696b932d85ac468f2e244e1604dbfcb4 /gcc/expmed.c
parent8750672faeaa9c633e2b2051c01fab6c6ceef81b (diff)
downloadgcc-b147c5b92f3bbcda3d5d464d65bdf76e666c34a5.zip
gcc-b147c5b92f3bbcda3d5d464d65bdf76e666c34a5.tar.gz
gcc-b147c5b92f3bbcda3d5d464d65bdf76e666c34a5.tar.bz2
re PR middle-end/47968 (ICE: in gen_lowpart_general, at rtlhooks.c:51 when converting vector of double to vector of float)
2011-03-04 Richard Guenther <rguenther@suse.de> PR middle-end/47968 * expmed.c (extract_bit_field_1): Prefer vector modes that vec_extract patterns can handle. * gcc.dg/torture/pr47968.c: New testcase. From-SVN: r170673
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index f17abb5..b0c1e23 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -1205,7 +1205,6 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
&& GET_MODE_INNER (GET_MODE (op0)) != tmode)
{
enum machine_mode new_mode;
- int nunits = GET_MODE_NUNITS (GET_MODE (op0));
if (GET_MODE_CLASS (tmode) == MODE_FLOAT)
new_mode = MIN_MODE_VECTOR_FLOAT;
@@ -1221,8 +1220,7 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
new_mode = MIN_MODE_VECTOR_INT;
for (; new_mode != VOIDmode ; new_mode = GET_MODE_WIDER_MODE (new_mode))
- if (GET_MODE_NUNITS (new_mode) == nunits
- && GET_MODE_SIZE (new_mode) == GET_MODE_SIZE (GET_MODE (op0))
+ if (GET_MODE_SIZE (new_mode) == GET_MODE_SIZE (GET_MODE (op0))
&& targetm.vector_mode_supported_p (new_mode))
break;
if (new_mode != VOIDmode)