[ARM][PR target/77281] Fix an invalid check for vectors of, the same floating-point constants.

Matthew Wahab matthew.wahab@foss.arm.com
Fri Aug 19 11:48:00 GMT 2016


Test gcc.c-torture/execute/ieee/pr72824-2.c fails for arm targets
because the code generated to move a vector of signed and unsigned zeros
treats it as a vector of unsigned zeros.

That is, an assignment x = { 0.f, -0.f, 0.f, -0.f } is treated as the
assignment x = { 0.f, 0.f, 0.f, 0.f }.

This is due to config/arm/arm.c/neon_valid_immediate using real_equal to
compare the vector elements. This patch replaces the check, using
const_vec_duplicate_p instead. It doesn't add a new test because
pr72824-2.c is enough to check the behaviour.

Tested for arm-none-linux-gnueabihf with native bootstrap and make check
and for arm-none-eabi with cross-compiled check-gcc.

2016-08-19  Matthew Wahab  <matthew.wahab@arm.com>

	PR target/77281
	* config/arm/arm.c (neon_valid_immediate): Delete declaration.
	Use const_vec_duplicate to check for duplicated elements.

Ok for trunk?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ARM-Fix-a-wrong-test-for-vectors-of-the-same-constan.patch
Type: text/x-patch
Size: 1423 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160819/1b161afc/attachment.bin>

More information about the Gcc-patches mailing list