diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2010-11-04 17:06:45 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2010-11-04 17:06:45 +0100 |
commit | 822a55a08e313229c340f6bf4b76c5f32b270d8e (patch) | |
tree | c0a3bbbd31e49b5046fda809dfe89888d2e6b972 /gcc/lower-subreg.c | |
parent | f7d042e2738fd5382cbdcb3284c237968fda4149 (diff) | |
download | gcc-822a55a08e313229c340f6bf4b76c5f32b270d8e.zip gcc-822a55a08e313229c340f6bf4b76c5f32b270d8e.tar.gz gcc-822a55a08e313229c340f6bf4b76c5f32b270d8e.tar.bz2 |
re PR middle-end/46292 (FAIL: gcc.c-torture/execute/vector-shift2.c compilation, -O3 -g)
PR middle-end/46292
* lower-suberg.c (simplify_subreg_concatn): For VOIDmode elements,
if the innermode is not vector mode, determine the mode of a subreg
by using mode_for_size of inner_size.
From-SVN: r166318
Diffstat (limited to 'gcc/lower-subreg.c')
-rw-r--r-- | gcc/lower-subreg.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c index 1c4e9ad..3563cee 100644 --- a/gcc/lower-subreg.c +++ b/gcc/lower-subreg.c @@ -411,10 +411,15 @@ simplify_subreg_concatn (enum machine_mode outermode, rtx op, part = XVECEXP (op, 0, byte / inner_size); partmode = GET_MODE (part); - if (partmode == VOIDmode) + /* VECTOR_CSTs in debug expressions are expanded into CONCATN instead of + regular CONST_VECTORs. They have vector or integer modes, depending + on the capabilities of the target. Cope with them. */ + if (partmode == VOIDmode && VECTOR_MODE_P (innermode)) + partmode = GET_MODE_INNER (innermode); + else if (partmode == VOIDmode) { - gcc_assert (VECTOR_MODE_P (innermode)); - partmode = GET_MODE_INNER (innermode); + enum mode_class mclass = GET_MODE_CLASS (innermode); + partmode = mode_for_size (inner_size * BITS_PER_UNIT, mclass, 0); } final_offset = byte % inner_size; |