From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 77F673858D34 for ; Sun, 28 Apr 2024 08:14:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 77F673858D34 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 77F673858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714292109; cv=none; b=EzEUE8+i82Pbcl/L9pqpPhqjgj15By+Jm0BXw+zpa3ysVY1ixMfmBHDmNcIWWtbw6goqVZFBFZq4f1gMIyDTVYhVk5jUKNbLK/ZSgKWy7O7JS59zy/j3o16XkR6ydNDpc0JSfk9al1OKsexX3jaGXrLVL1oaNbF1gcZkHHCCq64= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714292109; c=relaxed/simple; bh=EFnh1GEofRaDfz+NvrwTExfIPdg+OJRzWjhfdsgi8TE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=edwTeYXQsVYuNwHUDNIzTpGwqqfgdPBbHLWR7yC8MKW7FkeV81dsdfniI6t/vA/3ljfouis+nWeYR7VbHYY1W66XMijxuJ6l11WMGzlVh3incITXB/nkCRS2lmyQd99pwXry+yp8a1WQbbanU1qzWJ+lUV5bYOajTJFQg23dwjA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-6ee0642f718so3399794b3a.0 for ; Sun, 28 Apr 2024 01:14:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1714292097; x=1714896897; darn=gcc.gnu.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=jR2EMv6oOW731JD4u73KUxJnyKEsM4CRCYOvDWDRYos=; b=XvL0pHcGuwrc7CjNPENCRUp5OAU+9eY5qbvhBi8A7mYMd6gGdNb0yRdqtOibJJbJ7h fFdv+P9K2HXVOqABMnsfw2Ty0t5+gHeQyMU/GCaF2FrnWBj2A+Rv4K+TN9byqpAzV9XQ GZeUv3a8QpOY3hSXlUy9ogz00zFBRd/6Uw/5LllvaerGQMvmh0iM72m9R/GTPQv0EimD irNTjiMD7wwdttL5hJyaPa3YatS8zK/tI8poouRJijbGR+udfe3kBuutkX04ba2Sl2E0 VK1Nt1fPUtOjXjqT3/xwZdOK4FekAdkf9K4Cu3MdlAdqqhRrGC0Mp8CPlGPV6DaFC05a H9iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714292097; x=1714896897; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jR2EMv6oOW731JD4u73KUxJnyKEsM4CRCYOvDWDRYos=; b=ZzFI3d3Bf2ICZGWXegnbqEcmHLPJJBrSBMt3QGgYyIhMZD685mGYTOvthmCg3wEHKH VHS1SyF0q/Q/RKbKGcEmjcHO4n2wHR1Tj4OhUFgHE697NZvuv6OifAolaJYHxGskhras Zlmw5Fehl6MXx+djXWiXQtIbVO92Zp3xfYoB/PI3kH5IBX4TZOs4V18+nNwQCTYvyUlQ zVkU/71SVbgsptg5lHPoO9Mc54UteahBzSol0QQZwMec8czSaLxDb/kxyAY3LuYgdico Sf6hVzDoFh660ZX3+Nz7JQhDKIwH2/JjI6iA9w/gkQGKAudgKHGR/1bYLNKJwg3uMWqP WYsA== X-Forwarded-Encrypted: i=1; AJvYcCXf6S5/z+dAFSTpck6y6xQ7DSjOoOFAGLUCQD7vSHCQPJDrVJwRLT9F3nkQeZ0TjD5eYLR8e7gcvLPfJ1YocM6k4j4MuQiJuA== X-Gm-Message-State: AOJu0YxN4R3g3LxbwGg7+YuRP/gTuPyz/PlfqCWYGb1Ca191iy/PGS+9 NcZTyppQxvPRRB5xAjBKFVx38xc9yfCNO9VE+qwiGaTh3yB6NK7om0oeXirmPw== X-Google-Smtp-Source: AGHT+IHsD5G8PjMqm3NBORrd25ZCCr2xECpPmTu30KqpWCMvhtbEogayidNfyLMXvyRWehdwJTDgsQ== X-Received: by 2002:a05:6a20:d046:b0:1af:37bf:d7de with SMTP id hv6-20020a056a20d04600b001af37bfd7demr4968952pzb.7.1714292097045; Sun, 28 Apr 2024 01:14:57 -0700 (PDT) Received: from free.home ([2804:7f1:218b:5e2:c43b:e0c4:71a:241b]) by smtp.gmail.com with ESMTPSA id fv3-20020a056a00618300b006eb3c3db4afsm17285041pfb.186.2024.04.28.01.14.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 01:14:56 -0700 (PDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 43S8EhF1279176 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sun, 28 Apr 2024 05:14:44 -0300 From: Alexandre Oliva To: "Kewen.Lin" Cc: Rainer Orth , Mike Stump , David Edelsohn , Segher Boessenkool , Kewen Lin , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] adjust vectorization expectations for ppc costmodel 76b Organization: Free thinker, does not speak for AdaCore References: Date: Sun, 28 Apr 2024 05:14:43 -0300 In-Reply-To: (Kewen Lin's message of "Wed, 24 Apr 2024 16:24:23 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,WEIRD_QUOTING autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Apr 24, 2024, "Kewen.Lin" wrote: > For !has_arch_pwr7 case, it still adopts peeling but as the comment (one line above) > shows the original intention of this case is to expect not profitable for peeling > so it's not expected to be handled here, can we just tweak the loop bound instead, > such as: > -#define N 14 > +#define N 13 > #define OFF 4 > ?, it can make this loop not profitable to be vectorized for !vect_no_align with > peeling (both pwr7 and pwr6) and keep consistent. Like this? I didn't feel I could claim authorship of this one-liner just because I turned it into a patch and tested it, so I took the liberty of turning your own words above into the commit message. So far, tested on ppc64le-linux-gnu (ppc9). Testing with vxworks targets now. Would you like to tweak the commit message to your liking? Otherwise, is this ok to install? Thanks, adjust iteration count for ppc costmodel 76b From: Kewen Lin The original intention of this case is to expect not profitable for peeling. Tweak the loop bound to make this loop not profitable to be vectorized for !vect_no_align with peeling (both pwr7 and pwr6) and keep consistent. for gcc/testsuite/ChangeLog * gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c (N): Tweak. --- .../gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c index cbbfbb24658f8..e48b0ab759e75 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c +++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c @@ -6,7 +6,7 @@ /* On Power7 without misalign vector support, this case is to check it's not profitable to perform vectorization by peeling to align the store. */ -#define N 14 +#define N 13 #define OFF 4 /* Check handling of accesses for which the "initial condition" - -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity Excluding neuro-others for not behaving ""normal"" is *not* inclusive