https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42046
Michael Bruck changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42046
--- Comment #3 from Marc Glisse ---
(a?b|1:b&~1) could also be turned into (b&~1)+(a!=0) or (b|1)-(a==0) (or with ^
instead of +-, or | instead of +, etc) but it is quite possible that none of
those are a win.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42046
Andrew Pinski changed:
What|Removed |Added
Summary|missed optimization |missed optimization
|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42046
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
--- Comment #2 from rguenth at gcc dot gnu dot org 2009-11-15 14:27 ---
This is the usual missing code-hoisting optimization. Dup is PR.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42046
--- Comment #1 from pinskia at gcc dot gnu dot org 2009-11-15 04:08 ---
Here is an example which also happens on x86 so this is not target specific:
int var;
int g(int);
int foo(int enable, int t, int tt)
{
if (enable)
var |= 1;
else
var &= ~1;
return g(va