[PATCH][AArch64] Simplify vreinterpret for float64x1_t using casts.

Alan Lawrence alan.lawrence@arm.com
Mon Sep 8 16:46:00 GMT 2014


Now that float64x1 is a vector type, we can convert between it and other 
same-sized vector types with a simple cast, as is already done for all other 
reinterprets not involving float64x1.

This allows to remove the reinterpretv1df and reinterpret<*>v1df builtins in 
aarch64-simd-builtins.def, and the folding-to-VIEW_CONVERT_EXPR code and 
corresponding types/qualifiers/etc. in aarch64-builtins.c.

Finally, the aarch64_reinterpret<*> define_expand's in aarch64-simd.md - many 
variants of which were generated, but only the v1df variants were used and those 
only to determine the signatures of the corresponding builtins - now have no 
uses and can also be removed, along with the aarch64_simd_reinterpret function 
that only they called.

Cross-tested check-gcc and check-g++ on aarch64-none-elf and 
aarch64_be-none-elf. (Note gcc.target/aarch64/vreinterpret_f64_1.c provides a 
test of execution results.)

gcc/ChangeLog:

	* config/aarch64/aarch64-builtins.c (aarch64_types_unop_su_qualifiers,
	TYPES_REINTERP_SU, aarch64_types_unop_sp_qualifiers, TYPE_REINTERP_SP,
	aarch64_types_unop_us_qualifiers, TYPES_REINTERP_US,
	aarch64_types_unop_ps_qualifiers, TYPES_REINTERP_PS, BUILTIN_VD):
	Delete.

	(aarch64_fold_builtin): Remove all reinterpret cases.

	* config/aarch64/aarch64-protos.h (aarch64_simd_reinterpret): Delete.

	* config/aarch64/aarch64-simd-builtins.def (reinterpret*) : Delete.

	* config/aarch64/aarch64-simd.md (aarch64_reinterpretv8qi<mode>,
	aarch64_reinterpretv4hi<mode>, aarch64_reinterpretv2si<mode>,
	aarch64_reinterpretv2sf<mode>, aarch64_reinterpretdi<mode>,
	aarch64_reinterpretv1df<mode>, aarch64_reinterpretv16qi<mode>,
	aarch64_reinterpretv8hi<mode>, aarch64_reinterpretv4si<mode>,
	aarch64_reinterpretv4sf<mode>, aarch64_reinterpretv2di<mode>,
	aarch64_reinterpretv2df<mode>): Delete.

	* config/aarch64/aarch64.c (aarch64_simd_reinterpret): Delete.

	* config/aarch64/arm_neon.h (vreinterpret_p8_f64,
	vreinterpret_p16_f64, vreinterpret_f32_f64, vreinterpret_f64_f32,
	vreinterpret_f64_p8, vreinterpret_f64_p16, vreinterpret_f64_s8,
	vreinterpret_f64_s16, vreinterpret_f64_s32, vreinterpret_f64_u8,
	vreinterpret_f64_u16, vreinterpret_f64_u32, vreinterpret_s64_f64,
	vreinterpret_u64_f64, vreinterpret_s8_f64, vreinterpret_s16_f64,
	vreinterpret_s32_f64, vreinterpret_u8_f64, vreinterpret_u16_f64,
	vreinterpret_u32_f64): Use cast.

	* config/aarch64/iterators.md (VD_RE): Delete.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reinterpret_f64.patch
Type: text/x-patch
Size: 15897 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140908/aab1a955/attachment.bin>


More information about the Gcc-patches mailing list