{PATCH] RL78 movdf define expand
diff mbox series

Message ID 000401d3a730$a3c7b780$eb572680$@renesas.com
State New
Headers show
Series
  • {PATCH] RL78 movdf define expand
Related show

Commit Message

Sebastian Perta Feb. 16, 2018, 2:15 p.m. UTC
Hello,

The following patch defines a new expand movdf, it is similar to the movdi
expand which I implemented a while ago.
The usefulness of the patch can be seen easily even on the following test
case where it reduces the code size from 199 bytes to 109 bytes:

long double long_double_add(long double a, long double b)
{
	return a + b;
}

Regression test is OK, tested with the following command:
make -k check-gcc RUNTESTFLAGS=--target_board=rl78-sim

Best Regards,
Sebastian

Patch
diff mbox series

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 257733)
+++ ChangeLog	(working copy)
@@ -1,3 +1,7 @@ 
+2018-02-16  Sebastian Perta  <sebastian.perta@renesas.com>
+
+	* config/rl78/rl78.md (movdf): New define expand.
+
 2018-02-16  Richard Biener  <rguenther@suse.de>
 
 	PR tree-optimization/84417




Index: rl78.md
===================================================================
--- rl78.md	(revision 257733)
+++ rl78.md	(working copy)
@@ -727,6 +727,14 @@ 
   DONE;"
 )
 
+(define_expand "movdf"
+  [(set (match_operand:DF 0 "nonimmediate_operand" "")
+        (match_operand:DF 1 "general_operand" ""))]
+  ""
+  "rl78_split_movdi(operands, DFmode);
+  DONE;"
+)
+
 (define_expand "umindi3"
  [(set (match_operand:DI          0 "nonimmediate_operand" "")
 	(umin:DI (match_operand:DI 1 "general_operand"      "")