public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Peter Bergner <bergner@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-2381] rs6000: Use NO_EXPR to cast to MMA pointer types
Date: Fri,  2 Sep 2022 17:01:38 +0000 (GMT)	[thread overview]
Message-ID: <20220902170138.1EACD3858D1E@sourceware.org> (raw)

https://gcc.gnu.org/g:65c12e3894cac120c721c5d3fe94daa625ac8194

commit r13-2381-g65c12e3894cac120c721c5d3fe94daa625ac8194
Author: Peter Bergner <bergner@linux.ibm.com>
Date:   Fri Sep 2 11:59:56 2022 -0500

    rs6000: Use NO_EXPR to cast to MMA pointer types
    
    When we cast pointers to our opaque MMA pointers, use NOP_EXPR rather
    than VIEW_CONVERT_EXPR.
    
    2022-09-02  Peter Bergner  <bergner@linux.ibm.com>
    
    gcc/
            * config/rs6000/rs6000-builtin.cc (rs6000_gimple_fold_mma_builtin): Use
            NOP_EXPR for MMA pointer casting.

Diff:
---
 gcc/config/rs6000/rs6000-builtin.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-builtin.cc b/gcc/config/rs6000/rs6000-builtin.cc
index 65b950d4458..6dfb0db43d6 100644
--- a/gcc/config/rs6000/rs6000-builtin.cc
+++ b/gcc/config/rs6000/rs6000-builtin.cc
@@ -1098,7 +1098,7 @@ rs6000_gimple_fold_mma_builtin (gimple_stmt_iterator *gsi,
 	  || (fncode == RS6000_BIF_DISASSEMBLE_PAIR_V
 	      && TREE_TYPE (TREE_TYPE (dst_ptr)) == vector_pair_type_node))
 	{
-	  tree dst = build_simple_mem_ref (build1 (VIEW_CONVERT_EXPR,
+	  tree dst = build_simple_mem_ref (build1 (NOP_EXPR,
 						   src_type, dst_ptr));
 	  gimplify_assign (dst, src, &new_seq);
 	  pop_gimplify_context (NULL);
@@ -1122,7 +1122,7 @@ rs6000_gimple_fold_mma_builtin (gimple_stmt_iterator *gsi,
 	= rs6000_builtin_decls[rs6000_builtin_info[fncode].assoc_bif];
       tree dst_type = build_pointer_type_for_mode (unsigned_V16QI_type_node,
 						   ptr_mode, true);
-      tree dst_base = build1 (VIEW_CONVERT_EXPR, dst_type, dst_ptr);
+      tree dst_base = build1 (NOP_EXPR, dst_type, dst_ptr);
       for (unsigned i = 0; i < nvec; i++)
 	{
 	  unsigned index = WORDS_BIG_ENDIAN ? i : nvec - 1 - i;
@@ -1148,7 +1148,7 @@ rs6000_gimple_fold_mma_builtin (gimple_stmt_iterator *gsi,
       tree ptr = gimple_call_arg (stmt, 1);
       tree lhs = gimple_call_lhs (stmt);
       if (TREE_TYPE (TREE_TYPE (ptr)) != vector_pair_type_node)
-	ptr = build1 (VIEW_CONVERT_EXPR,
+	ptr = build1 (NOP_EXPR,
 		      build_pointer_type (vector_pair_type_node), ptr);
       tree mem = build_simple_mem_ref (build2 (POINTER_PLUS_EXPR,
 					       TREE_TYPE (ptr), ptr, offset));
@@ -1165,7 +1165,7 @@ rs6000_gimple_fold_mma_builtin (gimple_stmt_iterator *gsi,
       tree offset = gimple_call_arg (stmt, 1);
       tree ptr = gimple_call_arg (stmt, 2);
       if (TREE_TYPE (TREE_TYPE (ptr)) != vector_pair_type_node)
-	ptr = build1 (VIEW_CONVERT_EXPR,
+	ptr = build1 (NOP_EXPR,
 		      build_pointer_type (vector_pair_type_node), ptr);
       tree mem = build_simple_mem_ref (build2 (POINTER_PLUS_EXPR,
 					       TREE_TYPE (ptr), ptr, offset));

                 reply	other threads:[~2022-09-02 17:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220902170138.1EACD3858D1E@sourceware.org \
    --to=bergner@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).