From: Sudakshina Das Date: Fri, 1 Dec 2017 10:12:55 +0000 (+0000) Subject: Fix wrong code by arm_final_prescan with fp16 move instructions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1500cb68c3d2a7b1ddc491af52a5d42ec7dfe6d8;p=gcc.git Fix wrong code by arm_final_prescan with fp16 move instructions ChangeLog entry are as follow: *** gcc/ChangeLog *** 2017-12-01 Sudakshina Das * config/arm/vfp.md (*movhf_vfp_fp16): Add conds attribute. *** gcc/testsuite/ChangeLog *** 2017-12-01 Sudakshina Das * gcc.target/arm/armv8_2-fp16-move-2.c: New test. From-SVN: r255301 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 09fd188aecf..360561e929d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-12-01 Sudakshina Das + + * config/arm/vfp.md (*movhf_vfp_fp16): Add conds attribute. + 2017-12-01 Jakub Jelinek * function.h (struct function): Remove cilk_frame_decl, diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md index 075a938d22e..61b6477ad47 100644 --- a/gcc/config/arm/vfp.md +++ b/gcc/config/arm/vfp.md @@ -410,7 +410,10 @@ gcc_unreachable (); } } - [(set_attr "predicable" "yes, yes, no, yes, no, no, no, no, no, no") + [(set_attr "conds" "*, *, unconditional, *, unconditional, unconditional,\ + unconditional, unconditional, unconditional,\ + unconditional") + (set_attr "predicable" "yes, yes, no, yes, no, no, no, no, no, no") (set_attr "predicable_short_it" "no, no, no, yes,\ no, no, no, no,\ no, no") diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ea2f2c7764b..b51bd2a8ad6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2017-12-01 Sudakshina Das + + * gcc.target/arm/armv8_2-fp16-move-2.c: New test. + 2017-12-01 Jakub Jelinek PR c/79153 diff --git a/gcc/testsuite/gcc.target/arm/armv8_2-fp16-move-2.c b/gcc/testsuite/gcc.target/arm/armv8_2-fp16-move-2.c new file mode 100644 index 00000000000..fcb857f29ff --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/armv8_2-fp16-move-2.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_v8_2a_fp16_scalar_ok } */ +/* { dg-options "-O2 -marm" } */ +/* { dg-add-options arm_v8_2a_fp16_scalar } */ + +__fp16 +test_select (__fp16 a, __fp16 b, __fp16 c) +{ + return (a < b) ? b : c; +} +/* { dg-final { scan-assembler "bmi" } } */