[ARM] PR 67439: Allow matching of *arm32_movhf when -mrestrict-it is on
authorktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Sep 2015 10:43:43 +0000 (10:43 +0000)
committerktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227630 138bc75d-0d04-0410-961f-82ee72b054a4

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

index d5254fa..42802bf 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 775ca25..878576a 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 e78d4c7..2272a67 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;
+}