From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by sourceware.org (Postfix) with ESMTPS id CE7063858020 for ; Thu, 19 Nov 2020 00:42:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CE7063858020 Received: by mail-wm1-x343.google.com with SMTP id h21so5098433wmb.2 for ; Wed, 18 Nov 2020 16:42:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tgugatBixID5M2v9eQtME65AvSvKDiNp71JioURLTmo=; b=e1gfnSBs3q8KSFutHlNFKH6xUBRjClI+3avjjMO73gAjTI0SAgI0npI5QV3SqJZ/pN ixqkLJ+mXfpQe1D+Alh6JhzLs8D45dhT/ablplvmsdMZ+P2g1N5NIea/sGtuNOmh4dsm OrqQvViJd8/7AA7LT7weH0PsyJdNE+Aban6VwiLX1YgJu2U4qn+57lcwIJTShFO5d8jI u9XB8V0J94WGkoNzR3cpkwAH2CbMWI2XRiUDUgwEo9/sRyVGRtieXn0BLLlqb/xpv9Ej yOVcBZmA4rxrNb5rSwYpHEphoewQeUt5zWYeryTk8WJKuwqOLPh8d+GNhl9knVesFRhQ kqwQ== X-Gm-Message-State: AOAM530wOIpAizUNYROx0yioaECGlRqysUZuSklH0lHJQtTtwt2t9A1b MMhM1Xu8LDubo+j4XLHffGmXK23CbOtejSOiB48= X-Google-Smtp-Source: ABdhPJz3gbkPZquW5tJzdpLPRrtYttLFX+CN/bg1gdygon24DGIJ5+CrI5la9Z3uo890utoSbXw7wR8CFhoIAcXbnGE= X-Received: by 2002:a1c:9c0e:: with SMTP id f14mr1683550wme.22.1605746563933; Wed, 18 Nov 2020 16:42:43 -0800 (PST) MIME-Version: 1.0 References: <0801554741c7f11d26ded3a2243462cb2790c215.camel@us.ibm.com> In-Reply-To: From: David Edelsohn Date: Wed, 18 Nov 2020 19:42:32 -0500 Message-ID: Subject: Re: [PATCH] rs6000, vector integer multiply/divide/modulo instructions To: Carl Love Cc: GCC Patches , Will Schmidt , Segher Boessenkool , Bill Schmidt , Peter Bergner Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2020 00:42:46 -0000 On Wed, Nov 4, 2020 at 11:44 AM Carl Love wrote: > > David: > > I have reworked the patch moving the new vector instruction patterns to > vsx.md. Also, cleaned up the vector division instructions. The > div3 pattern definitions are the only ones that should be > defined. > > I have retested the patch on: > > powerpc64le-unknown-linux-gnu (Power 9 LE) > > with no regressions. Additionally the new test case was compiled and > executed by hand on Mambo to verify the test case passes. > > Please let me know if this patch is acceptable for mainline. Thanks. > > Carl Love > > -------------------------------------------------------------- > > 2020-11-02 Carl Love > > gcc/ > * config/rs6000/altivec.h (vec_mulh, vec_div, vec_dive, vec_mod): New > defines. > * config/rs6000/altivec.md (VIlong): Move define to file vsx.md. > * config/rs6000/rs6000-builtin.def (VDIVES_V4SI, VDIVES_V2DI, > VDIVEU_V4SI, VDIVEU_V2DI, VDIVS_V4SI, VDIVS_V2DI, VDIVU_V4SI, > VDIVU_V2DI, VMODS_V2DI, VMODS_V4SI, VMODU_V2DI, VMODU_V4SI, > VMULHS_V2DI, VMULHS_V4SI, VMULHU_V2DI, VMULHU_V4SI, VMULLD_V2DI): > Add builtin define. > (VMUL, VMULH, VDIVE, VMOD): Add new BU_P10_OVERLOAD_2 definitions. > * config/rs6000/rs6000-call.c (VSX_BUILTIN_VEC_DIV, > P10_BUILTIN_VEC_VDIVE, P10_BUILTIN_VEC_VMOD, P10_BUILTIN_VEC_VMULH): > New overloaded definitions. > (builtin_function_type) [P10V_BUILTIN_VDIVEU_V4SI, > P10V_BUILTIN_VDIVEU_V2DI, P10V_BUILTIN_VDIVU_V4SI, > P10V_BUILTIN_VDIVU_V2DI, P10V_BUILTIN_VMODU_V2DI, > P10V_BUILTIN_VMODU_V4SI, P10V_BUILTIN_VMULHU_V2DI, > P10V_BUILTIN_VMULHU_V4SI, P10V_BUILTIN_VMULLD_V2DI]: Add case > statement for builtins. > * config/rs6000/vsx.md (VIlong_char): Add define_mod_attribute. > (UNSPEC_VDIVES, UNSPEC_VDIVEU, > UNSPEC_VMULHS, UNSPEC_VMULHU, UNSPEC_VMULLD): Add enum for UNSPECs. > (vsx_mul_v2di, vsx_udiv_v2di): Add if TARGET_POWER10 statement. > (vdives_, vdiveu_, vdiv3, uuvdiv3, > vmods_, vmodu_, vmulhs_, vmulhu_, mulv2di3): > Add define_insn, mode is VIlong. > * doc/extend.texi (vec_mulh, vec_mul, vec_div, vec_dive, vec_mod): Add > builtin descriptions. > > gcc/testsuite/ > * gcc.target/powerpc/builtins-1-p10-runnable.c: New test file. Hi, Carl Thanks for making the changes. This looks okay to me now. I don't know if Segher has any additional requests. Thanks, David