public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/112758] [13/14 Regression] Inconsistent Bitwise AND Operation Result between int and long long int
Date: Wed, 29 Nov 2023 18:18:06 +0000	[thread overview]
Message-ID: <bug-112758-4-voXvoyhO2e@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112758-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112758

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |rtl-optimization
   Last reconfirmed|                            |2023-11-29
            Summary|Inconsistent Bitwise AND    |[13/14 Regression]
                   |Operation Result between    |Inconsistent Bitwise AND
                   |int and long long int on    |Operation Result between
                   |Different Optimization      |int and long long int
                   |Levels in GCC Trunk         |
           Keywords|                            |needs-bisection
     Ever confirmed|0                           |1
   Target Milestone|---                         |13.3
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Trying 21, 18 -> 22:
   21: r149:DI=0xffff00ffffffffff
   18: r147:DI=sign_extend([r143:DI+low(`globalVar')])
      REG_DEAD r143:DI
   22: r148:DI=r147:DI&r149:DI
      REG_DEAD r149:DI
      REG_DEAD r147:DI
      REG_EQUAL r147:DI&0xffff00ffffffffff
Successfully matched this instruction:
(set (reg:DI 148)
    (zero_extend:DI (mem/c:SI (lo_sum:DI (reg/f:DI 143)
                (symbol_ref:DI ("globalVar") [flags 0x86]  <var_decl
0x7f79b69e8090 globalVar>)) [1 globalVarD.2927+0 S4 A32])))
allowing combination of insns 18, 21 and 22
original costs 32 + 4 + 4 = 40
replacement cost 32


That is almost definitely wrong.

Was working in GCC 12 but started to go wrong in GCC 13.

  reply	other threads:[~2023-11-29 18:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29  6:05 [Bug c/112758] New: Inconsistent Bitwise AND Operation Result between int and long long int on Different Optimization Levels in GCC Trunk guminb at ajou dot ac.kr
2023-11-29 18:18 ` pinskia at gcc dot gnu.org [this message]
2023-12-08  2:57 ` [Bug rtl-optimization/112758] [13/14 Regression] Inconsistent Bitwise AND Operation Result between int and long long int guminb at ajou dot ac.kr
2023-12-08 17:01 ` jakub at gcc dot gnu.org
2023-12-08 17:37 ` segher at gcc dot gnu.org
2023-12-08 19:33 ` jakub at gcc dot gnu.org
2023-12-08 19:36 ` jakub at gcc dot gnu.org
2023-12-09  8:51 ` ebotcazou at gcc dot gnu.org
2023-12-09  9:11 ` jakub at gcc dot gnu.org
2023-12-09 11:00 ` ebotcazou at gcc dot gnu.org
2023-12-09 19:25 ` segher at gcc dot gnu.org
2023-12-09 22:06 ` ebotcazou at gcc dot gnu.org
2023-12-10 12:16 ` segher at gcc dot gnu.org
2023-12-13 22:06 ` pinskia at gcc dot gnu.org
2023-12-16 18:43 ` gkm at rivosinc dot com
2023-12-21 20:04 ` gkm at rivosinc dot com
2023-12-21 20:06 ` jakub at gcc dot gnu.org
2023-12-22 11:30 ` cvs-commit at gcc dot gnu.org
2024-03-02  0:37 ` cvs-commit at gcc dot gnu.org
2024-03-04  1:09 ` law at gcc dot gnu.org
2024-03-04 12:07 ` [Bug rtl-optimization/112758] [13 " jakub at gcc dot gnu.org

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=bug-112758-4-voXvoyhO2e@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).