[AArch64] Add support for 16-bit FMOV immediates
aarch64_float_const_representable_p was still returning false for HFmode, so we wouldn't use 16-bit FMOV immediate. E.g. before the patch: __fp16 foo (void) { return 0x1.1p-3; } gave: mov w0, 12352 fmov h0, w0 with -march=armv8.2-a+fp16, whereas now it gives: fmov h0, 1.328125e-1 2018-08-02 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64.c (aarch64_float_const_representable_p): Allow HFmode constants if TARGET_FP_F16INST. gcc/testsuite/ * gcc.target/aarch64/f16_mov_immediate_1.c: Expect fmov immediate to be used. * gcc.target/aarch64/f16_mov_immediate_2.c: Likewise. * gcc.target/aarch64/f16_mov_immediate_3.c: Force +nofp16. * gcc.target/aarch64/sve/single_1.c: Except fmov immediate to be used for .h. * gcc.target/aarch64/sve/single_2.c: Likewise. * gcc.target/aarch64/sve/single_3.c: Likewise. * gcc.target/aarch64/sve/single_4.c: Likewise. From-SVN: r263250
Showing
Please
register
or
sign in
to comment