[PATCH, ARM]: rewrite NEON arithmetic operations without UNSPECs
Sandra Loosemore
sandra@codesourcery.com
Tue Jun 22 06:47:00 GMT 2010
This is the third part of my series of patches to provide canonical RTL for
various NEON instructions. Refer to the previous two installments for
background and additional comments that apply here too:
http://gcc.gnu.org/ml/gcc-patches/2010-05/msg02262.html
http://gcc.gnu.org/ml/gcc-patches/2010-06/msg02100.html
This patch focuses on the NEON arithmetic instructions. Like the last
installment for the bit operations, this patch adds new support for generating
NEON instructions for DImode operations.
The additional twist in this particular piece is that it overlaps with Julian's
fix for PR43703. In a nutshell, the issue here is that canonical RTL can only
be used to represent floating-point vadd, vsub, vmla, and vlms when
flag_unsafe_math_operations is true, because these NEON instructions do not
support denormalized values. In the other case, where the canonical RTL
semantics require IEEE conformance, we must retain the existing UNSPEC-based
insns for use by the intrinsics, where the non-IEEE-conformant semantics are
explicitly requested. This patch doesn't include the full fix for PR43703,
though; having mostly disentangled it from the UNSPEC-related changes, I'll post
the remaining parts next as a separate patch.
The rest of this patch has been present in our local tree for a while, and I've
just retested this version against mainline head on arm-none-eabi with tests for
both NEON and non-NEON run on a simulator. OK to check in?
-Sandra
2010-06-21 Sandra Loosemore <sandra@codesourcery.com>
Julian Brown <julian@codesourcery.com>
gcc/
* config/arm/neon.md (UNSPEC_VABA): Delete.
(UNSPEC_VABAL): Delete.
(UNSPEC_VABS): Delete.
(UNSPEC_VMUL_N): Delete.
(adddi3_neon): New.
(subdi3_neon): New.
(mul<mode>3add<mode>_neon): Make the pattern named.
(mul<mode>3neg<mode>add<mode>_neon): Likewise.
(neon_vadd<mode>): Replace with define_expand, and move the remaining
unspec parts...
(neon_vadd<mode>_unspec): ...to this.
(neon_vmla<mode>, neon_vmla<mode>_unspec): Likewise.
(neon_vlms<mode>, neon_vmls<mode>_unspec): Likewise.
(neon_vsub<mode>, neon_vsub<mode>_unspec): Likewise.
(neon_vaba<mode>): Rewrite in terms of vabd.
(neon_vabal<mode>): Rewrite in terms of vabdl.
(neon_vabs<mode>): Rewrite without unspec.
* config/arm/arm.md (*arm_adddi3): Disable for TARGET_NEON.
(*arm_subdi3): Likewise.
* config/arm/neon.ml (Vadd, Vsub): Split out 64-bit variants and add
No_op attribute to disable assembly output checks.
* config/arm/arm_neon.h: Regenerated.
* doc/arm-neon-intrinsics.texi: Regenerated.
gcc/testsuite/
* gcc.target/arm/neon/vadds64.c: Regenerated.
* gcc.target/arm/neon/vaddu64.c: Regenerated.
* gcc.target/arm/neon/vsubs64.c: Regenerated.
* gcc.target/arm/neon/vsubu64.c: Regenerated.
* gcc.target/arm/neon-vmla-1.c: Add -ffast-math to options.
* gcc.target/arm/neon-vmls-1.c: Likewise.
* gcc.target/arm/neon-vsubs64.c: New execution test.
* gcc.target/arm/neon-vsubu64.c: New execution test.
* gcc.target/arm/neon-vadds64.c: New execution test.
* gcc.target/arm/neon-vaddu64.c: New execution test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arith2.patch
Type: text/x-patch
Size: 28376 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100622/3e2e7a24/attachment.bin>
More information about the Gcc-patches
mailing list