aarch64: Prevent use of SIMD fcvtz[su] instruction variant with "nosimd"
authorMihailo Stojanovic <mihailo.stojanovic@typhoon-hil.com>
Tue, 30 Mar 2021 10:42:49 +0000 (11:42 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 30 Mar 2021 10:42:49 +0000 (11:42 +0100)
commitcc2fda1328ee69b92724d6b3cffb741f07d86047
tree30b6f64d73005f89b36823472d6f66df2b986a7a
parent65374af219f9c5c594951a07e766fe70c1136a1f
aarch64: Prevent use of SIMD fcvtz[su] instruction variant with "nosimd"

Currently, SF->SI and DF->DI conversions on Aarch64 with the "nosimd"
flag provided sometimes cause the emitting of a vector variant of the
fcvtz[su] instruction (e.g. fcvtzu s0, s0).

This modifies the corresponding pattern to only select the vector
variant of the instruction when generating code with SIMD enabled.

gcc/ChangeLog:

* config/aarch64/aarch64.md
(<optab>_trunc<fcvt_target><GPI:mode>2): Set the "arch"
attribute to disambiguate between SIMD and FP variants of the
instruction.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/fcvt_nosimd.c: New test.
gcc/config/aarch64/aarch64.md
gcc/testsuite/gcc.target/aarch64/fcvt_nosimd.c [new file with mode: 0644]