https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804
Alexander Monakov changed:
What|Removed |Added
CC||amonakov at gcc dot gnu.org
--- Com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804
Richard Biener changed:
What|Removed |Added
Keywords||missed-optimization
--- Comment #7 fro
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804
Andrew Pinski changed:
What|Removed |Added
Severity|normal |enhancement
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804
--- Comment #6 from Andrew Pinski ---
I think there is another bug report about:
if (_1 > _2)
goto ; [50.00%]
else
goto ; [50.00%]
[local count: 536870913]:
_3 = _1 + 1;
*a_7(D) = _3;
goto ; [100.00%]
[local count: 5368
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804
--- Comment #5 from Andrew Pinski ---
Reference case:
[local count: 1073741824]:
_1 = *a_7(D);
_2 = *b_8(D);
if (_1 > _2)
goto ; [50.00%]
else
goto ; [50.00%]
[local count: 536870913]:
_3 = _1 + 1;
*a_7(D) = _3;
goto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804
--- Comment #4 from Andrew Pinski ---
(In reply to anthony.mikh from comment #3)
> (In reply to Andrew Pinski from comment #2)
> > Clang use of cmov also might produce worse code
>
> That's exactly why I wrote "seemingly worse". However, the ap
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804
--- Comment #3 from anthony.mikh at yandex dot ru ---
(In reply to Andrew Pinski from comment #2)
> Clang use of cmov also might produce worse code
That's exactly why I wrote "seemingly worse". However, the approach used by
clang uses less regis
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804
--- Comment #2 from Andrew Pinski ---
Clang use of cmov also might produce worse code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804
--- Comment #1 from Andrew Pinski ---
Note this code gen is a microbenchmarking and might not make a real difference
if the function is inlined or even part of some bigger code.