public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Michael Meissner <meissner@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/meissner/heads/dmf004)] Revert patch.
Date: Thu, 17 Nov 2022 21:54:25 +0000 (GMT)	[thread overview]
Message-ID: <20221117215425.1490B384F6D1@sourceware.org> (raw)

https://gcc.gnu.org/g:82d4df0e7d2b7c125084be757aa233b599bd761b

commit 82d4df0e7d2b7c125084be757aa233b599bd761b
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Mon Nov 14 20:52:10 2022 -0500

    Revert patch.
    
    2022-11-14   Michael Meissner  <meissner@linux.ibm.com>
    
    gcc/
    
            Revert patch.
            * config/rs6000/rs6000-string.cc (expand_block_move): Add support for
            using lxvl and stxvl to move up to 16 bytes inline without calling
            memcpy.
            * config/rs6000/rs6000.md (cpymem<mode>): Expand cpymemsi to also
            provide cpymemdi to handle DImode sizes as well as SImode sizes.
            (movmem<mode>): Expand movmemsi to also provide movmemdi to handle
            DImode sizes as well as SImode sizes.

Diff:
---
 gcc/config/rs6000/rs6000-string.cc | 49 ++------------------------------------
 gcc/config/rs6000/rs6000.md        | 12 +++++-----
 2 files changed, 8 insertions(+), 53 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-string.cc b/gcc/config/rs6000/rs6000-string.cc
index 596fbc634f4..cd8ee8c2f7e 100644
--- a/gcc/config/rs6000/rs6000-string.cc
+++ b/gcc/config/rs6000/rs6000-string.cc
@@ -2760,54 +2760,9 @@ expand_block_move (rtx operands[], bool might_overlap)
   rtx stores[MAX_MOVE_REG];
   int num_reg = 0;
 
-  /* If this is not a fixed size move, see if we can use load/store vector with
-     length to handle multiple bytes. Don't do the optimization if -Os.
-     Otherwise, just call memcpy.  */
+  /* If this is not a fixed size move, just call memcpy */
   if (! constp)
-    {
-      if (TARGET_BLOCK_OPS_UNALIGNED_VSX && TARGET_P9_VECTOR && TARGET_64BIT
-	  && !optimize_size)
-	{
-	  rtx join_label = gen_label_rtx ();
-	  rtx inline_label = gen_label_rtx ();
-	  rtx dest_addr = copy_addr_to_reg (XEXP (orig_dest, 0));
-	  rtx src_addr = copy_addr_to_reg (XEXP (orig_src, 0));
-
-	  /* Call memcpy if the size is too large.  */
-	  bytes_rtx = force_reg (Pmode, bytes_rtx);
-	  rtx cr = gen_reg_rtx (CCUNSmode);
-	  rtx max_size = GEN_INT (16);
-	  emit_insn (gen_rtx_SET (cr,
-				  gen_rtx_COMPARE (CCUNSmode, bytes_rtx,
-						   max_size)));
-				  
-	  do_ifelse (CCUNSmode, LEU, NULL_RTX, NULL_RTX, cr,
-		     inline_label, profile_probability::likely ());
-
-	  tree fun = builtin_decl_explicit (BUILT_IN_MEMCPY);
-	  emit_library_call_value (XEXP (DECL_RTL (fun), 0),
-				   NULL_RTX, LCT_NORMAL, Pmode,
-				   dest_addr, Pmode,
-				   src_addr, Pmode,
-				   bytes_rtx, Pmode);
-
-	  rtx join_ref = gen_rtx_LABEL_REF (VOIDmode, join_label);
-	  emit_jump_insn (gen_rtx_SET (pc_rtx, join_ref));
-	  emit_barrier ();
-
-	  emit_label (inline_label);
-
-	  /* Move the final 0..16 bytes.  */
-	  rtx vreg = gen_reg_rtx (V16QImode);
-	  emit_insn (gen_lxvl (vreg, src_addr, bytes_rtx));
-	  emit_insn (gen_stxvl (vreg, dest_addr, bytes_rtx));
-
-	  emit_label (join_label);
-	  return 1;
-	}
-
-      return 0;
-    }
+    return 0;
 
   /* This must be a fixed size alignment */
   gcc_assert (CONST_INT_P (align_rtx));
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 12bae0d32a7..e9dfb138603 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -9880,11 +9880,11 @@
 ;; Argument 2 is the length
 ;; Argument 3 is the alignment
 
-(define_expand "cpymem<mode>"
+(define_expand "cpymemsi"
   [(parallel [(set (match_operand:BLK 0 "")
 		   (match_operand:BLK 1 ""))
-	      (use (match_operand:GPR 2 ""))
-	      (use (match_operand:GPR 3 ""))])]
+	      (use (match_operand:SI 2 ""))
+	      (use (match_operand:SI 3 ""))])]
   ""
 {
   if (expand_block_move (operands, false))
@@ -9899,11 +9899,11 @@
 ;; Argument 2 is the length
 ;; Argument 3 is the alignment
 
-(define_expand "movmem<mode>"
+(define_expand "movmemsi"
   [(parallel [(set (match_operand:BLK 0 "")
 		   (match_operand:BLK 1 ""))
-	      (use (match_operand:GPR 2 ""))
-	      (use (match_operand:GPR 3 ""))])]
+	      (use (match_operand:SI 2 ""))
+	      (use (match_operand:SI 3 ""))])]
   ""
 {
   if (expand_block_move (operands, true))

             reply	other threads:[~2022-11-17 21:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 21:54 Michael Meissner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-11-17 22:08 Michael Meissner
2022-11-17 21:54 Michael Meissner
2022-11-17 21:53 Michael Meissner
2022-11-15 18:43 Michael Meissner
2022-11-15  1:52 Michael Meissner
2022-11-12  0:42 Michael Meissner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221117215425.1490B384F6D1@sourceware.org \
    --to=meissner@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).