From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1725) id 90A76385842A; Mon, 30 Aug 2021 19:58:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 90A76385842A MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: William Schmidt To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-3228] rs6000: Add sanity to V2DI_type_node definitions X-Act-Checkin: gcc X-Git-Author: Bill Schmidt X-Git-Refname: refs/heads/master X-Git-Oldrev: b5bc39317bf4da1d51cb6eccf8afcacc90514602 X-Git-Newrev: a5027ea2ad22c82adc68e02dae8be7f69131503a Message-Id: <20210830195843.90A76385842A@sourceware.org> Date: Mon, 30 Aug 2021 19:58:43 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 19:58:43 -0000 https://gcc.gnu.org/g:a5027ea2ad22c82adc68e02dae8be7f69131503a commit r12-3228-ga5027ea2ad22c82adc68e02dae8be7f69131503a Author: Bill Schmidt Date: Mon Aug 30 14:55:11 2021 -0500 rs6000: Add sanity to V2DI_type_node definitions 2021-08-30 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_init_builtins): Change initialization of V2DI_type_node and unsigned_V2DI_type_node. Diff: --- gcc/config/rs6000/rs6000-call.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c index 87f97098ea4..df405e1b8c7 100644 --- a/gcc/config/rs6000/rs6000-call.c +++ b/gcc/config/rs6000/rs6000-call.c @@ -13297,15 +13297,23 @@ rs6000_init_builtins (void) tree ftype; tree t; machine_mode mode; + const char *str; if (TARGET_DEBUG_BUILTIN) fprintf (stderr, "rs6000_init_builtins%s%s\n", (TARGET_ALTIVEC) ? ", altivec" : "", (TARGET_VSX) ? ", vsx" : ""); - V2DI_type_node = rs6000_vector_type (TARGET_POWERPC64 ? "__vector long" - : "__vector long long", - long_long_integer_type_node, 2); + if (new_builtins_are_live) + V2DI_type_node = rs6000_vector_type ("__vector long long", + long_long_integer_type_node, 2); + else + { + str = TARGET_POWERPC64 ? "__vector long" : "__vector long long"; + V2DI_type_node = rs6000_vector_type (str, + long_long_integer_type_node, + 2); + } ptr_V2DI_type_node = build_pointer_type (build_qualified_type (V2DI_type_node, TYPE_QUAL_CONST)); @@ -13356,10 +13364,19 @@ rs6000_init_builtins (void) = build_pointer_type (build_qualified_type (unsigned_V4SI_type_node, TYPE_QUAL_CONST)); - unsigned_V2DI_type_node = rs6000_vector_type (TARGET_POWERPC64 - ? "__vector unsigned long" - : "__vector unsigned long long", - long_long_unsigned_type_node, 2); + if (new_builtins_are_live) + unsigned_V2DI_type_node + = rs6000_vector_type ("__vector unsigned long long", + long_long_unsigned_type_node, 2); + else + { + str = TARGET_POWERPC64 + ? "__vector unsigned long" + : "__vector unsigned long long"; + unsigned_V2DI_type_node + = rs6000_vector_type (str, long_long_unsigned_type_node, 2); + } + ptr_unsigned_V2DI_type_node = build_pointer_type (build_qualified_type (unsigned_V2DI_type_node, TYPE_QUAL_CONST));