From e9c07226b8e3374af456a27d2c41ba6c7774c8fa Mon Sep 17 00:00:00 2001 From: Sudakshina Das Date: Mon, 11 Dec 2017 17:07:33 +0000 Subject: [PATCH] Backported 'Fix wrong code by arm_final_prescan with fp16 move instructions' ChangeLog entry are as follow: *** gcc/ChangeLog *** 2017-12-11 Sudakshina Das Backported from trunk 2017-12-01 Sudakshina Das * config/arm/vfp.md (*movhf_vfp_fp16): Add conds attribute. *** gcc/testsuite/ChangeLog *** 2017-12-11 Sudakshina Das Backported from trunk 2017-12-01 Sudakshina Das * gcc.target/arm/armv8_2-fp16-move-2.c: New test. From-SVN: r255541 --- gcc/ChangeLog | 7 +++++++ gcc/config/arm/vfp.md | 5 ++++- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.target/arm/armv8_2-fp16-move-2.c | 11 +++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/arm/armv8_2-fp16-move-2.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e80f460dbb4..4d504110012 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-12-11 Sudakshina Das + + Backported from trunk + 2017-12-01 Sudakshina Das + + * config/arm/vfp.md (*movhf_vfp_fp16): Add conds attribute. + 2017-12-07 Kelvin Nilsen Backport from trunk diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md index d8f77e2ffe4..9f06c3da952 100644 --- a/gcc/config/arm/vfp.md +++ b/gcc/config/arm/vfp.md @@ -456,7 +456,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 ccbd122c2aa..05f9d3110d0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2017-12-11 Sudakshina Das + + Backported from trunk + 2017-12-01 Sudakshina Das + + * gcc.target/arm/armv8_2-fp16-move-2.c: New test. + 2017-12-07 Kelvin Nilsen Backport from trunk 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..ac7d4e3f2a9 --- /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 -mfpu=fp-armv8 -march=armv8.2-a+fp16 -marm -mfloat-abi=hard" } */ +/* { 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 "bpl" } } */