rs6000.md (ctr<mode>): Make this a parameterized name.
authorSegher Boessenkool <segher@kernel.crashing.org>
Mon, 1 Jul 2019 18:39:13 +0000 (20:39 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Mon, 1 Jul 2019 18:39:13 +0000 (20:39 +0200)
@ctr<mode>

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

From-SVN: r272899

gcc/ChangeLog
gcc/config/rs6000/rs6000.md

index 71f9c59f3e32af26fbe0e89bbacc9c3f05f8a785..5da03c3a89f4c791990c124c48ad1a9c11967469 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2019-07-01  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * config/rs6000/rs6000.md (indirect_jump<mode>_nospec): Make this a
index d70362eb3815dde3141cd12ba89c3ca859a40452..56f5350210db8a8e47e96f77d39a20baa03cd29a 100644 (file)
    (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))