testsuite: arm: Update expected asm in armv8_2-fp16-neon-2.c

Message ID 20241024191257.363452-1-torbjorn.svensson@foss.st.com
State Committed
Commit e3f2db9ef424ef3fb819f1ad91db79893c31ba6d
Headers
Series testsuite: arm: Update expected asm in armv8_2-fp16-neon-2.c |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Test passed

Commit Message

Torbjorn SVENSSON Oct. 24, 2024, 7:12 p.m. UTC
  Ok for trunk?

--

With the changes in r15-1579-g792f97b44ff, the test_vmul_n_16x8 function
does not contain any vdup.16 q* r* instruction with -mfloat-abi=softfp.

The differnce between r15-1578-g5185274c76c and r15-1579-g792f97b44ff
with -mfloat-abi=softfp for the function is:
        .global test_vmul_n_16x8
        .syntax unified
        .arm
        .type   test_vmul_n_16x8, %function
 test_vmul_n_16x8:
        @ args = 4, pretend = 0, frame = 0
        @ frame_needed = 0, uses_anonymous_args = 0
        @ link register save eliminated.
        vmov    d16, r0, r1  @ v8hf
        vmov    d17, r2, r3
-       ldrh    r3, [sp]        @ __fp16
-       vdup.16 q9, r3
+       vld1.16 {d18[], d19[]}, [sp]
        vmul.f16        q8, q9, q8
        vmov    r0, r1, d16  @ v8hf
        vmov    r2, r3, d17
        bx      lr
        .size   test_vmul_n_16x8, .-test_vmul_n_16x8

gcc/testsuite/ChangeLog:

	* gcc.target/arm/armv8_2-fp16-neon-2.c: Expect 3 vdup.16 q* r*
	when in arm_hf_eabi else 2.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
---
 gcc/testsuite/gcc.target/arm/armv8_2-fp16-neon-2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Richard Earnshaw (lists) Nov. 1, 2024, 6:47 p.m. UTC | #1
On 24/10/2024 20:12, Torbjörn SVENSSON wrote:
> Ok for trunk?
> 
> --
> 
> With the changes in r15-1579-g792f97b44ff, the test_vmul_n_16x8 function
> does not contain any vdup.16 q* r* instruction with -mfloat-abi=softfp.
> 
> The differnce between r15-1578-g5185274c76c and r15-1579-g792f97b44ff
> with -mfloat-abi=softfp for the function is:
>         .global test_vmul_n_16x8
>         .syntax unified
>         .arm
>         .type   test_vmul_n_16x8, %function
>  test_vmul_n_16x8:
>         @ args = 4, pretend = 0, frame = 0
>         @ frame_needed = 0, uses_anonymous_args = 0
>         @ link register save eliminated.
>         vmov    d16, r0, r1  @ v8hf
>         vmov    d17, r2, r3
> -       ldrh    r3, [sp]        @ __fp16
> -       vdup.16 q9, r3
> +       vld1.16 {d18[], d19[]}, [sp]
>         vmul.f16        q8, q9, q8
>         vmov    r0, r1, d16  @ v8hf
>         vmov    r2, r3, d17
>         bx      lr
>         .size   test_vmul_n_16x8, .-test_vmul_n_16x8
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.target/arm/armv8_2-fp16-neon-2.c: Expect 3 vdup.16 q* r*
> 	when in arm_hf_eabi else 2.
> 
> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>

OK.

R.
  
Torbjorn SVENSSON Nov. 4, 2024, 7:23 p.m. UTC | #2
On 2024-11-01 19:47, Richard Earnshaw (lists) wrote:
> On 24/10/2024 20:12, Torbjörn SVENSSON wrote:
>> Ok for trunk?
>>
>> --
>>
>> With the changes in r15-1579-g792f97b44ff, the test_vmul_n_16x8 function
>> does not contain any vdup.16 q* r* instruction with -mfloat-abi=softfp.
>>
>> The differnce between r15-1578-g5185274c76c and r15-1579-g792f97b44ff
>> with -mfloat-abi=softfp for the function is:
>>          .global test_vmul_n_16x8
>>          .syntax unified
>>          .arm
>>          .type   test_vmul_n_16x8, %function
>>   test_vmul_n_16x8:
>>          @ args = 4, pretend = 0, frame = 0
>>          @ frame_needed = 0, uses_anonymous_args = 0
>>          @ link register save eliminated.
>>          vmov    d16, r0, r1  @ v8hf
>>          vmov    d17, r2, r3
>> -       ldrh    r3, [sp]        @ __fp16
>> -       vdup.16 q9, r3
>> +       vld1.16 {d18[], d19[]}, [sp]
>>          vmul.f16        q8, q9, q8
>>          vmov    r0, r1, d16  @ v8hf
>>          vmov    r2, r3, d17
>>          bx      lr
>>          .size   test_vmul_n_16x8, .-test_vmul_n_16x8
>>
>> gcc/testsuite/ChangeLog:
>>
>> 	* gcc.target/arm/armv8_2-fp16-neon-2.c: Expect 3 vdup.16 q* r*
>> 	when in arm_hf_eabi else 2.
>>
>> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
> 
> OK.
Pushed as r15-4929-ge3f2db9ef42.

Kind regards,
Torbjörn
  

Patch

diff --git a/gcc/testsuite/gcc.target/arm/armv8_2-fp16-neon-2.c b/gcc/testsuite/gcc.target/arm/armv8_2-fp16-neon-2.c
index 6808576ce59..d65f6877461 100644
--- a/gcc/testsuite/gcc.target/arm/armv8_2-fp16-neon-2.c
+++ b/gcc/testsuite/gcc.target/arm/armv8_2-fp16-neon-2.c
@@ -400,7 +400,8 @@  test_vdupq_n_f16 (float16_t a)
 {
   return vdupq_n_f16 (a);
 }
-/* { dg-final { scan-assembler-times {vdup\.16\tq[0-9]+, r[0-9]+} 3 } }  */
+/* { dg-final { scan-assembler-times {vdup\.16\tq[0-9]+, r[0-9]+} 3 { target arm_hf_eabi } } }  */
+/* { dg-final { scan-assembler-times {vdup\.16\tq[0-9]+, r[0-9]+} 2 { target { ! arm_hf_eabi } } } }  */
 
 float16x4_t
 test_vdup_lane_f16 (float16x4_t a)