public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "liuhongt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/113576] [14 regression] 502.gcc_r hangs r14-8223-g1c1853a70f9422169190e65e568dcccbce02d95c
Date: Thu, 08 Feb 2024 15:07:14 +0000 [thread overview]
Message-ID: <bug-113576-4-dpKhJ8G7Ul@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113576-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113576
--- Comment #44 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
>
> Note the AND is removed by combine if I add it:
>
> Successfully matched this instruction:
> (set (reg:CCZ 17 flags)
> (compare:CCZ (and:HI (not:HI (subreg:HI (reg:QI 102 [ tem_3 ]) 0))
> (const_int 15 [0xf]))
> (const_int 0 [0])))
>
> (*testhi_not)
>
> - 9: {r103:QI=r102:QI&0xf;clobber flags:CC;}
> + REG_DEAD r99:QI
> + 9: NOTE_INSN_DELETED
> + 12: flags:CCZ=cmp(~r102:QI#0&0xf,0)
> REG_DEAD r102:QI
> - REG_UNUSED flags:CC
> - 12: flags:CCZ=cmp(r103:QI,0xf)
> - REG_DEAD r103:QI
>
> and we get
>
> foo:
> .LFB0:
> .cfi_startproc
> notl %esi
> orl %esi, %edi
> notl %edi
> testb $15, %dil
> je .L6
> ret
>
> which I'm not sure is OK?
>
Yes, I think it's on purpose
11508;; Split and;cmp (as optimized by combine) into not;test
11509;; Except when TARGET_BMI provides andn (*andn_<mode>_ccno).
11510(define_insn_and_split "*test<mode>_not"
11511 [(set (reg:CCZ FLAGS_REG)
11512 (compare:CCZ
11513 (and:SWI
11514 (not:SWI (match_operand:SWI 0 "register_operand"))
11515 (match_operand:SWI 1 "<nonmemory_szext_operand>"))
11516 (const_int 0)))]
11517 "ix86_pre_reload_split ()
11518 && (!TARGET_BMI || !REG_P (operands[1]))"
11519 "#"
11520 "&& 1"
11521 [(set (match_dup 2) (not:SWI (match_dup 0)))
11522 (set (reg:CCZ FLAGS_REG)
11523 (compare:CCZ (and:SWI (match_dup 2) (match_dup 1))
11524 (const_int 0)))]
11525 "operands[2] = gen_reg_rtx (<MODE>mode);")
11526
11527;; Split and;cmp (as optimized by combine) into andn;cmp $0
11528(define_insn_and_split "*test<mode>_not_doubleword"
next prev parent reply other threads:[~2024-02-08 15:07 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 10:05 [Bug tree-optimization/113576] New: " liuhongt at gcc dot gnu.org
2024-01-24 10:07 ` [Bug tree-optimization/113576] " liuhongt at gcc dot gnu.org
2024-01-24 12:27 ` rguenth at gcc dot gnu.org
2024-01-24 13:37 ` rguenth at gcc dot gnu.org
2024-01-24 13:47 ` rguenth at gcc dot gnu.org
2024-01-24 13:50 ` rguenth at gcc dot gnu.org
2024-01-25 1:03 ` liuhongt at gcc dot gnu.org
2024-01-25 6:28 ` liuhongt at gcc dot gnu.org
2024-01-25 7:02 ` liuhongt at gcc dot gnu.org
2024-01-25 7:39 ` cvs-commit at gcc dot gnu.org
2024-01-25 8:34 ` liuhongt at gcc dot gnu.org
2024-01-25 8:52 ` rguenth at gcc dot gnu.org
2024-01-25 9:15 ` rguenther at suse dot de
2024-01-25 9:26 ` rsandifo at gcc dot gnu.org
2024-01-25 10:09 ` liuhongt at gcc dot gnu.org
2024-01-25 10:13 ` rguenth at gcc dot gnu.org
2024-01-25 12:24 ` rsandifo at gcc dot gnu.org
2024-01-25 13:03 ` tnfchris at gcc dot gnu.org
2024-01-25 13:28 ` rsandifo at gcc dot gnu.org
2024-01-25 14:12 ` rguenther at suse dot de
2024-01-26 2:24 ` liuhongt at gcc dot gnu.org
2024-01-26 3:12 ` liuhongt at gcc dot gnu.org
2024-01-26 5:43 ` liuhongt at gcc dot gnu.org
2024-01-29 17:28 ` tnfchris at gcc dot gnu.org
2024-01-29 18:31 ` tnfchris at gcc dot gnu.org
2024-01-30 3:29 ` liuhongt at gcc dot gnu.org
2024-01-30 7:46 ` tnfchris at gcc dot gnu.org
2024-01-30 8:26 ` rguenth at gcc dot gnu.org
2024-01-30 8:34 ` liuhongt at gcc dot gnu.org
2024-01-30 8:56 ` rguenth at gcc dot gnu.org
2024-01-30 10:12 ` rsandifo at gcc dot gnu.org
2024-01-30 10:39 ` rguenther at suse dot de
2024-02-01 8:59 ` rguenth at gcc dot gnu.org
2024-02-01 9:06 ` jakub at gcc dot gnu.org
2024-02-01 9:18 ` rsandifo at gcc dot gnu.org
2024-02-01 10:04 ` rguenth at gcc dot gnu.org
2024-02-07 15:08 ` rguenth at gcc dot gnu.org
2024-02-08 1:18 ` liuhongt at gcc dot gnu.org
2024-02-08 1:58 ` liuhongt at gcc dot gnu.org
2024-02-08 4:22 ` liuhongt at gcc dot gnu.org
2024-02-08 7:36 ` jakub at gcc dot gnu.org
2024-02-08 10:35 ` rguenth at gcc dot gnu.org
2024-02-08 10:48 ` rguenth at gcc dot gnu.org
2024-02-08 14:58 ` liuhongt at gcc dot gnu.org
2024-02-08 15:07 ` liuhongt at gcc dot gnu.org [this message]
2024-02-08 15:19 ` liuhongt at gcc dot gnu.org
2024-02-14 12:07 ` cvs-commit at gcc dot gnu.org
2024-02-14 12:38 ` rguenth at gcc dot gnu.org
2024-02-14 13:48 ` ubizjak at gmail dot com
2024-02-14 13:54 ` rguenth at gcc dot gnu.org
2024-02-14 13:59 ` jakub at gcc dot gnu.org
2024-02-14 14:01 ` jakub at gcc dot gnu.org
2024-02-14 14:31 ` ubizjak at gmail dot com
2024-02-14 14:36 ` jakub at gcc dot gnu.org
2024-02-14 15:07 ` rguenth at gcc dot gnu.org
2024-02-14 15:26 ` ubizjak at gmail dot com
2024-02-14 20:18 ` ubizjak at gmail dot com
2024-02-18 2:10 ` liuhongt 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-113576-4-dpKhJ8G7Ul@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).