public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rafael.espindola at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/49911] New: vrp2 + -fstrict-enums incorrectly remove predicate Date: Sat, 30 Jul 2011 14:35:00 -0000 [thread overview] Message-ID: <bug-49911-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49911 Summary: vrp2 + -fstrict-enums incorrectly remove predicate Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: rafael.espindola@gmail.com with a r176947 cc1plus, running cc1plus -fstrict-enums -fdump-tree-all ~/tmpfs/test2.ii -fno-rtti -fno-exceptions -fno-strict-aliasing -m32 -O2 in extern void JS_Assert(); typedef enum { eax, ecx, edx, ebx, esp, ebp, esi, edi } RegisterID; union StateRemat { RegisterID reg_; int offset_; }; static StateRemat FromRegister(RegisterID reg) { StateRemat sr; sr.reg_ = reg; return sr; } static StateRemat FromAddress3(int address) { StateRemat sr; sr.offset_ = address; //sr.offset_ = 0; if (address < 46 && address >= 0) { JS_Assert(); } return sr; } struct FrameState { StateRemat dataRematInfo2(bool y, int z) { if (y) return FromRegister(RegisterID(1)); return FromAddress3(z); } }; FrameState frame; StateRemat x; void jsop_setelem(bool y, int z) { x = frame.dataRematInfo2(y, z); } produces a test2.ii.123t.vrp2 with: Folding predicate SR.6_11 <= 45 to 1 replacing the "sr.offset_ = address" line with sr.offset_ = 0 prevents the transformation.
next reply other threads:[~2011-07-30 14:35 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-07-30 14:35 rafael.espindola at gmail dot com [this message] 2011-07-31 9:57 ` [Bug tree-optimization/49911] " rguenth at gcc dot gnu.org 2011-07-31 13:39 ` rafael.espindola at gmail dot com 2011-07-31 13:57 ` rafael.espindola at gmail dot com 2011-08-01 8:33 ` rguenth at gcc dot gnu.org 2011-08-01 8:34 ` [Bug tree-optimization/49911] SRA + DOM " rguenth at gcc dot gnu.org 2011-08-01 8:42 ` rguenth at gcc dot gnu.org 2011-08-01 8:45 ` [Bug tree-optimization/49911] SRA + DOM + VRP " rguenth at gcc dot gnu.org 2011-08-01 8:49 ` rguenth at gcc dot gnu.org 2011-08-01 9:06 ` rguenth at gcc dot gnu.org 2011-08-04 19:00 ` rafael.espindola at gmail dot com 2011-08-06 15:59 ` ebotcazou at gcc dot gnu.org 2011-08-06 16:08 ` ebotcazou at gcc dot gnu.org 2011-08-11 12:34 ` jamborm at gcc dot gnu.org 2011-08-11 13:37 ` rguenth at gcc dot gnu.org 2011-08-11 13:42 ` rguenth at gcc dot gnu.org 2011-08-12 8:02 ` ebotcazou at gcc dot gnu.org 2011-08-17 22:21 ` rafael.espindola at gmail dot com 2011-09-05 16:36 ` jamborm at gcc dot gnu.org 2011-09-05 17:15 ` rafael.espindola at gmail dot com 2011-09-06 7:30 ` rguenth at gcc dot gnu.org 2011-09-07 14:31 ` jamborm at gcc dot gnu.org 2011-09-07 15:04 ` rafael.espindola at gmail dot com 2011-09-07 15:49 ` jamborm at gcc dot gnu.org 2011-09-08 14:01 ` jamborm at gcc dot gnu.org 2011-09-08 17:30 ` jamborm at gcc dot gnu.org 2011-09-09 9:37 ` jamborm 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-49911-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).