[multiple changes]
2016-01-22 Christian Bruel <christian.bruel@st.com> PR target/68674 * expr.c (expand_expr_real_1): Reset DECL_MODE if VECTOR_TYPE_P changed. // testsuite 2016-01-21 Christian Bruel <christian.bruel@st.com> PR target/68674 * gcc.target/i386/pr68674.c * gcc.target/aarch64/pr68674.c * gcc.target/arm/pr68674.c From-SVN: r232728
This commit is contained in:
parent
fce661e8d5
commit
7c816d0f46
6 changed files with 85 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-01-22 Christian Bruel <christian.bruel@st.com>
|
||||
|
||||
PR target/68674
|
||||
* expr.c (expand_expr_real_1): Reset DECL_MODE if VECTOR_TYPE_P changed.
|
||||
|
||||
2016-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
PR target/69403
|
||||
|
|
11
gcc/expr.c
11
gcc/expr.c
|
@ -9597,7 +9597,16 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
|
|||
decl_rtl = DECL_RTL (exp);
|
||||
expand_decl_rtl:
|
||||
gcc_assert (decl_rtl);
|
||||
decl_rtl = copy_rtx (decl_rtl);
|
||||
|
||||
/* DECL_MODE might change when TYPE_MODE depends on attribute target
|
||||
settings for VECTOR_TYPE_P that might switch for the function. */
|
||||
if (currently_expanding_to_rtl
|
||||
&& code == VAR_DECL && MEM_P (decl_rtl)
|
||||
&& VECTOR_TYPE_P (type) && exp && DECL_MODE (exp) != mode)
|
||||
decl_rtl = change_address (decl_rtl, TYPE_MODE (type), 0);
|
||||
else
|
||||
decl_rtl = copy_rtx (decl_rtl);
|
||||
|
||||
/* Record writes to register variables. */
|
||||
if (modifier == EXPAND_WRITE
|
||||
&& REG_P (decl_rtl)
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2016-01-21 Christian Bruel <christian.bruel@st.com>
|
||||
|
||||
PR target/68674
|
||||
* gcc.target/i386/pr68674.c
|
||||
* gcc.target/aarch64/pr68674.c
|
||||
* gcc.target/arm/pr68674.c
|
||||
|
||||
2016-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
PR target/69403
|
||||
|
|
22
gcc/testsuite/gcc.target/aarch64/pr68674.c
Normal file
22
gcc/testsuite/gcc.target/aarch64/pr68674.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* PR target/68674 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -mcpu=generic+nosimd" } */
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
int8x8_t a;
|
||||
extern int8x8_t b;
|
||||
int16x8_t e;
|
||||
|
||||
void __attribute__((target("+simd")))
|
||||
foo1(void)
|
||||
{
|
||||
e = (int16x8_t) vaddl_s8(a, b);
|
||||
}
|
||||
|
||||
int8x8_t __attribute__((target("+simd")))
|
||||
foo2(void)
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
26
gcc/testsuite/gcc.target/arm/pr68674.c
Normal file
26
gcc/testsuite/gcc.target/arm/pr68674.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* PR target/68674 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target arm_neon_ok } */
|
||||
/* { dg-options "-O2 -mfloat-abi=softfp" } */
|
||||
|
||||
#pragma GCC target ("fpu=vfp")
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
int8x8_t a;
|
||||
extern int8x8_t b;
|
||||
int16x8_t e;
|
||||
|
||||
void __attribute__((target("fpu=neon")))
|
||||
foo1(void)
|
||||
{
|
||||
e = (int16x8_t) vaddl_s8(a, b);
|
||||
}
|
||||
|
||||
int8x8_t __attribute__((target("fpu=neon")))
|
||||
foo2(void)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
|
15
gcc/testsuite/gcc.target/i386/pr68674.c
Normal file
15
gcc/testsuite/gcc.target/i386/pr68674.c
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* PR target/68674 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target avx } */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
typedef int v8si __attribute__((vector_size(32)));
|
||||
|
||||
v8si a;
|
||||
|
||||
__attribute__((target("avx")))
|
||||
v8si
|
||||
foo()
|
||||
{
|
||||
return a;
|
||||
}
|
Loading…
Add table
Reference in a new issue