[05/12] @ctr<mode>

Message ID 939e6496f4a5a85bd007b6e78fdf9b9cb0919330.1561994239.git.segher@kernel.crashing.org
State New
Headers show
Series
  • rs6000: Use parameterised names
Related show

Commit Message

Segher Boessenkool July 1, 2019, 5:59 p.m.
2019-07-01  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.md (ctr<mode>): Make this a parameterized name.
	(doloop_end): Use that name.  Simplify.

---
 gcc/config/rs6000/rs6000.md | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

-- 
1.8.3.1

Patch

diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index d665316..381f140 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -12566,22 +12566,14 @@  (define_expand "doloop_end"
    (use (match_operand 1))]	; label
   ""
 {
-  if (TARGET_64BIT)
-    {
-      if (GET_MODE (operands[0]) != DImode)
-	FAIL;
-      emit_jump_insn (gen_ctrdi (operands[0], operands[1]));
-    }
-  else
-    {
-      if (GET_MODE (operands[0]) != SImode)
-	FAIL;
-      emit_jump_insn (gen_ctrsi (operands[0], operands[1]));
-    }
+  if (GET_MODE (operands[0]) != Pmode)
+    FAIL;
+
+  emit_jump_insn (gen_ctr (Pmode, operands[0], operands[1]));
   DONE;
 })
 
-(define_expand "ctr<mode>"
+(define_expand "@ctr<mode>"
   [(parallel [(set (pc)
 		   (if_then_else (ne (match_operand:P 0 "register_operand")
 				     (const_int 1))