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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
                 CC|                            |pinskia at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
      Known to work|                            |7.3.1
      Known to fail|                            |8.1.0, 9.0

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
(for cmp (gt ge lt le)
     outp (convert convert negate negate)
     outn (negate negate convert convert)
 /* Transform (X > 0.0 ? 1.0 : -1.0) into copysign(1, X). */
 /* Transform (X >= 0.0 ? 1.0 : -1.0) into copysign(1, X). */
 /* Transform (X < 0.0 ? 1.0 : -1.0) into copysign(1,-X). */
 /* Transform (X <= 0.0 ? 1.0 : -1.0) into copysign(1,-X). */
 (simplify
  (cond (cmp @0 real_zerop) real_onep@1 real_minus_onep)
  (if (!HONOR_NANS (type) && !HONOR_SIGNED_ZEROS (type)
       && types_match (type, TREE_TYPE (@0)))
   (switch
    (if (types_match (type, float_type_node))
     (BUILT_IN_COPYSIGNF @1 (outp @0)))
    (if (types_match (type, double_type_node))
     (BUILT_IN_COPYSIGN @1 (outp @0)))
    (if (types_match (type, long_double_type_node))
     (BUILT_IN_COPYSIGNL @1 (outp @0))))))

looks like this one is the culprit.  Similar suspicious symmetry with

 /* Transform (X > 0.0 ? -1.0 : 1.0) into copysign(1,-X). */
 /* Transform (X >= 0.0 ? -1.0 : 1.0) into copysign(1,-X). */
 /* Transform (X < 0.0 ? -1.0 : 1.0) into copysign(1,X). */
 /* Transform (X <= 0.0 ? -1.0 : 1.0) into copysign(1,X). */
 (simplify
  (cond (cmp @0 real_zerop) real_minus_onep real_onep@1)
  (if (!HONOR_NANS (type) && !HONOR_SIGNED_ZEROS (type)
       && types_match (type, TREE_TYPE (@0)))
   (switch
    (if (types_match (type, float_type_node))
     (BUILT_IN_COPYSIGNF @1 (outn @0)))
    (if (types_match (type, double_type_node))
     (BUILT_IN_COPYSIGN @1 (outn @0)))
    (if (types_match (type, long_double_type_node))
     (BUILT_IN_COPYSIGNL @1 (outn @0)))))))

caused by r249704

Reply via email to