From: Kyrylo Tkachov Date: Thu, 10 Sep 2015 10:43:43 +0000 (+0000) Subject: [ARM] PR 67439: Allow matching of *arm32_movhf when -mrestrict-it is on X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b9828886e093b6f41b3abf8fd999e6817e2292c;p=gcc.git [ARM] PR 67439: Allow matching of *arm32_movhf when -mrestrict-it is on PR target/67439 * config/arm/arm.md (*arm32_movhf): Remove !arm_restrict_it from predicate. Set predicable_short_it attr to "no". * gcc.target/arm/pr67439_1.c: New test. From-SVN: r227630 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d5254fa95ea..42802bfc1c2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-09-10 Kyrylo Tkachov + + PR target/67439 + * config/arm/arm.md (*arm32_movhf): Remove !arm_restrict_it from + predicate. Set predicable_short_it attr to "no". + 2015-09-10 Jiong Wang PR rtl-optimization/67421 diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 775ca25d816..878576a3cd5 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -6620,7 +6620,7 @@ (define_insn "*arm32_movhf" [(set (match_operand:HF 0 "nonimmediate_operand" "=r,m,r,r") (match_operand:HF 1 "general_operand" " m,r,r,F"))] - "TARGET_32BIT && !(TARGET_HARD_FLOAT && TARGET_FP16) && !arm_restrict_it + "TARGET_32BIT && !(TARGET_HARD_FLOAT && TARGET_FP16) && ( s_register_operand (operands[0], HFmode) || s_register_operand (operands[1], HFmode))" "* @@ -6658,7 +6658,8 @@ [(set_attr "conds" "unconditional") (set_attr "type" "load1,store1,mov_reg,multiple") (set_attr "length" "4,4,4,8") - (set_attr "predicable" "yes")] + (set_attr "predicable" "yes") + (set_attr "predicable_short_it" "no")] ) (define_expand "movsf" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e78d4c7bfeb..2272a674c1b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-09-10 Kyrylo Tkachov + + PR target/67439 + * gcc.target/arm/pr67439_1.c: New test. + 2015-09-10 Jiong Wang * gcc.target/aarch64/pic-small.c (dg-skip-if): Skip tiny and large code diff --git a/gcc/testsuite/gcc.target/arm/pr67439_1.c b/gcc/testsuite/gcc.target/arm/pr67439_1.c new file mode 100644 index 00000000000..f7a6128758a --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr67439_1.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_thumb2_ok } */ +/* { dg-options "-O1 -mfp16-format=ieee -march=armv7-a -mfpu=neon -mthumb -mrestrict-it" } */ + +__fp16 h0 = -1.0; + +void +f (__fp16 *p) +{ + h0 = 1.0; +}