public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] rs6000: Don't write "nor" as (not (ior () ())) (PR80618)
@ 2017-05-31 21:21 Segher Boessenkool
  0 siblings, 0 replies; only message in thread
From: Segher Boessenkool @ 2017-05-31 21:21 UTC (permalink / raw)
  To: gcc-patches; +Cc: dje.gcc, Segher Boessenkool

The canonical RTL for "nor" is (and (not ()) (not ())), and that is
indeed what we use in boolccv2df3_internal1.  So, the splitter for
*vector_uneq<mode> should use that form, not (not (ior () ())), which
does not match any pattern.

Tested on powerpc64-linux {-m32,-m64}, and tested the pr50310-2.c
testcase on powerpc64le-linux (it failed before, works after).
Committing to trunk.


Segher


2017-05-31  Segher Boessenkool  <segher@kernel.crashing.org>

	PR target/80618
	* config/rs6000/rs6000.md (*vector_uneq<mode>): Write the nor in the
	splitter result in the canonical way.

---
 gcc/config/rs6000/vector.md | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gcc/config/rs6000/vector.md b/gcc/config/rs6000/vector.md
index c35875d..a3d53e7 100644
--- a/gcc/config/rs6000/vector.md
+++ b/gcc/config/rs6000/vector.md
@@ -582,13 +582,12 @@ (define_insn_and_split "*vector_uneq<mode>"
 	(gt:VEC_F (match_dup 2)
 		  (match_dup 1)))
    (set (match_dup 0)
-	(not:VEC_F (ior:VEC_F (match_dup 3)
-			      (match_dup 4))))]
-  "
+	(and:VEC_F (not:VEC_F (match_dup 3))
+		   (not:VEC_F (match_dup 4))))]
 {
   operands[3] = gen_reg_rtx (<MODE>mode);
   operands[4] = gen_reg_rtx (<MODE>mode);
-}")
+})
 
 (define_insn_and_split "*vector_ltgt<mode>"
   [(set (match_operand:VEC_F 0 "vfloat_operand" "")
-- 
1.9.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-31 20:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31 21:21 [PATCH] rs6000: Don't write "nor" as (not (ior () ())) (PR80618) Segher Boessenkool

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).