arm.c (arm_expand_neon_args): Call expand_expr with EXPAND_MEMORY for NEON_ARG_MEMORY...

gcc/

	* config/arm/arm.c (arm_expand_neon_args): Call expand_expr
	with EXPAND_MEMORY for NEON_ARG_MEMORY; check if the returned
	rtx is const0_rtx or not.

gcc/testsuite/

	* gcc.target/arm/neon/vst1Q_laneu64-1.c: New test.

From-SVN: r206395
This commit is contained in:
Yufeng Zhang 2014-01-07 16:18:04 +00:00 committed by Yufeng Zhang
parent 48d534390f
commit 5d72b79faa
4 changed files with 43 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2014-01-07 Yufeng Zhang <yufeng.zhang@arm.com>
* config/arm/arm.c (arm_expand_neon_args): Call expand_expr
with EXPAND_MEMORY for NEON_ARG_MEMORY; check if the returned
rtx is const0_rtx or not.
2014-01-07 Richard Sandiford <rdsandiford@googlemail.com>
PR target/58115

View file

@ -24841,7 +24841,11 @@ arm_expand_neon_args (rtx target, int icode, int have_retval,
type_mode);
}
op[argc] = expand_normal (arg[argc]);
/* Use EXPAND_MEMORY for NEON_ARG_MEMORY to ensure a MEM_P
be returned. */
op[argc] = expand_expr (arg[argc], NULL_RTX, VOIDmode,
(thisarg == NEON_ARG_MEMORY
? EXPAND_MEMORY : EXPAND_NORMAL));
switch (thisarg)
{
@ -24860,6 +24864,9 @@ arm_expand_neon_args (rtx target, int icode, int have_retval,
break;
case NEON_ARG_MEMORY:
/* Check if expand failed. */
if (op[argc] == const0_rtx)
return 0;
gcc_assert (MEM_P (op[argc]));
PUT_MODE (op[argc], mode[argc]);
/* ??? arm_neon.h uses the same built-in functions for signed

View file

@ -1,3 +1,7 @@
2014-01-07 Yufeng Zhang <yufeng.zhang@arm.com>
* gcc.target/arm/neon/vst1Q_laneu64-1.c: New test.
2014-01-07 Richard Sandiford <rdsandiford@googlemail.com>
* gcc.target/i386/intrinsics_4.c (bar): New function.

View file

@ -0,0 +1,25 @@
/* Test the `vst1Q_laneu64' ARM Neon intrinsic. */
/* Detect ICE in the case of unaligned memory address. */
/* { dg-do compile } */
/* { dg-require-effective-target arm_neon_ok } */
/* { dg-add-options arm_neon } */
#include "arm_neon.h"
unsigned char dummy_store[1000];
void
foo (char* addr)
{
uint8x16_t vdata = vld1q_u8 (addr);
vst1q_lane_u64 ((uint64_t*) &dummy_store, vreinterpretq_u64_u8 (vdata), 0);
}
uint64_t
bar (uint64x2_t vdata)
{
vdata = vld1q_lane_u64 ((uint64_t*) &dummy_store, vdata, 0);
return vgetq_lane_u64 (vdata, 0);
}