public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, ARM][9/n] Split scc patterns using movsicc
@ 2013-04-12 12:58 Greta Yorsh
  2013-04-12 14:19 ` Richard Earnshaw
  0 siblings, 1 reply; 2+ messages in thread
From: Greta Yorsh @ 2013-04-12 12:58 UTC (permalink / raw)
  To: GCC Patches; +Cc: Richard Earnshaw, Ramana Radhakrishnan, paul, nickc

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

This patch converts define_insn into define_insn_and_split for simple scc
patterns and emits RTL insns that match movsicc pattern.
 
Tested as part of the series for splitting arm.md patterns that output
multiple asm instructions. No regression on qemu with arm-none-eabi and
bootstrap successful.

Ok for trunk?

Thanks,
Greta

gcc/

2013-02-19  Greta Yorsh  <Greta.Yorsh@arm.com>

        * config/arm/arm.md (mov_scc,mov_negscc,mov_notscc): Convert
        define_insn into define_insn_and_split and emit movsicc
        patterns.

[-- Attachment #2: 9-split-scc-simple.v2.patch.txt --]
[-- Type: text/plain, Size: 2294 bytes --]

commit f678aaf7cdab589f34b1bf92b3f9fcabd7f29593
Author: Greta <Greta.Yorsh@arm.com>
Date:   Thu Apr 11 10:54:27 2013 +0100

    9

diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 073ee6b..4284535 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -8259,36 +8259,56 @@
    operands[3] = const0_rtx;"
 )
 
-(define_insn "*mov_scc"
+(define_insn_and_split "*mov_scc"
   [(set (match_operand:SI 0 "s_register_operand" "=r")
 	(match_operator:SI 1 "arm_comparison_operator"
 	 [(match_operand 2 "cc_register" "") (const_int 0)]))]
   "TARGET_ARM"
-  "mov%D1\\t%0, #0\;mov%d1\\t%0, #1"
+  "#"   ; "mov%D1\\t%0, #0\;mov%d1\\t%0, #1"
+  "TARGET_ARM"
+  [(set (match_dup 0)
+        (if_then_else:SI (match_dup 1)
+                         (const_int 1)
+                         (const_int 0)))]
+  ""
   [(set_attr "conds" "use")
-   (set_attr "insn" "mov")
    (set_attr "length" "8")]
 )
 
-(define_insn "*mov_negscc"
+(define_insn_and_split "*mov_negscc"
   [(set (match_operand:SI 0 "s_register_operand" "=r")
 	(neg:SI (match_operator:SI 1 "arm_comparison_operator"
 		 [(match_operand 2 "cc_register" "") (const_int 0)])))]
   "TARGET_ARM"
-  "mov%D1\\t%0, #0\;mvn%d1\\t%0, #0"
+  "#"   ; "mov%D1\\t%0, #0\;mvn%d1\\t%0, #0"
+  "TARGET_ARM"
+  [(set (match_dup 0)
+        (if_then_else:SI (match_dup 1)
+                         (match_dup 3)
+                         (const_int 0)))]
+  {
+    operands[3] = GEN_INT (~0);
+  }
   [(set_attr "conds" "use")
-   (set_attr "insn" "mov")
    (set_attr "length" "8")]
 )
 
-(define_insn "*mov_notscc"
+(define_insn_and_split "*mov_notscc"
   [(set (match_operand:SI 0 "s_register_operand" "=r")
 	(not:SI (match_operator:SI 1 "arm_comparison_operator"
 		 [(match_operand 2 "cc_register" "") (const_int 0)])))]
   "TARGET_ARM"
-  "mvn%D1\\t%0, #0\;mvn%d1\\t%0, #1"
+  "#"   ; "mvn%D1\\t%0, #0\;mvn%d1\\t%0, #1"
+  "TARGET_ARM"
+  [(set (match_dup 0)
+        (if_then_else:SI (match_dup 1)
+                         (match_dup 3)
+                         (match_dup 4)))]
+  {
+    operands[3] = GEN_INT (~1);
+    operands[4] = GEN_INT (~0);
+  }
   [(set_attr "conds" "use")
-   (set_attr "insn" "mov")
    (set_attr "length" "8")]
 )
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH, ARM][9/n] Split scc patterns using movsicc
  2013-04-12 12:58 [PATCH, ARM][9/n] Split scc patterns using movsicc Greta Yorsh
@ 2013-04-12 14:19 ` Richard Earnshaw
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw @ 2013-04-12 14:19 UTC (permalink / raw)
  To: Greta Yorsh; +Cc: GCC Patches, Ramana Radhakrishnan, paul, nickc

On 12/04/13 12:03, Greta Yorsh wrote:
> This patch converts define_insn into define_insn_and_split for simple scc
> patterns and emits RTL insns that match movsicc pattern.
>
> Tested as part of the series for splitting arm.md patterns that output
> multiple asm instructions. No regression on qemu with arm-none-eabi and
> bootstrap successful.
>
> Ok for trunk?
>
> Thanks,
> Greta
>
> gcc/
>
> 2013-02-19  Greta Yorsh  <Greta.Yorsh@arm.com>
>
>          * config/arm/arm.md (mov_scc,mov_negscc,mov_notscc): Convert
>          define_insn into define_insn_and_split and emit movsicc
>          patterns.
>

OK.

R.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-12 13:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-12 12:58 [PATCH, ARM][9/n] Split scc patterns using movsicc Greta Yorsh
2013-04-12 14:19 ` Richard Earnshaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).