diff mbox series

[4/4] rs6000: Delete old add+cmp patterns

Message ID d9c11a87d0a81103cb0edae73868412e86a4da98.1534361927.git.segher@kernel.crashing.org
State New
Headers show
Series rs6000: length attribute | expand

Commit Message

Segher Boessenkool Aug. 16, 2018, 5:14 p.m. UTC
There are some patterns that recognise the parallel of an add and a
compare, and split it back to the same two insns.  This apparently
helped RIOS machines before RTL scheduling existed?  Either way, it
isn't helpful anymore, and even hurts a tiny bit.  So, delete it.


2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.md (two unnamed define_insn and define_split):
	Delete.

---
 gcc/config/rs6000/rs6000.md | 45 ---------------------------------------------
 1 file changed, 45 deletions(-)

Comments

Steven Bosscher Aug. 17, 2018, 7:29 a.m. UTC | #1
On Thu, Aug 16, 2018 at 7:14 PM, Segher Boessenkool <> wrote:
> There are some patterns that recognise the parallel of an add and a
> compare, and split it back to the same two insns.  This apparently
> helped RIOS machines before RTL scheduling existed?  Either way, it
> isn't helpful anymore, and even hurts a tiny bit.  So, delete it.

It's been there since r251 (initial revision).

On the topic of archaeology: Perhaps the time also finally has come to
revisit this comment in rs6000.md:

13065; FIXME: This would probably be somewhat simpler if the Cygnus sibcall
13066; stuff was in GCC. <...>

:-)

Ciao!
Steven
Segher Boessenkool Sept. 18, 2018, 5:39 p.m. UTC | #2
On Fri, Aug 17, 2018 at 09:29:01AM +0200, Steven Bosscher wrote:
> On the topic of archaeology: Perhaps the time also finally has come to
> revisit this comment in rs6000.md:
> 
> 13065; FIXME: This would probably be somewhat simpler if the Cygnus sibcall
> 13066; stuff was in GCC. <...>

Done in r264403 now.  I never understood what it was supposed to mean :-)


Segher
diff mbox series

Patch

diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 50c264f..c691952 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -11581,51 +11581,6 @@  (define_peephole2
   operands[10] = GEN_INT (sextc);
 })
 
-;; The following two insns don't exist as single insns, but if we provide
-;; them, we can swap an add and compare, which will enable us to overlap more
-;; of the required delay between a compare and branch.  We generate code for
-;; them by splitting.
-
-(define_insn ""
-  [(set (match_operand:CC 3 "cc_reg_operand" "=y")
-	(compare:CC (match_operand:SI 1 "gpc_reg_operand" "r")
-		    (match_operand:SI 2 "short_cint_operand" "i")))
-   (set (match_operand:SI 0 "gpc_reg_operand" "=r")
-	(plus:SI (match_dup 1) (match_operand:SI 4 "short_cint_operand" "i")))]
-  ""
-  "#"
-  [(set_attr "length" "8")])
-
-(define_insn ""
-  [(set (match_operand:CCUNS 3 "cc_reg_operand" "=y")
-	(compare:CCUNS (match_operand:SI 1 "gpc_reg_operand" "r")
-		       (match_operand:SI 2 "u_short_cint_operand" "i")))
-   (set (match_operand:SI 0 "gpc_reg_operand" "=r")
-	(plus:SI (match_dup 1) (match_operand:SI 4 "short_cint_operand" "i")))]
-  ""
-  "#"
-  [(set_attr "length" "8")])
-
-(define_split
-  [(set (match_operand:CC 3 "cc_reg_operand")
-	(compare:CC (match_operand:SI 1 "gpc_reg_operand")
-		    (match_operand:SI 2 "short_cint_operand")))
-   (set (match_operand:SI 0 "gpc_reg_operand")
-	(plus:SI (match_dup 1) (match_operand:SI 4 "short_cint_operand")))]
-  ""
-  [(set (match_dup 3) (compare:CC (match_dup 1) (match_dup 2)))
-   (set (match_dup 0) (plus:SI (match_dup 1) (match_dup 4)))])
-
-(define_split
-  [(set (match_operand:CCUNS 3 "cc_reg_operand")
-	(compare:CCUNS (match_operand:SI 1 "gpc_reg_operand")
-		       (match_operand:SI 2 "u_short_cint_operand")))
-   (set (match_operand:SI 0 "gpc_reg_operand")
-	(plus:SI (match_dup 1) (match_operand:SI 4 "short_cint_operand")))]
-  ""
-  [(set (match_dup 3) (compare:CCUNS (match_dup 1) (match_dup 2)))
-   (set (match_dup 0) (plus:SI (match_dup 1) (match_dup 4)))])
-
 ;; Only need to compare second words if first words equal
 (define_insn "*cmp<mode>_internal1"
   [(set (match_operand:CCFP 0 "cc_reg_operand" "=y")