From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id E15403858C66; Thu, 16 Nov 2023 17:46:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E15403858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700156810; bh=79vLM6T2proc1DG/ctjZaNzOv7l6zdPvYxs9elwtRy8=; h=From:To:Subject:Date:From; b=qHqO3KweUNvkl0HLkfuxcmmhcpW7Fa1uEuS8OodU+DshweLlKpsH8ltJW69c3Nkr4 923QatpJ0E0z65XxoG9q8o81dzhYAOxooRETj46/rtlDXzRJvoSzp6HqP6mj/LrgqC TaTbwt74Ad07xLke+tUv6+6r0EQicLRDggEBb4kE= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Meissner To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work144-vsize)] Rework vector pair init, stub vector pair set and extract. X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work144-vsize X-Git-Oldrev: dc6dc3af91984e68fa4425a305a5be74f2180593 X-Git-Newrev: a75492f1cf3b1f568414da4fac39b28b9623057f Message-Id: <20231116174650.E15403858C66@sourceware.org> Date: Thu, 16 Nov 2023 17:46:50 +0000 (GMT) List-Id: https://gcc.gnu.org/g:a75492f1cf3b1f568414da4fac39b28b9623057f commit a75492f1cf3b1f568414da4fac39b28b9623057f Author: Michael Meissner Date: Thu Nov 16 12:46:29 2023 -0500 Rework vector pair init, stub vector pair set and extract. 2023-11-16 Michael Meissner gcc/ * config/rs6000/rs6000-protos.h (rs6000_expand_vector_pair_init): New declaration. (rs6000_expand_vector_pair_set): Likewise. (rs6000_expand_vector_pair_extract): Likewise. * config/rs6000/rs6000.cc (rs6000_expand_vector_init): Remove vector pair code. (rs6000_expand_vector_pair_init): New function. (rs6000_expand_vector_pair_set): New stub function. (rs6000_expand_vector_extract): Remove vector pair support. (rs6000_expand_vector_pair_extract): New stub function. * config/rs6000/vector-pair.md (vpair_element_l): Return correct types. (vec_init): New insn. (vec_set): Likewise. (vec_extract" @@ -117,6 +117,36 @@ (set_attr "length" "*,8,*,8,8,8") (set_attr "isa" "lxvp,*,stxvp,*,*,*")]) +;; Vector initialization, set, extract +(define_expand "vec_init" + [(match_operand:VPAIR 0 "vlogical_operand") + (match_operand:VPAIR 1 "")] + "TARGET_MMA && TARGET_VECTOR_SIZE_32" +{ + rs6000_expand_vector_pair_init (operands[0], operands[1]); + DONE; +}) + +(define_expand "vec_set" + [(match_operand:VPAIR 0 "vlogical_operand") + (match_operand: 1 "register_operand") + (match_operand 2 "vec_set_index_operand")] + "TARGET_MMA && TARGET_VECTOR_SIZE_32" +{ + rs6000_expand_vector_pair_set (operands[0], operands[1], operands[2]); + DONE; +}) + +(define_expand "vec_extract" + [(match_operand: 0 "register_operand") + (match_operand:VPAIR 1 "vlogical_operand") + (match_operand 2 "const_int_operand")] + "TARGET_MMA && TARGET_VECTOR_SIZE_32" +{ + rs6000_expand_vector_pair_extract (operands[0], operands[1], operands[2]); + DONE; +}) + ;; Assemble a vector pair from two vectors. Unlike ;; __builtin_mma_assemble_pair, this function produces a vector pair output ;; directly and it takes all of the vector types. diff --git a/gcc/config/rs6000/vector.md b/gcc/config/rs6000/vector.md index 94b5349eac7..f4fc620b653 100644 --- a/gcc/config/rs6000/vector.md +++ b/gcc/config/rs6000/vector.md @@ -62,14 +62,7 @@ (define_mode_iterator VEC_C [V16QI V8HI V4SI V2DI V4SF V2DF V1TI]) ;; Vector init/extract modes -(define_mode_iterator VEC_E [V16QI - V8HI - V4SI - V2DI - V4SF - V2DF - (V8SF "TARGET_MMA && TARGET_VECTOR_SIZE_32") - (V4DF "TARGET_MMA && TARGET_VECTOR_SIZE_32")]) +(define_mode_iterator VEC_E [V16QI V8HI V4SI V2DI V4SF V2DF]) ;; Vector modes for 64-bit base types (define_mode_iterator VEC_64 [V2DI V2DF]) @@ -82,9 +75,7 @@ (V8HI "HI") (V4SI "SI") (V2DI "DI") - (V8SF "SF") (V4SF "SF") - (V4DF "DF") (V2DF "DF") (V1TI "TI") (TI "TI")]) @@ -94,9 +85,7 @@ (V8HI "hi") (V4SI "si") (V2DI "di") - (V8SF "sf") (V4SF "sf") - (V4DF "df") (V2DF "df") (V1TI "ti") (TI "ti")])