From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by sourceware.org (Postfix) with ESMTPS id 84021385841C for ; Mon, 14 Nov 2022 10:19:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 84021385841C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-x12c.google.com with SMTP id c1so18464971lfi.7 for ; Mon, 14 Nov 2022 02:19:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KI+BVRJz/oAVTeOoQI5KikpDYPo2m2tOPUSTuGRC9+c=; b=Q+dNvm1rn+NLq5z2gt/RJr3+02OHA293tWcPfuQqD8dnZV9ydoO0b0wtrYj4x7AMVq 7o2maNpxCDwfn8eXCEBSTIyops4Oq+NmYa51Keoenxjn9twenrjFq0npjkkG4OWPGFfP 2qwVqOperOo1m55NsTMZiSUqTMUDjIzQCcfBW6Sz8R6sfERwl64Hmzo/3Pmvbx6GQ6cC eWXfoCKoVNyuChDOWXH/LW66zfPqnsvyACXgHk61RIwl1+qgu/URPpVHEL0wB+/zuwvQ jPtI5/8dcZ1pDjnCPvY8B8KkYt+LiIOCbuR0icZ2XqVSlIu5xVdQTP8Li3biEGNGEI4g Ml1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KI+BVRJz/oAVTeOoQI5KikpDYPo2m2tOPUSTuGRC9+c=; b=PvDa0wz0QsCviiwPwCUU8219CUQ5SrueN+r9p70R8Aq9X3xnsKK1p/XaAs3CeEOuGp 7fk4n3dS6O9xkUZG4s51Q1lvkeQc1YerWxAlrsIHatQS/I+7W6SOov7dTrWrEZ95kA9U ERMWCEYm2igjyEElMDzp0UzsuSQZVe1ldVrGcFY+Dwi+ZsLDFglxwJq6sQSUvcg7ys7t vijmXY0nlfOK1Wj+3DuoW4FalHyUzfFvfQmeMwNt+uz7YmAzuqc8wXqKh6/dXkP8H2OQ qX9aC+RUwCUb9XO+qpF0rPFtoZ75Ph2/ImSaES73NX2rD/5w3LGnjbP5Yo8TdIXesCkc Q9wQ== X-Gm-Message-State: ANoB5pm/EzU1xRMo5Cxmc+1CCGK/rNoOU7Lsiei7I9KS1e2CKTIrNzwL Yfn6uGEd9sohnUAraEEn+2/z37/dh7o/JUsBAS4= X-Google-Smtp-Source: AA0mqf5EwyYv2gTbfj5xSFHcwcL5e+6cAjfKg1dVwFkRifV7XtDazu+eH9md0yLEiEx2nsxniUAihPbFHRjzYJRDvCg= X-Received: by 2002:a05:6512:3c89:b0:499:b4b3:2f68 with SMTP id h9-20020a0565123c8900b00499b4b32f68mr3737904lfv.203.1668421148020; Mon, 14 Nov 2022 02:19:08 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Mon, 14 Nov 2022 11:18:55 +0100 Message-ID: Subject: Re: [PATCH 4/8] Modify test, to prevent the next patch breaking it To: Andrew Carlotti Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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 Fri, Nov 11, 2022 at 7:48 PM Andrew Carlotti via Gcc-patches wrote: > > The upcoming c[lt]z idiom recognition patch eliminates the need for a > brute force computation of the iteration count of these loops. The test > is intended to verify that ivcanon can determine the loop count when the > condition is given by a chain of constant computations. > > We replace the constant operations with a more complicated chain that should > resist future idiom recognition. OK. > gcc/testsuite/ChangeLog: > > * gcc.dg/pr77975.c: Make tests more robust. > > > -- > > > diff --git a/gcc/testsuite/gcc.dg/pr77975.c b/gcc/testsuite/gcc.dg/pr77975.c > index 148cebdded964da7fce148abdf2a430c55650513..a187ce2b50c2821841e71b5b6cb243a37a66fb57 100644 > --- a/gcc/testsuite/gcc.dg/pr77975.c > +++ b/gcc/testsuite/gcc.dg/pr77975.c > @@ -7,10 +7,11 @@ > unsigned int > foo (unsigned int *b) > { > - unsigned int a = 3; > + unsigned int a = 8; > while (a) > { > - a >>= 1; > + a += 5; > + a &= 44; > *b += a; > } > return a; > @@ -21,10 +22,11 @@ foo (unsigned int *b) > unsigned int > bar (unsigned int *b) > { > - unsigned int a = 7; > + unsigned int a = 3; > while (a) > { > - a >>= 1; > + a += 5; > + a &= 44; > *b += a; > } > return a;