public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: LIU Hao <lh_mouse@126.com>
To: stefan@franke.ms, gcc-help@gcc.gnu.org
Subject: Re: AW: optimizer discards sign information
Date: Wed, 10 Apr 2024 17:57:14 +0800	[thread overview]
Message-ID: <20096916-dc47-4cc9-93c1-bc910ef07327@126.com> (raw)
In-Reply-To: <018d01da8b2c$59e89e90$0db9dbb0$@franke.ms>


[-- Attachment #1.1: Type: text/plain, Size: 1001 bytes --]

在 2024-04-10 17:49, stefan@franke.ms 写道:
> But I keep considering this as a bug. And clang behaves correctly!

Yes there have been many reports [1]. It's a missed optimization.

You may work around it by using 32-bit parameters, or casting either operand to u32; casting the 
result will not help.


[1] 
https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&cf_gcctarget=x86_64&cf_gcctarget_type=allwordssubstr&cf_known_to_fail_type=allwords&cf_known_to_work_type=allwords&f0=OP&f1=OP&f2=product&f3=component&f4=alias&f5=short_desc&f7=content&f8=CP&f9=CP&j1=OR&list_id=423756&o2=substring&o3=substring&o4=substring&o5=substring&o6=substring&o7=matches&query_format=advanced&short_desc=sign%20extension&short_desc_type=allwordssubstr&v2=sign-extension&v3=sign-extension&v4=sign-extension&v5=sign-extension&v6=sign-extension&v7="sign-extension"


-- 
Best regards,
LIU Hao


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  parent reply	other threads:[~2024-04-10  9:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10  8:52 stefan
2024-04-10  9:16 ` Alexander Monakov
2024-04-10  9:19   ` Xi Ruoyao
2024-04-10  9:40     ` LIU Hao
2024-04-10  9:44       ` Xi Ruoyao
2024-04-10  9:51         ` LIU Hao
2024-04-10  9:52           ` Xi Ruoyao
2024-04-10 10:07             ` LIU Hao
2024-04-10 10:17               ` Xi Ruoyao
2024-04-10 10:03           ` AW: " stefan
2024-04-10 10:34             ` Xi Ruoyao
2024-04-10  9:24   ` stefan
2024-04-10  9:49     ` stefan
2024-04-10  9:54       ` Xi Ruoyao
2024-04-10  9:57       ` LIU Hao [this message]
2024-04-10 10:03         ` Xi Ruoyao
2024-04-10 11:52     ` David Brown
2024-04-10 14:25       ` Stefan Franke
2024-04-10 16:51         ` David Brown
2024-04-11  0:32         ` Oleg Endo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20096916-dc47-4cc9-93c1-bc910ef07327@126.com \
    --to=lh_mouse@126.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=stefan@franke.ms \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).