[PATCH][ARM] NEON DImode neg

Andrew Stubbs ams@codesourcery.com
Mon Mar 26 10:14:00 GMT 2012

On 28/02/12 17:45, Andrew Stubbs wrote:
> Hi all,
> This patch adds a DImode negate pattern for NEON.
> Unfortunately, the NEON vneg instruction only supports vectors, not
> singletons, so there's no direct way to do it in DImode, and the
> compiler ends up moving the value back to core registers, negating it,
> and returning to NEON afterwards:
> fmrrd r2, r3, d16 @ int
> negs r2, r2
> sbc r3, r3, r3, lsl #1
> fmdrr d16, r2, r3 @ int
> The new patch does it entirely in NEON:
> vmov.i32 d17, #0 @ di
> vsub.i64 d16, d17, d16
> (Note that this is the result when combined with my recent patch for
> NEON DImode immediates. Without that you get a constant pool load.)

This updates fixes a bootstrap failure caused by an early clobber error. 
I've also got a native regression test running now.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: neon-neg64.patch
Type: text/x-patch
Size: 2523 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120326/6c29dab9/attachment.bin>

More information about the Gcc-patches mailing list