public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/53806] New: Missed optimization (a<=b)&&(a>=b) with trapping
@ 2012-06-29 12:39 glisse at gcc dot gnu.org
2021-07-20 7:18 ` [Bug tree-optimization/53806] " pinskia at gcc dot gnu.org
2023-08-04 22:34 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-06-29 12:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53806
Bug #: 53806
Summary: Missed optimization (a<=b)&&(a>=b) with trapping
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: glisse@gcc.gnu.org
Hello,
int f(double a,double b){
if(a>=b) if(a<=b) return 1;
return 0;
}
is optimized to:
if(a==b) return 1;
only if I specify the flag -fno-trapping-math, not by default.
The test in combine_comparisons checks for any change in trapping behavior,
whereas according to PR tree-optimization/53805 we are allowed to remove traps,
just not add new ones (as would happen with ORD && UNLT -> LT for instance).
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/53806] Missed optimization (a<=b)&&(a>=b) with trapping
2012-06-29 12:39 [Bug tree-optimization/53806] New: Missed optimization (a<=b)&&(a>=b) with trapping glisse at gcc dot gnu.org
@ 2021-07-20 7:18 ` pinskia at gcc dot gnu.org
2023-08-04 22:34 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-20 7:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53806
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Severity|normal |enhancement
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/53806] Missed optimization (a<=b)&&(a>=b) with trapping
2012-06-29 12:39 [Bug tree-optimization/53806] New: Missed optimization (a<=b)&&(a>=b) with trapping glisse at gcc dot gnu.org
2021-07-20 7:18 ` [Bug tree-optimization/53806] " pinskia at gcc dot gnu.org
@ 2023-08-04 22:34 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-04 22:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53806
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=91425
Last reconfirmed| |2023-08-04
Status|UNCONFIRMED |NEW
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. very much related to PR 91425.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-04 22:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-29 12:39 [Bug tree-optimization/53806] New: Missed optimization (a<=b)&&(a>=b) with trapping glisse at gcc dot gnu.org
2021-07-20 7:18 ` [Bug tree-optimization/53806] " pinskia at gcc dot gnu.org
2023-08-04 22:34 ` pinskia at gcc dot gnu.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).