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

Uros Bizjak ubizjak@gmail.com
Mon Aug 12 16:21:00 GMT 2013


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.

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;
 })



More information about the Gcc-patches mailing list