From 80c0adc635c392856f1a5ef0d89d8dd62ac960c1 Mon Sep 17 00:00:00 2001
From: Sebastian Pop <sebastian.pop@amd.com>
Date: Fri, 4 Dec 2009 05:26:27 +0000
Subject: [PATCH] Remove unused operand.

2009-12-02  Sebastian Pop  <sebastian.pop@amd.com>

	* config/i386/i386.c (ix86_expand_fma4_multiple_memory): Remove unused
	parameter.
	* config/i386/i386-protos.h (ix86_expand_fma4_multiple_memory): Same.
	* config/i386/sse.md: Same.

From-SVN: r154968
---
 gcc/ChangeLog                 |  7 +++++++
 gcc/config/i386/i386-protos.h |  2 +-
 gcc/config/i386/i386.c        |  5 ++---
 gcc/config/i386/sse.md        | 20 ++++++++++----------
 4 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ed5e0c27f519..ceb7ba73c04c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2009-12-02  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* config/i386/i386.c (ix86_expand_fma4_multiple_memory): Remove unused
+	parameter.
+	* config/i386/i386-protos.h (ix86_expand_fma4_multiple_memory): Same.
+	* config/i386/sse.md: Same.
+
 2009-12-03  Richard Guenther  <rguenther@suse.de>
 
 	* cgraphunit.c (assemble_thunk): Use DECL_ASSEMBLER_NAME
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index 1451e799fa60..bb55da16f2f7 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -219,7 +219,7 @@ extern void ix86_expand_vector_extract (bool, rtx, rtx, int);
 extern void ix86_expand_reduc_v4sf (rtx (*)(rtx, rtx, rtx), rtx, rtx);
 
 extern bool ix86_fma4_valid_op_p (rtx [], rtx, int, bool, int, bool);
-extern void ix86_expand_fma4_multiple_memory (rtx [], int, enum machine_mode);
+extern void ix86_expand_fma4_multiple_memory (rtx [], enum machine_mode);
 
 extern void ix86_expand_vec_extract_even_odd (rtx, rtx, rtx, unsigned);
 
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 462f2d55648f..82ec08fce120 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -28962,12 +28962,11 @@ ix86_fma4_valid_op_p (rtx operands[], rtx insn ATTRIBUTE_UNUSED, int num,
 
 void
 ix86_expand_fma4_multiple_memory (rtx operands[],
-				  int num,
 				  enum machine_mode mode)
 {
   rtx op0 = operands[0];
-  if (num != 4
-      || memory_operand (op0, mode)
+
+  if (memory_operand (op0, mode)
       || reg_mentioned_p (op0, operands[1])
       || reg_mentioned_p (op0, operands[2])
       || reg_mentioned_p (op0, operands[3]))
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 08a3b5b5c89a..4899c0ae8e08 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -1731,7 +1731,7 @@
    && !reg_mentioned_p (operands[0], operands[3])"
   [(const_int 0)]
 {
-  ix86_expand_fma4_multiple_memory (operands, 4, <MODE>mode);
+  ix86_expand_fma4_multiple_memory (operands, <MODE>mode);
   emit_insn (gen_fma4_fmadd<mode>4256 (operands[0], operands[1],
 				    operands[2], operands[3]));
   DONE;
@@ -1768,7 +1768,7 @@
    && !reg_mentioned_p (operands[0], operands[3])"
   [(const_int 0)]
 {
-  ix86_expand_fma4_multiple_memory (operands, 4, <MODE>mode);
+  ix86_expand_fma4_multiple_memory (operands, <MODE>mode);
   emit_insn (gen_fma4_fmsub<mode>4256 (operands[0], operands[1],
 				    operands[2], operands[3]));
   DONE;
@@ -1807,7 +1807,7 @@
    && !reg_mentioned_p (operands[0], operands[3])"
   [(const_int 0)]
 {
-  ix86_expand_fma4_multiple_memory (operands, 4, <MODE>mode);
+  ix86_expand_fma4_multiple_memory (operands, <MODE>mode);
   emit_insn (gen_fma4_fnmadd<mode>4256 (operands[0], operands[1],
 				     operands[2], operands[3]));
   DONE;
@@ -1847,7 +1847,7 @@
    && !reg_mentioned_p (operands[0], operands[3])"
   [(const_int 0)]
 {
-  ix86_expand_fma4_multiple_memory (operands, 4, <MODE>mode);
+  ix86_expand_fma4_multiple_memory (operands, <MODE>mode);
   emit_insn (gen_fma4_fnmsub<mode>4256 (operands[0], operands[1],
 				        operands[2], operands[3]));
   DONE;
@@ -1883,7 +1883,7 @@
    && !reg_mentioned_p (operands[0], operands[3])"
   [(const_int 0)]
 {
-  ix86_expand_fma4_multiple_memory (operands, 4, <MODE>mode);
+  ix86_expand_fma4_multiple_memory (operands, <MODE>mode);
   emit_insn (gen_fma4_fmadd<mode>4 (operands[0], operands[1],
 				    operands[2], operands[3]));
   DONE;
@@ -1939,7 +1939,7 @@
    && !reg_mentioned_p (operands[0], operands[3])"
   [(const_int 0)]
 {
-  ix86_expand_fma4_multiple_memory (operands, 4, <MODE>mode);
+  ix86_expand_fma4_multiple_memory (operands, <MODE>mode);
   emit_insn (gen_fma4_fmsub<mode>4 (operands[0], operands[1],
 				    operands[2], operands[3]));
   DONE;
@@ -1997,7 +1997,7 @@
    && !reg_mentioned_p (operands[0], operands[3])"
   [(const_int 0)]
 {
-  ix86_expand_fma4_multiple_memory (operands, 4, <MODE>mode);
+  ix86_expand_fma4_multiple_memory (operands, <MODE>mode);
   emit_insn (gen_fma4_fnmadd<mode>4 (operands[0], operands[1],
 				     operands[2], operands[3]));
   DONE;
@@ -2056,7 +2056,7 @@
    && !reg_mentioned_p (operands[0], operands[3])"
   [(const_int 0)]
 {
-  ix86_expand_fma4_multiple_memory (operands, 4, <MODE>mode);
+  ix86_expand_fma4_multiple_memory (operands, <MODE>mode);
   emit_insn (gen_fma4_fnmsub<mode>4 (operands[0], operands[1],
 				     operands[2], operands[3]));
   DONE;
@@ -10384,7 +10384,7 @@
    && !reg_mentioned_p (operands[0], operands[3])"
   [(const_int 0)]
 {
-  ix86_expand_fma4_multiple_memory (operands, 4, V8HImode);
+  ix86_expand_fma4_multiple_memory (operands, V8HImode);
   emit_insn (gen_xop_pmacsww (operands[0], operands[1], operands[2],
 			      operands[3]));
   DONE;
@@ -10436,7 +10436,7 @@
    && !reg_mentioned_p (operands[0], operands[3])"
   [(const_int 0)]
 {
-  ix86_expand_fma4_multiple_memory (operands, 4, V4SImode);
+  ix86_expand_fma4_multiple_memory (operands, V4SImode);
   emit_insn (gen_xop_pmacsdd (operands[0], operands[1], operands[2],
 			      operands[3]));
   DONE;
-- 
GitLab