diff options
author | David Sherwood <david.sherwood@arm.com> | 2015-07-28 20:31:17 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-07-28 20:31:17 +0000 |
commit | 1c0e448f4bfc9538e9f8be1fd9a0b9ad9bda0dde (patch) | |
tree | d215dd29e4cf213704a2c9a5dbe053e8d2c8665d /gcc/config | |
parent | 726858e30955b401a568f397e22c60062a9f57a3 (diff) | |
download | gcc-1c0e448f4bfc9538e9f8be1fd9a0b9ad9bda0dde.zip gcc-1c0e448f4bfc9538e9f8be1fd9a0b9ad9bda0dde.tar.gz gcc-1c0e448f4bfc9538e9f8be1fd9a0b9ad9bda0dde.tar.bz2 |
arm.c (neon_element_bits, [...]): Call GET_MODE_INNER unconditionally.
gcc/
2015-07-28 David Sherwood <david.sherwood@arm.com>
* config/arm/arm.c (neon_element_bits, neon_valid_immediate): Call
GET_MODE_INNER unconditionally.
* config/spu/spu.c (arith_immediate_p): Likewise.
* config/i386/i386.c (ix86_build_signbit_mask): Likewise.
* expmed.c (synth_mult): Remove check for VOIDmode result from
GET_MODE_INNER.
(expand_mult_const): Likewise.
* fold-const.c (fold_binary_loc): Replace call to element_precision
with call to GET_MODE_PRECISION.
* genmodes.c (emit_mode_inner_inline): Replace void_mode->name with
m->name.
(emit_mode_inner): Likewise.
* lto-streamer-out.c (lto_write_mode_table): Update GET_MODE_INNER
result check.
* machmode.h (GET_MODE_UNIT_SIZE): Simplify.
(GET_MODE_UNIT_PRECISION): Likewise.
* rtlanal.c (subreg_get_info): Call GET_MODE_INNER unconditionally.
* simplify-rtx.c (simplify_immed_subreg): Likewise.
* stor-layout.c (bitwise_type_for_mode): Update assert.
(element_precision): Remove.
From-SVN: r226328
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/arm/arm.c | 13 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 11 | ||||
-rw-r--r-- | gcc/config/spu/spu.c | 4 |
3 files changed, 10 insertions, 18 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 6da6f68..723d27e 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -12238,18 +12238,16 @@ neon_valid_immediate (rtx op, machine_mode mode, int inverse, bool vector = GET_CODE (op) == CONST_VECTOR; if (vector) - { - n_elts = CONST_VECTOR_NUNITS (op); - innersize = GET_MODE_SIZE (GET_MODE_INNER (mode)); - } + n_elts = CONST_VECTOR_NUNITS (op); else { n_elts = 1; if (mode == VOIDmode) mode = DImode; - innersize = GET_MODE_SIZE (mode); } + innersize = GET_MODE_SIZE (GET_MODE_INNER (mode)); + /* Vectors of float constants. */ if (GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT) { @@ -12832,10 +12830,7 @@ neon_const_bounds (rtx operand, HOST_WIDE_INT low, HOST_WIDE_INT high) HOST_WIDE_INT neon_element_bits (machine_mode mode) { - if (mode == DImode) - return GET_MODE_BITSIZE (mode); - else - return GET_MODE_BITSIZE (GET_MODE_INNER (mode)); + return GET_MODE_BITSIZE (GET_MODE_INNER (mode)); } diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 9413c87..4a2c57b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -19599,7 +19599,6 @@ ix86_build_signbit_mask (machine_mode mode, bool vect, bool invert) case V8SFmode: case V4SFmode: vec_mode = mode; - mode = GET_MODE_INNER (mode); imode = SImode; break; @@ -19610,7 +19609,6 @@ ix86_build_signbit_mask (machine_mode mode, bool vect, bool invert) case V4DFmode: case V2DFmode: vec_mode = mode; - mode = GET_MODE_INNER (mode); imode = DImode; break; @@ -19624,17 +19622,18 @@ ix86_build_signbit_mask (machine_mode mode, bool vect, bool invert) gcc_unreachable (); } - w = wi::set_bit_in_zero (GET_MODE_BITSIZE (mode) - 1, - GET_MODE_BITSIZE (mode)); + machine_mode inner_mode = GET_MODE_INNER (mode); + w = wi::set_bit_in_zero (GET_MODE_BITSIZE (inner_mode) - 1, + GET_MODE_BITSIZE (inner_mode)); if (invert) w = wi::bit_not (w); /* Force this value into the low part of a fp vector constant. */ mask = immed_wide_int_const (w, imode); - mask = gen_lowpart (mode, mask); + mask = gen_lowpart (inner_mode, mask); if (vec_mode == VOIDmode) - return force_reg (mode, mask); + return force_reg (inner_mode, mask); v = ix86_build_const_vector (vec_mode, vect, mask); return force_reg (vec_mode, v); diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 99efb67..68840f5 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -3391,9 +3391,7 @@ arith_immediate_p (rtx op, machine_mode mode, constant_to_array (mode, op, arr); - if (VECTOR_MODE_P (mode)) - mode = GET_MODE_INNER (mode); - + mode = GET_MODE_INNER (mode); bytes = GET_MODE_SIZE (mode); mode = mode_for_size (GET_MODE_BITSIZE (mode), MODE_INT, 0); |