public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/35306] New: Missing expression simplication for conditional OR
@ 2008-02-23 5:16 xinliangli at gmail dot com
2008-02-23 19:51 ` [Bug middle-end/35306] " segher at kernel dot crashing dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: xinliangli at gmail dot com @ 2008-02-23 5:16 UTC (permalink / raw)
To: gcc-bugs
The following rule is not handled by GCC
(a & x) || (a & y) ===> a & (x | y)
--
Summary: Missing expression simplication for conditional OR
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: xinliangli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35306
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/35306] Missing expression simplication for conditional OR
2008-02-23 5:16 [Bug middle-end/35306] New: Missing expression simplication for conditional OR xinliangli at gmail dot com
@ 2008-02-23 19:51 ` segher at kernel dot crashing dot org
2008-02-24 0:37 ` xinliangli at gmail dot com
2008-02-24 22:19 ` rguenth at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: segher at kernel dot crashing dot org @ 2008-02-23 19:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from segher at kernel dot crashing dot org 2008-02-23 19:51 -------
(In reply to comment #0)
> The following rule is not handled by GCC
>
> (a & x) || (a & y) ===> a & (x | y)
Perhaps that is because those two expressions aren't equivalent?
But, confirmed, assuming you meant to say that
int bla(int a, int x, int y)
{
return (a & x) || (a & y);
}
isn't transformed to the equivalent of
int blabla(int a, int x, int y)
{
return !!(a & (x | y));
}
This _is_ handled for constant x, y though.
Segher
--
segher at kernel dot crashing dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |segher at kernel dot
| |crashing dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35306
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/35306] Missing expression simplication for conditional OR
2008-02-23 5:16 [Bug middle-end/35306] New: Missing expression simplication for conditional OR xinliangli at gmail dot com
2008-02-23 19:51 ` [Bug middle-end/35306] " segher at kernel dot crashing dot org
@ 2008-02-24 0:37 ` xinliangli at gmail dot com
2008-02-24 22:19 ` rguenth at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: xinliangli at gmail dot com @ 2008-02-24 0:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from xinliangli at gmail dot com 2008-02-24 00:36 -------
(In reply to comment #1)
> (In reply to comment #0)
> > The following rule is not handled by GCC
> >
> > (a & x) || (a & y) ===> a & (x | y)
>
> Perhaps that is because those two expressions aren't equivalent?
>
> But, confirmed, assuming you meant to say that
>
> int bla(int a, int x, int y)
> {
> return (a & x) || (a & y);
> }
>
> isn't transformed to the equivalent of
>
> int blabla(int a, int x, int y)
> {
> return !!(a & (x | y));
> }
>
> This _is_ handled for constant x, y though.
>
>
> Segher
>
Right --- missing context in bug report.
(a&x) || (a&y) ==> (a&(x|y) != 0)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35306
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/35306] Missing expression simplication for conditional OR
2008-02-23 5:16 [Bug middle-end/35306] New: Missing expression simplication for conditional OR xinliangli at gmail dot com
2008-02-23 19:51 ` [Bug middle-end/35306] " segher at kernel dot crashing dot org
2008-02-24 0:37 ` xinliangli at gmail dot com
@ 2008-02-24 22:19 ` rguenth at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-24 22:19 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |missed-optimization
Last reconfirmed|0000-00-00 00:00:00 |2008-02-24 22:18:42
date| |
Version|unknown |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35306
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-24 22:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-23 5:16 [Bug middle-end/35306] New: Missing expression simplication for conditional OR xinliangli at gmail dot com
2008-02-23 19:51 ` [Bug middle-end/35306] " segher at kernel dot crashing dot org
2008-02-24 0:37 ` xinliangli at gmail dot com
2008-02-24 22:19 ` rguenth 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).