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

--- Comment #25 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to H.J. Lu from comment #23)

> We need to move those special SSE SF->DF splitters before

No, this splitter will fail if the transformation doesn't result in a constant.
So, we actually want this splitter first, to try to transform a memory load to
a constant load, and moving others before this one would be harmful.

> (define_split
>   [(set (match_operand 0 "any_fp_register_operand")
>         (float_extend (match_operand 1 "memory_operand")))]
>   "reload_completed
>    && (GET_MODE (operands[0]) == TFmode
>        || GET_MODE (operands[0]) == XFmode
>        || GET_MODE (operands[0]) == DFmode)"
>   [(set (match_dup 0) (match_dup 2))]
> {
>   operands[2] = find_constant_src (curr_insn);
> 
>   if (operands[2] == NULL_RTX
>       || (SSE_REGNO_P (REGNO (operands[0]))
>           && standard_sse_constant_p (operands[2],
>                                       GET_MODE (operands[0])) != 1)
>       || (STACK_REGNO_P (REGNO (operands[0]))
>            && standard_80387_constant_p (operands[2]) < 1))
>     FAIL;
> })

Reply via email to