From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id 0D6353858D1E for ; Sat, 22 Jul 2023 17:20:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0D6353858D1E 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-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5221b90f763so880722a12.0 for ; Sat, 22 Jul 2023 10:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690046428; x=1690651228; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TBUG4gyKD0kJ8/msK71ZLhw11g1JJiKzeZa18fN1ZVk=; b=AuXMapy/OwGYBBlscMpho9+w+A0AczarpC1uP4Xw9QXY2aZj+bxISuTUWBx1s11mNJ CfcOhs1yFQfwGyGzBuZGSIOy7n2ellrX/7c9oUFK+mUjPoEkHaxRlZZZpN7rhTzsH4Wp 8cYsSC9KojWdgtDgzv/ZzJ6i/12y4AAr93eQ94mj67HBoXquuZkvpG9iwOuU2aQGct0U DsniBChS4+0Nyp3wInhjfKmsmt4fVLTWsxwqlMsNJFxsXakuEkK2XJGdxdm9Zp9paJKy bDljyR0NsXNkq+BsBjmMn0ux26WIVZctk2xaUgSzgMNj+EDM1AC7gTXHTj6lh854BejY 4Ddg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690046428; x=1690651228; h=content-transfer-encoding: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=TBUG4gyKD0kJ8/msK71ZLhw11g1JJiKzeZa18fN1ZVk=; b=ZhaxlxONNb+lL6CUFvBzZ7ADaF++lLz9CR9CifxWM5A3fg2KCbIPs85iL7Ga9gFtbS sWc1jJOK1VMVGDGbb5j8T/le9TTLClsLYGEon6AbkZTnjPz4DEbcXXC6XNBEvz0DlE0A lYh0hLn8rqrn46FyVBrxBuxQQ1PW4GaChR2VCe9S6PYD0OU6G6jm6g6tRCOpQTTLSnXO cTV4z1aZmDKBI8i7nZKt+zNfyiRs1AbUCh3YCqusYWYmWPhSZbJXqCxi9wwVjlbtu+b0 A0MYJdlNmDxc+9ZmnDYVZNxdUNma8QKc/eu6ygVVF6VVndIoQ+5n4jpX1GmITZIKi6fc vdoQ== X-Gm-Message-State: ABy/qLZPVpe87mz3Xt/NP1ubssQMIRcDQduvvQtef/GOPBFY+ymDZlsR K8fndMQF0VniATciX4HYWoFrph3M8A3y0D9zwAA= X-Google-Smtp-Source: APBJJlEQ7lpQjfmBpNfv6yTxOGptrICPscsaWxjVLfI+Ef6jADo9nWY9yqMpTR89EhJHP9GoSPje7XO1FRCvcocMf8s= X-Received: by 2002:a05:6402:7c9:b0:51d:98d1:5337 with SMTP id u9-20020a05640207c900b0051d98d15337mr4739503edy.37.1690046427767; Sat, 22 Jul 2023 10:20:27 -0700 (PDT) MIME-Version: 1.0 References: <00a201d9bca7$4739a220$d5ace660$@nextmovesoftware.com> In-Reply-To: <00a201d9bca7$4739a220$d5ace660$@nextmovesoftware.com> From: Uros Bizjak Date: Sat, 22 Jul 2023 19:20:22 +0200 Message-ID: Subject: Re: [x86 PATCH] Don't use insvti_{high,low}part with -O0 (for compile-time). To: Roger Sayle Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 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,T_SCC_BODY_TEXT_LINE 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 Sat, Jul 22, 2023 at 4:17=E2=80=AFPM Roger Sayle wrote: > > > This patch attempts to help with PR rtl-optimization/110587, a regression > of -O0 compile time for the pathological pr28071.c. My recent patch help= s > a bit, but hasn't returned -O0 compile-time to where it was before my > ix86_expand_move changes. The obvious solution/workaround is to guard > these new TImode parameter passing optimizations with "&& optimize", so > they don't trigger when compiling with -O0. The very minor complication > is that "&& optimize" alone leads to the regression of pr110533.c, where > our improved TImode parameter passing fixes a wrong-code issue with naked > functions, importantly, when compiling with -O0. This should explain > the one line fix below "&& (optimize || ix86_function_naked (cfun))". > > I've an additional fix/tweak or two for this compile-time issue, but > this change eliminates the part of the regression that I've caused. > > This patch has been tested on x86_64-pc-linux-gnu with make bootstrap > and make -k check, both with and without --target_board=3Dunix{-m32} > with no new failures. Ok for mainline? > > 2023-07-22 Roger Sayle > > gcc/ChangeLog > * config/i386/i386-expand.cc (ix86_expand_move): Disable the > 64-bit insertions into TImode optimizations with -O0, unless > the function has the "naked" attribute (for PR target/110533). LGTM, but please add some comments, why only when optimizing (please mention PR110587) and especially mention PR110533 on why the naked attribute is allowed. Thanks, Uros. > Cheers, > Roger > -- >