]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* config/i386/i386.md (floatunssi<mode>2 expand): Add new
authorkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Aug 2013 12:28:47 +0000 (12:28 +0000)
committerkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Aug 2013 12:28:47 +0000 (12:28 +0000)
        expand for QI/HImode operand to produce more effictive code for
        unsigned char(short) --> float(double) conversion.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201663 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.md

index 21b66d6278f42e706c52c90e818560f9c5247b42..44e964bd54831bc1131fcca9ccfe3d3d916aed8d 100644 (file)
@@ -1,3 +1,9 @@
+2013-08-12  Yuri Rumyantsev  <ysrumyan@gmail.com>
+
+       * config/i386/i386.md (floatunssi<mode>2 expand): Add new
+       expand for QI/HImode operand to produce more effictive code for
+       unsigned char(short) --> float(double) conversion.
+
 2013-08-12  Alexander Monakov  <amonakov@ispras.ru>
 
        * doc/invoke.texi: Mention that -ftls-model does not force the final
index 84515ae56f2faa02825c7b6dd4f0413bf5a65e9d..b8788746d263145a9ff595896a89b5b36f6b8065 100644 (file)
    && 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
+         (match_operand:SWI12 1 "nonimmediate_operand")))]
+  "!TARGET_64BIT
+   && SSE_FLOAT_MODE_P (<X87MODEF: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]));
+  DONE;
+})
+
 ;; Avoid store forwarding (partial memory) stall penalty by extending
 ;; SImode value to DImode through XMM register instead of pushing two
 ;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES_TO_VEC