[ARM] PR 67439: Allow matching of *arm32_movhf when -mrestrict-it is on
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Thu, 10 Sep 2015 10:43:43 +0000 (10:43 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Thu, 10 Sep 2015 10:43:43 +0000 (10:43 +0000)
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

gcc/ChangeLog
gcc/config/arm/arm.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/pr67439_1.c [new file with mode: 0644]

index d5254fa95ea4d8053c4a0c5bd653a16112f14048..42802bfc1c2a3a977e3cfee5ec87daaeb9e8d1f8 100644 (file)
@@ -1,3 +1,9 @@
+2015-09-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       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  <jiong.wang@arm.com>
 
        PR rtl-optimization/67421
index 775ca25d81671885a12529dd070e2d1af0acab2b..878576a3cd57e47ba37f01d3e4f62014e4427b92 100644 (file)
 (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))"
   "*
   [(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"
index e78d4c7bfeb90d5b190597e4bf90aca97ab81a5c..2272a674c1b7376931f66fcaa7f8c1da96bdf121 100644 (file)
@@ -1,3 +1,8 @@
+2015-09-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       PR target/67439
+       * gcc.target/arm/pr67439_1.c: New test.
+
 2015-09-10  Jiong Wang  <jiong.wang@arm.com>
 
        * 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 (file)
index 0000000..f7a6128
--- /dev/null
@@ -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;
+}