From: kyukhin Date: Mon, 12 Aug 2013 12:28:47 +0000 (+0000) Subject: * config/i386/i386.md (floatunssi2 expand): Add new X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=48fe51c0877c703dbd3e85f99edfca131da6984f;p=thirdparty%2Fgcc.git * config/i386/i386.md (floatunssi2 expand): Add new 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 21b66d6278f4..44e964bd5483 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-08-12 Yuri Rumyantsev + + * config/i386/i386.md (floatunssi2 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 * doc/invoke.texi: Mention that -ftls-model does not force the final diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 84515ae56f2f..b8788746d263 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -5037,6 +5037,18 @@ && reload_completed" [(set (match_dup 0) (float:X87MODEF (match_dup 1)))]) +(define_expand "floatuns2" + [(set (match_operand:X87MODEF 0 "register_operand") + (unsigned_float:X87MODEF + (match_operand:SWI12 1 "nonimmediate_operand")))] + "!TARGET_64BIT + && SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH" +{ + operands[1] = convert_to_mode (SImode, operands[1], 1); + emit_insn (gen_floatsi2 (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