Commit 5d72b79f by Yufeng Zhang Committed by Yufeng Zhang

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
parent 48d53439
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
......
......@@ -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
......
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.
......
/* 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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment