[Bug c++/108873] Using the C++ front-end causes no DCE from happening
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 21 16:34:09 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108873
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |c++
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
For the C++ front-end:
The statement/expression:
**e == 0;
Is not emitted to the gimple, meaning the following statements are not added:
e.0_1 = e;
_2 = *e.0_1;
_3 = *_2;
Which means evpr does see the above and then optimizing:
_8 = _2 != 0B;
as _2 cannot be a null ptr.
More information about the Gcc-bugs
mailing list