public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug middle-end/23664] fold does not change (a&C1)+(b&C2) to (a&C1)|(b&C2) iff (C1 & C2) == 0 [not found] <bug-23664-4@http.gcc.gnu.org/bugzilla/> @ 2012-02-15 3:57 ` pinskia at gcc dot gnu.org 2015-07-14 3:22 ` naveen_gcc at indiatimes dot com 2015-07-14 4:17 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu.org @ 2012-02-15 3:57 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23664 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |pinskia at gcc dot gnu.org |gnu.org | --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-15 03:57:17 UTC --- I am going to add this one, it is an easy change now with the infrastructure which I am about to add to the treecombine branch (a git only branch). This can be done for PLUS_EXPR if both sides have no nonzero bits in common. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/23664] fold does not change (a&C1)+(b&C2) to (a&C1)|(b&C2) iff (C1 & C2) == 0 [not found] <bug-23664-4@http.gcc.gnu.org/bugzilla/> 2012-02-15 3:57 ` [Bug middle-end/23664] fold does not change (a&C1)+(b&C2) to (a&C1)|(b&C2) iff (C1 & C2) == 0 pinskia at gcc dot gnu.org @ 2015-07-14 3:22 ` naveen_gcc at indiatimes dot com 2015-07-14 4:17 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 5+ messages in thread From: naveen_gcc at indiatimes dot com @ 2015-07-14 3:22 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23664 hs.naveen <naveen_gcc at indiatimes dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |naveen_gcc at indiatimes dot com --- Comment #4 from hs.naveen <naveen_gcc at indiatimes dot com> --- Fixed with the commit:- https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=a76fc0fddcdc434b187c067d3a4632fb8473153a ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/23664] fold does not change (a&C1)+(b&C2) to (a&C1)|(b&C2) iff (C1 & C2) == 0 [not found] <bug-23664-4@http.gcc.gnu.org/bugzilla/> 2012-02-15 3:57 ` [Bug middle-end/23664] fold does not change (a&C1)+(b&C2) to (a&C1)|(b&C2) iff (C1 & C2) == 0 pinskia at gcc dot gnu.org 2015-07-14 3:22 ` naveen_gcc at indiatimes dot com @ 2015-07-14 4:17 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu.org @ 2015-07-14 4:17 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23664 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- So closing as fixed. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/23664] New: fold does not change (a&C1)+(b&C2) to (a&C1)|(b&C2) iff (C1 & C2) == 0 @ 2005-09-01 0:40 pinskia at gcc dot gnu dot org 2005-09-01 0:42 ` [Bug middle-end/23664] " pinskia at gcc dot gnu dot org 2005-09-17 2:12 ` pinskia at gcc dot gnu dot org 0 siblings, 2 replies; 5+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-09-01 0:40 UTC (permalink / raw) To: gcc-bugs These two functions should produce the same asm: int f(int a, int b) { return (a&0xF)+(b&0xF0); } int f1(int a, int b) { return (a&0xF)|(b&0xF0); } For PPC, we get: _f: rlwinm r4,r4,0,24,27 rlwinm r3,r3,0,28,31 add r3,r3,r4 blr _f1: rlwinm r4,r4,0,24,27 rlwimi r3,r4,0,0,27 blr Which shows the | is more efficient than the + one. -- Summary: fold does not change (a&C1)+(b&C2) to (a&C1)|(b&C2) iff (C1 & C2) == 0 Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P2 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: powerpc-*-* OtherBugsDependingO 19987 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23664 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/23664] fold does not change (a&C1)+(b&C2) to (a&C1)|(b&C2) iff (C1 & C2) == 0 2005-09-01 0:40 [Bug middle-end/23664] New: " pinskia at gcc dot gnu dot org @ 2005-09-01 0:42 ` pinskia at gcc dot gnu dot org 2005-09-17 2:12 ` pinskia at gcc dot gnu dot org 1 sibling, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-09-01 0:42 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-01 00:42 ------- I should give credit to LLVM's instruction combine pass which have this. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23664 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/23664] fold does not change (a&C1)+(b&C2) to (a&C1)|(b&C2) iff (C1 & C2) == 0 2005-09-01 0:40 [Bug middle-end/23664] New: " pinskia at gcc dot gnu dot org 2005-09-01 0:42 ` [Bug middle-end/23664] " pinskia at gcc dot gnu dot org @ 2005-09-17 2:12 ` pinskia at gcc dot gnu dot org 1 sibling, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-09-17 2:12 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-17 02:12 ------- Confirmed. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2005-09-17 02:12:40 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23664 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-14 4:17 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-23664-4@http.gcc.gnu.org/bugzilla/> 2012-02-15 3:57 ` [Bug middle-end/23664] fold does not change (a&C1)+(b&C2) to (a&C1)|(b&C2) iff (C1 & C2) == 0 pinskia at gcc dot gnu.org 2015-07-14 3:22 ` naveen_gcc at indiatimes dot com 2015-07-14 4:17 ` pinskia at gcc dot gnu.org 2005-09-01 0:40 [Bug middle-end/23664] New: " pinskia at gcc dot gnu dot org 2005-09-01 0:42 ` [Bug middle-end/23664] " pinskia at gcc dot gnu dot org 2005-09-17 2:12 ` pinskia at gcc dot gnu dot org
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).