From ab2b55c1093acf8b95b07147afe213cd6e98777f Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 26 Jul 2016 14:07:05 +0000 Subject: [PATCH] re PR tree-optimization/72517 (436.cactusADM: More than 40% regression in O3 and Ofast on AMD bdver4 m/c.) 2016-07-26 Richard Biener PR middle-end/72517 * expmed.c (extract_bit_field_1): Constrain the vector mode with element size matching the extraction mode size when choosing a better vector mode to do the extraction from. From-SVN: r238756 --- gcc/ChangeLog | 7 +++++++ gcc/expmed.c | 1 + 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bbc7e29..dff649d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,11 @@ 2016-07-26 Richard Biener + + PR middle-end/72517 + * expmed.c (extract_bit_field_1): Constrain the vector mode + with element size matching the extraction mode size when + choosing a better vector mode to do the extraction from. + +2016-07-26 Richard Biener Prathamesh Kulkarni PR middle-end/70920 diff --git a/gcc/expmed.c b/gcc/expmed.c index f776e54..7af0c61 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -1581,6 +1581,7 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, for (; new_mode != VOIDmode ; new_mode = GET_MODE_WIDER_MODE (new_mode)) if (GET_MODE_SIZE (new_mode) == GET_MODE_SIZE (GET_MODE (op0)) + && GET_MODE_UNIT_SIZE (new_mode) == GET_MODE_SIZE (tmode) && targetm.vector_mode_supported_p (new_mode)) break; if (new_mode != VOIDmode) -- 2.7.4