diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2016-09-05 16:44:19 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2016-09-05 16:44:19 +0200 |
commit | 8a27cf73aa5ce0a0d0c426862e01b4ede6ac9b3f (patch) | |
tree | 808b99cdf16abe7de33727977a1a3b6d1ff1d2b4 /gcc/explow.c | |
parent | 25ff5dd35471b2b20f2b2681c8ff24c0d086ec00 (diff) | |
download | gcc-8a27cf73aa5ce0a0d0c426862e01b4ede6ac9b3f.zip gcc-8a27cf73aa5ce0a0d0c426862e01b4ede6ac9b3f.tar.gz gcc-8a27cf73aa5ce0a0d0c426862e01b4ede6ac9b3f.tar.bz2 |
re PR target/77452 (ICE: in plus_constant, at explow.c:87 with -fno-split-wide-types -mavx512f --param=max-combine-insns=2)
PR rtl-optimization/77452
* explow.c (plus_constant) <case MEM>: Extract scalar constant from
inner-mode reference to a CONST_VECTOR constant in the constant pool.
testsuite/ChangeLog:
PR rtl-optimization/77452
* gcc.target/i386/pr77452.c: New test.
From-SVN: r239989
Diffstat (limited to 'gcc/explow.c')
-rw-r--r-- | gcc/explow.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/explow.c b/gcc/explow.c index b14291d..e935c30 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -106,7 +106,15 @@ plus_constant (machine_mode mode, rtx x, HOST_WIDE_INT c, if (GET_CODE (XEXP (x, 0)) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0))) { - tem = plus_constant (mode, get_pool_constant (XEXP (x, 0)), c); + rtx cst = get_pool_constant (XEXP (x, 0)); + + if (GET_CODE (cst) == CONST_VECTOR + && GET_MODE_INNER (GET_MODE (cst)) == mode) + { + cst = gen_lowpart (mode, cst); + gcc_assert (cst); + } + tem = plus_constant (mode, cst, c); tem = force_const_mem (GET_MODE (x), tem); /* Targets may disallow some constants in the constant pool, thus force_const_mem may return NULL_RTX. */ |