[Bug target/97887] [10/11 Regression] Failure to optimize neg plus div to avoid using x87 floating point stack

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 18 13:54:20 GMT 2020


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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Uroš Bizjak from comment #3)
> (In reply to Richard Biener from comment #2)
> > combine first makes recog pick negsf2_i387_1:
> 
> This should have the following insn constraint:
> 
>   "TARGET_80387 && !(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)"
> 
> to hide it from combine in cases where relevant SSE mode is available.

Hmm, it is

;; Changing of sign for FP values is doable using integer unit too.
(define_insn "*<code><mode>2_i387_1"
  [(set (match_operand:X87MODEF 0 "register_operand" "=f,!r")
        (absneg:X87MODEF
          (match_operand:X87MODEF 1 "register_operand" "0,0")))
   (clobber (reg:CC FLAGS_REG))]
  "TARGET_80387"
  "#")

that is not guarded in this way?


More information about the Gcc-bugs mailing list