From: rsandifo Date: Wed, 31 Oct 2012 08:00:24 +0000 (+0000) Subject: gcc/ X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=63d03a9fcee90ae00e3c6ec92e25f5de66840fec;p=thirdparty%2Fgcc.git gcc/ * expmed.c (store_bit_field_1): Use OP_MODE to check whether an insv pattern is available. Remove redundant checks for OP_MODE being MAX_MACHINE_MODE. (extract_bit_field_1): Remove redundant checks for EXT_MODE being MAX_MACHINE_MODE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193022 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7f9d7712552c..3e088023fbc7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-10-31 Richard Sandiford + + * expmed.c (store_bit_field_1): Use OP_MODE to check whether an + insv pattern is available. Remove redundant checks for OP_MODE + being MAX_MACHINE_MODE. + (extract_bit_field_1): Remove redundant checks for EXT_MODE being + MAX_MACHINE_MODE. + 2012-10-31 Richard Sandiford * expmed.c (store_bit_field_1): Remove test for BLKmode values. diff --git a/gcc/expmed.c b/gcc/expmed.c index 1152eee9e070..f6b3d6c1c894 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -669,7 +669,7 @@ store_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, in a word. */ enum machine_mode op_mode = mode_for_extraction (EP_insv, 3); - if (HAVE_insv + if (op_mode != MAX_MACHINE_MODE && bitsize > 0 && GET_MODE_BITSIZE (op_mode) >= bitsize /* Do not use insv for volatile bitfields when @@ -788,7 +788,7 @@ store_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, /* If OP0 is a memory, try copying it to a register and seeing if a cheap register alternative is available. */ - if (HAVE_insv && MEM_P (op0)) + if (op_mode != MAX_MACHINE_MODE && MEM_P (op0)) { enum machine_mode bestmode; unsigned HOST_WIDE_INT maxbits = MAX_FIXED_MODE_SIZE; @@ -803,13 +803,10 @@ store_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, if (GET_MODE (op0) == BLKmode || GET_MODE_BITSIZE (GET_MODE (op0)) > maxbits - || (op_mode != MAX_MACHINE_MODE - && GET_MODE_SIZE (GET_MODE (op0)) > GET_MODE_SIZE (op_mode))) + || GET_MODE_SIZE (GET_MODE (op0)) > GET_MODE_SIZE (op_mode)) bestmode = get_best_mode (bitsize, bitnum, bitregion_start, bitregion_end, - MEM_ALIGN (op0), - (op_mode == MAX_MACHINE_MODE - ? VOIDmode : op_mode), + MEM_ALIGN (op0), op_mode, MEM_VOLATILE_P (op0)); else bestmode = GET_MODE (op0); @@ -1597,12 +1594,9 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, smallest mode containing the field. */ if (GET_MODE (op0) == BLKmode - || (ext_mode != MAX_MACHINE_MODE - && GET_MODE_SIZE (GET_MODE (op0)) > GET_MODE_SIZE (ext_mode))) + || GET_MODE_SIZE (GET_MODE (op0)) > GET_MODE_SIZE (ext_mode)) bestmode = get_best_mode (bitsize, bitnum, 0, 0, MEM_ALIGN (op0), - (ext_mode == MAX_MACHINE_MODE - ? VOIDmode : ext_mode), - MEM_VOLATILE_P (op0)); + ext_mode, MEM_VOLATILE_P (op0)); else bestmode = GET_MODE (op0);