Hello! These are not needed, an explicit no-op float-extend will be emitted. The extension degrades to an ordinary move or a no-op in regstack pass, resulting in exactly the same assembly.
2018-10-03 Uros Bizjak <ubiz...@gmail.com> * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove. (*<absneg:code>extend<mode>xf2): Ditto. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Committed to mainline SVN. Uros.
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 367e9bfe255b..7a85b464f7aa 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -920,7 +920,7 @@ (define_code_iterator absneg [abs neg]) ;; Base name for x87 insn mnemonic. -(define_code_attr absneg_mnemonic [(abs "abs") (neg "chs")]) +(define_code_attr absneg_mnemonic [(abs "fabs") (neg "fchs")]) ;; Used in signed and unsigned widening multiplications. (define_code_iterator any_extend [sign_extend zero_extend]) @@ -9796,28 +9796,10 @@ "TARGET_80387 && (reload_completed || !(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))" - "f<absneg_mnemonic>" + "<absneg_mnemonic>" [(set_attr "type" "fsgn") (set_attr "mode" "<MODE>")]) -(define_insn "*<code>extendsfdf2" - [(set (match_operand:DF 0 "register_operand" "=f") - (absneg:DF (float_extend:DF - (match_operand:SF 1 "register_operand" "0"))))] - "TARGET_80387 && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)" - "f<absneg_mnemonic>" - [(set_attr "type" "fsgn") - (set_attr "mode" "DF")]) - -(define_insn "*<code>extend<mode>xf2" - [(set (match_operand:XF 0 "register_operand" "=f") - (absneg:XF (float_extend:XF - (match_operand:MODEF 1 "register_operand" "0"))))] - "TARGET_80387" - "f<absneg_mnemonic>" - [(set_attr "type" "fsgn") - (set_attr "mode" "XF")]) - ;; Copysign instructions (define_mode_iterator CSGNMODE [SF DF TF])