From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94663 invoked by alias); 5 Aug 2019 19:35:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 94615 invoked by uid 89); 5 Aug 2019 19:35:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-ot1-f54.google.com Received: from mail-ot1-f54.google.com (HELO mail-ot1-f54.google.com) (209.85.210.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Aug 2019 19:35:01 +0000 Received: by mail-ot1-f54.google.com with SMTP id z23so58297703ote.13 for ; Mon, 05 Aug 2019 12:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kYX19MBm9LHOrk+k2Mz1YLhk10nEgu7nWrLdQ20S9FU=; b=O49xkTacEBBw94KSHwGSiDiKtO+nGHIa9cj6NRcKMZncCsbeGf6xUjkXxJrFwAwA5T NcizEFg2+u3f5PeXJ02idvDZ2lgO5UtfNliUiE2ahjmw4DFuKQxyGym86UEmJdTAvBSW i+vqxmE2i773oeIJQQy+X8o+SX1brNob6GuwrDDu51QUZiulR1TMM0W+wR3/Ag9bZKq1 eAKrl4NJu3eJ5dbQFa8ajgdaa+0MNQbTacuWELUlhTnh8TKcuPG5f0z2h3+NYXgJ6IHI wRGzV1ipd9KUB7X8Y/apQ+DxCZrjaCidXM0sroPYFAWU2yiitEaMVtaXCqkHwr7u61Gn FujQ== MIME-Version: 1.0 References: <20190805125358.GR2726@tucnak> In-Reply-To: From: Uros Bizjak Date: Mon, 05 Aug 2019 19:35:00 -0000 Message-ID: Subject: Re: [PATCH][RFC][x86] Fix PR91154, add SImode smax, allow SImode add in SSE regs To: Richard Biener Cc: Jakub Jelinek , "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2019-08/txt/msg00300.txt.bz2 On Mon, Aug 5, 2019 at 3:29 PM Richard Biener wrote: > > > > > > > (define_mode_iterator MAXMIN_IMODE [SI "TARGET_SSE4_1"] [DI "TARGET_AVX512F"]) > > > > > > > > > > > > > > and then we need to split DImode for 32bits, too. > > > > > > > > > > > > For now, please add "TARGET_64BIT && TARGET_AVX512F" for DImode > > > > > > condition, I'll provide _doubleword splitter later. > > > > > > > > > > Shouldn't that be TARGET_AVX512VL instead? Or does the insn use %g0 etc. > > > > > to force use of %zmmN? > > > > > > > > It generates V4SI mode, so - yes, AVX512VL. > > > > > > case SMAX: > > > case SMIN: > > > case UMAX: > > > case UMIN: > > > if ((mode == DImode && (!TARGET_64BIT || !TARGET_AVX512VL)) > > > || (mode == SImode && !TARGET_SSE4_1)) > > > return false; > > > > > > so there's no way to use AVX512VL for 32bit? > > > > There is a way, but on 32bit targets, we need to split DImode > > operation to a sequence of SImode operations for unconverted pattern. > > This is of course doable, but somehow more complex than simply > > emitting a DImode compare + DImode cmove, which is what current > > splitter does. So, a follow-up task. > > Ah, OK. So for the above condition we can elide the !TARGET_64BIT > check we just need to properly split if we enable the scalar minmax > pattern for DImode on 32bits, the STV conversion would go fine. Yes, that is correct. Uros.