aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorYuri Rumyantsev <ysrumyan@gmail.com>2013-08-12 12:28:47 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2013-08-12 12:28:47 +0000
commit15dd8b3a8cafc3a3238b6e773b1bb2be69fc1bac (patch)
tree0f30bd565ba3195c6e1413da339b4584e77445dc /gcc
parent94109a6a3a769c33b3f26c1eafd3b80ef7bf1f07 (diff)
downloadgcc-15dd8b3a8cafc3a3238b6e773b1bb2be69fc1bac.zip
gcc-15dd8b3a8cafc3a3238b6e773b1bb2be69fc1bac.tar.gz
gcc-15dd8b3a8cafc3a3238b6e773b1bb2be69fc1bac.tar.bz2
i386.md (floatunssi<mode>2 expand): Add new expand for QI/HImode operand to produce more effictive code for...
* 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. From-SVN: r201663
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.md12
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 21b66d6..44e964b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 84515ae..b878874 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 "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