public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][AArch64] Fix FAIL: gcc.target/aarch64/cmn.c scan-assembler cmn\tw[0-9]
@ 2013-07-29 14:06 Kyrylo Tkachov
  2013-07-30 10:19 ` Richard Earnshaw
  0 siblings, 1 reply; 4+ messages in thread
From: Kyrylo Tkachov @ 2013-07-29 14:06 UTC (permalink / raw)
  To: gcc-patches; +Cc: Marcus Shawcroft

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

Hi all,

Now that combine emits the canonical form for (eq (neg x) (y)) instead of (eq
(x) (neg y)), this patch fixes up the corresponding pattern in aarch64 to
match that. This enables combine to properly generate the cmn instruction
where appropriate.

Tested aarch64-none-elf on model.

Ok for trunk?

Thanks,
Kyrill

2013-07-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/aarch64/aarch64.md (compare_neg<mode>): Match canonical RTL
form.

[-- Attachment #2: aarch64-cmn.patch --]
[-- Type: application/octet-stream, Size: 555 bytes --]

diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 5d64228..c2faf6a 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -1459,8 +1459,8 @@
 (define_insn "*compare_neg<mode>"
   [(set (reg:CC CC_REGNUM)
 	(compare:CC
-	 (match_operand:GPI 0 "register_operand" "r")
-	 (neg:GPI (match_operand:GPI 1 "register_operand" "r"))))]
+	 (neg:GPI (match_operand:GPI 0 "register_operand" "r"))
+	 (match_operand:GPI 1 "register_operand" "r")))]
   ""
   "cmn\\t%<w>0, %<w>1"
   [(set_attr "v8type" "alus")

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

end of thread, other threads:[~2013-09-09 13:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-29 14:06 [PATCH][AArch64] Fix FAIL: gcc.target/aarch64/cmn.c scan-assembler cmn\tw[0-9] Kyrylo Tkachov
2013-07-30 10:19 ` Richard Earnshaw
2013-09-09 12:53   ` Kyrylo Tkachov
2013-09-09 14:04     ` 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).