public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "law at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103278] New: [12 Regression] Recent change to cddce inhibits switch optimization Date: Tue, 16 Nov 2021 17:16:21 +0000 [thread overview] Message-ID: <bug-103278-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103278 Bug ID: 103278 Summary: [12 Regression] Recent change to cddce inhibits switch optimization Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: law at gcc dot gnu.org Target Milestone: --- On iq2000-elf this change: commit 045206450386bcd774db3bde0c696828402361c6 Author: Richard Biener <rguenther@suse.de> Date: Fri Nov 12 10:21:22 2021 +0100 tree-optimization/102880 - improve CD-DCE [ ... ] Is inhibiting switch optimization for tree-ssa/if-to-switch-3.c from converting an if statement into a switch statement: /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-iftoswitch-optimized" } */ int IsMySuperRandomChar(int aChar) { return aChar == 0x0009 || aChar == 0x000A || aChar == 0x000C || aChar == 0x000D || aChar == 0x0020 || aChar == 0x0030; } /* { dg-final { scan-tree-dump "Condition chain with \[^\n\r]\* BBs transformed into a switch statement." "iftoswitch" } } */ After today's cd-dce change we no longer turn that into a switch: Before: ;; Canonical GIMPLE case clusters: 9-10 12 13 32 48 ;; JT can be built: JT(values:6 comparisons:10 range:40 density: 25.00%):9-48 j.c:8:26: optimized: Condition chain with 3 BBs transformed into a switch statement. After: ;; Canonical GIMPLE case clusters: 9-10 12-13 32 48
next reply other threads:[~2021-11-16 17:16 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-16 17:16 law at gcc dot gnu.org [this message] 2021-11-16 23:25 ` [Bug tree-optimization/103278] " pinskia at gcc dot gnu.org 2021-11-16 23:29 ` pinskia at gcc dot gnu.org 2021-11-17 14:48 ` law at gcc dot gnu.org 2021-11-18 7:36 ` rguenth at gcc dot gnu.org 2021-11-18 8:48 ` rguenth at gcc dot gnu.org 2021-11-18 9:02 ` cvs-commit at gcc dot gnu.org 2021-11-18 9:04 ` rguenth at gcc dot gnu.org 2021-11-23 3:31 ` law at gcc dot gnu.org 2021-11-23 8:23 ` rguenth at gcc dot gnu.org 2021-11-23 8:25 ` marxin at gcc dot gnu.org 2021-11-29 15:23 ` marxin at gcc dot gnu.org 2021-11-30 7:22 ` rguenther at suse dot de 2021-11-30 13:48 ` cvs-commit at gcc dot gnu.org 2021-11-30 13:48 ` marxin 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-103278-4@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: linkBe 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).