Patchwork Fwd: [x86, PATCH] More effecient code for short unsigned conversion to float-point.

login
register
mail settings
Submitter Uros Bizjak
Date Aug. 12, 2013, 4:21 p.m.
Message ID <CAFULd4amPThGjG=3tBY-CFFHv23QwMWax7BXc46p1CmX_9v4gw@mail.gmail.com>
Download mbox | patch
Permalink /patch/266567/
State New
Headers show

Comments

Uros Bizjak - Aug. 12, 2013, 4:21 p.m.
On Mon, Aug 12, 2013 at 2:31 PM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
>
> part of the thread was accidentally removed from gcc-patches.
>
> I've comitted Yuri's patch into ML: http://gcc.gnu.org/ml/gcc-cvs/2013-08/msg00272.html
>
> As far as discussion was out of ML - feel free to object.

I have changed X87MODEF mode iterator to MODEF, since SSE_FLOAT_MODE_P
is always false for XFmode.

2013-08-12  Uros Bizjak  <ubizjak@gmail.com>

    * config/i386/i386.md (floatunssi<mode>2 expand): Use MODEF mode
    iterator instead of X87MODEF.

Tested on x86_64-pc-linux-gnu {,-m32}, will be committed to mainline SVN.

Uros.

Patch

Index: i386.md
===================================================================
--- i386.md     (revision 201665)
+++ i386.md     (working copy)
@@ -5037,15 +5037,15 @@ 
    && reload_completed"
   [(set (match_dup 0) (float:X87MODEF (match_dup 1)))])

-(define_expand "floatuns<SWI12:mode><X87MODEF:mode>2"
-  [(set (match_operand:X87MODEF 0 "register_operand")
-       (unsigned_float:X87MODEF
+(define_expand "floatuns<SWI12:mode><MODEF:mode>2"
+  [(set (match_operand:MODEF 0 "register_operand")
+       (unsigned_float:MODEF
          (match_operand:SWI12 1 "nonimmediate_operand")))]
   "!TARGET_64BIT
-   && SSE_FLOAT_MODE_P (<X87MODEF:MODE>mode) && TARGET_SSE_MATH"
+   && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH"
 {
   operands[1] = convert_to_mode (SImode, operands[1], 1);
-  emit_insn (gen_floatsi<X87MODEF:mode>2 (operands[0], operands[1]));
+  emit_insn (gen_floatsi<MODEF:mode>2 (operands[0], operands[1]));
   DONE;
 })