diff mbox series

[rs6000] Re-enable vector pair memcpy/memmove expansion

Message ID 20201117180305.2219957-1-acsawdey@linux.ibm.com
State New
Headers show
Series [rs6000] Re-enable vector pair memcpy/memmove expansion | expand

Commit Message

Li, Pan2 via Gcc-patches Nov. 17, 2020, 6:03 p.m. UTC
From: Aaron Sawdey <acsawdey@linux.ibm.com>

After the MMA opaque mode patch goes in, we can re-enable
use of vector pair in the inline expansion of memcpy/memmove.

After bootstrap/regtest, OK for trunk?

Thanks,
    Aaron

gcc/
	* config/rs6000/rs6000.c (rs6000_option_override_internal):
	Enable vector pair memcpy/memmove expansion.
---
 gcc/config/rs6000/rs6000.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Segher Boessenkool Nov. 17, 2020, 11:03 p.m. UTC | #1
On Tue, Nov 17, 2020 at 12:03:05PM -0600, acsawdey@linux.ibm.com wrote:
> From: Aaron Sawdey <acsawdey@linux.ibm.com>
> 
> After the MMA opaque mode patch goes in, we can re-enable
> use of vector pair in the inline expansion of memcpy/memmove.
> 
> After bootstrap/regtest, OK for trunk?

Yes, okay for trunk after the rs6000 "opaque" patch goes in.  Thanks!


Segher
diff mbox series

Patch

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index bb48ed92aef..53f92970414 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4117,11 +4117,10 @@  rs6000_option_override_internal (bool global_init_p)
 
   if (!(rs6000_isa_flags_explicit & OPTION_MASK_BLOCK_OPS_VECTOR_PAIR))
     {
-      /* When the POImode issues of PR96791 are resolved, then we can
-	 once again enable use of vector pair for memcpy/memmove on
-	 P10 if we have TARGET_MMA.  For now we make it disabled by
-	 default for all targets.  */
-      rs6000_isa_flags &= ~OPTION_MASK_BLOCK_OPS_VECTOR_PAIR;
+      if (TARGET_MMA && TARGET_EFFICIENT_UNALIGNED_VSX)
+	rs6000_isa_flags |= OPTION_MASK_BLOCK_OPS_VECTOR_PAIR;
+      else
+	rs6000_isa_flags &= ~OPTION_MASK_BLOCK_OPS_VECTOR_PAIR;
     }
 
   /* Use long double size to select the appropriate long double.  We use