When we cast pointers to our opaque MMA pointers, use NOP_EXPR rather than VIEW_CONVERT_EXPR.
This passed bootstrap and regtesting on powerpc64le-linux with no regressions. Ok for trunk? I think this is just a cleanup and not a correctness thing, so I'm assuming a backport isn't needed? Or maybe we do to make other potential backports easier? I'm fine either way. Peter gcc/ * config/rs6000/rs6000-builtin.cc (rs6000_gimple_fold_mma_builtin): Use NOP_EXPR for MMA pointer casting. diff --git a/gcc/config/rs6000/rs6000-builtin.cc b/gcc/config/rs6000/rs6000-builtin.cc index e6948b9abb7..0d8be996f4e 100644 --- a/gcc/config/rs6000/rs6000-builtin.cc +++ b/gcc/config/rs6000/rs6000-builtin.cc @@ -1101,7 +1101,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); @@ -1125,7 +1125,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; @@ -1151,7 +1151,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)); @@ -1168,7 +1168,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));