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 tree-optimization/46027] (unsignedtype1)(unsignedtype2)(unsignedtype1_var) not changed into unsignedtype1_var & NNN when sizeof(type1) > sizeof(type2) Date: Tue, 19 Oct 2010 00:29:00 -0000 [thread overview] Message-ID: <20101019002900.kbdQXfdCnzN-hxPUmBjH0AUOcmJwhNgD8RAe89gTNpY@z> (raw) In-Reply-To: <bug-46027-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46027 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2010-10-19 00:29:18 UTC --- Here is a full testcase: typedef unsigned type1; typedef unsigned char type2; type1 t; void f(type1 tt) { type2 t1 = t; type1 t2 = t1; t = t2 & 0xFF; } void f2(type1 tt) { type1 t2 = (type2)t; t = t2 & 0xFF; } void f1(type1 tt) { type1 t2 = t & 0xff; t = t2 & 0xFF; } ---- CUT ---- Currently f does not get optimized after my patch. f1 is optimized before my patch and f2 is optimized afterwards. f requires some kind of forward prop/tree combining to do the work.
next prev parent reply other threads:[~2010-10-19 0:29 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-10-14 18:55 [Bug tree-optimization/46027] New: " pinskia at gcc dot gnu.org 2010-10-14 18:56 ` [Bug tree-optimization/46027] " pinskia at gcc dot gnu.org 2010-10-19 0:29 ` pinskia at gcc dot gnu.org [this message] 2011-11-29 23:42 ` pinskia 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=20101019002900.kbdQXfdCnzN-hxPUmBjH0AUOcmJwhNgD8RAe89gTNpY@z \ --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).