Arm: Add support for auto-vectorization using HF mode.
authorTamar Christina <tamar.christina@arm.com>
Sun, 13 Dec 2020 13:56:30 +0000 (13:56 +0000)
committerTamar Christina <tamar.christina@arm.com>
Sun, 13 Dec 2020 14:10:07 +0000 (14:10 +0000)
commit2f05dadaeda6068ad570117be21f2c16e2f4fa10
treebac00efe447b3c60468c2c693ebd9c0a6b6e5cfe
parent3ed472af6bc9f83b7a8ac553b282f659a0bf53f7
Arm: Add support for auto-vectorization using HF mode.

This adds support to the auto-vectorizer to support HFmode vectorization for
AArch32.  This is supported when +fp16 is used.  I wonder if I should disable
the returning of the type if the option isn't enabled.

At the moment it will be returned but the vectorizer will try and fail to use
it.  It wastes a few compile cycles but doesn't result in bad code.

gcc/ChangeLog:

* config/arm/arm.c (arm_preferred_simd_mode): Add E_HFmode.

gcc/testsuite/ChangeLog:

* gcc.target/arm/vect-half-floats.c: New test.
gcc/config/arm/arm.c
gcc/testsuite/gcc.target/arm/vect-half-floats.c [new file with mode: 0644]