https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90248

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50024
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50024&action=edit
gcc11-pr90248.patch

So, I think at minimum we want this, i.e. turn the bogus simplifications into
simplifications directly into +-abs if the conditions are multiplied by X.
That should work fine even for +/-0.0, except that it perhaps could get the
sign of zero wrong (which is why I've kept it guarded on !HONOR_SIGNED_ZEROS).
Additionally, we can consider (phiopt?) optimization that will optimize the VCE
to signed int ? const : -const into copysign.
  • [Bug middle-end/90248] [8/9/10/... jakub at gcc dot gnu.org via Gcc-bugs

Reply via email to