public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work122-vpair)] Update ChangeLog.meissner
@ 2023-06-17  1:56 Michael Meissner
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Meissner @ 2023-06-17  1:56 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:514f68301be739472a256c79b84a110ad9308209

commit 514f68301be739472a256c79b84a110ad9308209
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Fri Jun 16 21:56:44 2023 -0400

    Update ChangeLog.meissner

Diff:
---
 gcc/ChangeLog.meissner | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner
index 91a5ad679d3..f2e883ebe55 100644
--- a/gcc/ChangeLog.meissner
+++ b/gcc/ChangeLog.meissner
@@ -1,3 +1,16 @@
+==================== Branch work122-vpair, patch #44 ====================
+
+Simplify making overloaded fp built-in functions.
+
+2023-06-16   Michael Meissner  <meissner@linux.ibm.com>
+
+gcc/
+
+	* config/rs6000/rs6000-builtin.cc (fold_builtin_overload_fp): New helper
+	function.
+	(rs6000_gimple_fold_builtin): Move common code for built-in overloaded
+	floating point functions  into fold_builtin_overload_fp.
+
 ==================== Branch work122-vpair, patch #43 ====================
 
 Optimize vector pair negation with abs and fma.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/meissner/heads/work122-vpair)] Update ChangeLog.meissner
@ 2023-06-16 22:46 Michael Meissner
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Meissner @ 2023-06-16 22:46 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:141d5656c5ad6f4266cc1b611a5b39f3e107050e

commit 141d5656c5ad6f4266cc1b611a5b39f3e107050e
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Fri Jun 16 18:46:25 2023 -0400

    Update ChangeLog.meissner

Diff:
---
 gcc/ChangeLog.meissner | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner
index 482734cc78f..91a5ad679d3 100644
--- a/gcc/ChangeLog.meissner
+++ b/gcc/ChangeLog.meissner
@@ -1,3 +1,19 @@
+==================== Branch work122-vpair, patch #43 ====================
+
+Optimize vector pair negation with abs and fma.
+
+2023-06-16   Michael Meissner  <meissner@linux.ibm.com>
+
+gcc/
+
+	* config/rs6000/mma.md (UNSPEC_PAIR_NEG): New iterator.
+	(pairabs): New mode attribute.
+	(pairfma): Likewise.
+	(vpair_NABS_<pairmode>): New insns.
+	(vpair_FMS_<pairmode>): Likewise.
+	(vpair_NFMA_<pairmode>): Likewise.
+	(vpair_NFMS_<pairmode>): Likewise.
+
 ==================== Branch work122-vpair, patch #42 ====================
 
 Add negate support.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/meissner/heads/work122-vpair)] Update ChangeLog.meissner
@ 2023-06-16 21:16 Michael Meissner
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Meissner @ 2023-06-16 21:16 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:5c85daded5bf5da910d9463d860e29fde3dd4545

commit 5c85daded5bf5da910d9463d860e29fde3dd4545
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Fri Jun 16 17:16:07 2023 -0400

    Update ChangeLog.meissner

Diff:
---
 gcc/ChangeLog.meissner | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner
index d6dce88063a..482734cc78f 100644
--- a/gcc/ChangeLog.meissner
+++ b/gcc/ChangeLog.meissner
@@ -1,3 +1,29 @@
+==================== Branch work122-vpair, patch #42 ====================
+
+Add negate support.
+
+2023-06-16   Michael Meissner  <meissner@linux.ibm.com>
+
+gcc/
+
+	* config/rs6000/mma.md (UNSPEC_PAIR_NEG_F32): New unspec.
+	(UNSPEC_PAIR_NEG_F64): Likewise.
+	(UNSPEC_PAIR_1OPS): Add negate operators.
+	(pairop): Likewise.
+	(pairmode): Likewise.
+	* config/rs6000/rs6000-builtin.cc (rs6000_gimple_fold_builtin): Add
+	support for negation.
+	* config/rs6000/rs6000-builtins.def (__builtin_neg_f32_scalar): New
+	built-in function.
+	(__builtin_neg_f32_vector): Likewise.
+	(__builtin_neg_f32_vpair): Likewise.
+	(__builtin_neg_f64_scalar): Likewise.
+	(__builtin_neg_f64_vector): Likewise.
+	(__builtin_neg_f64_vpair): Likewise.
+	* config/rs6000/rs6000-overload.def (__builtin_neg_f32): New overloaded
+	built-in functions.
+	(__builtin_neg_f64): Likewise.
+
 ==================== Branch work122-vpair, patch #41 ====================
 
 Combine define_insn and define_split

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/meissner/heads/work122-vpair)] Update ChangeLog.meissner
@ 2023-06-16 18:56 Michael Meissner
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Meissner @ 2023-06-16 18:56 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7c18ae6dcbbfab78f192303808d0b3c5c23b908f

commit 7c18ae6dcbbfab78f192303808d0b3c5c23b908f
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Fri Jun 16 14:56:31 2023 -0400

    Update ChangeLog.meissner

Diff:
---
 gcc/ChangeLog.meissner | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner
index 7d02f026fb8..d6dce88063a 100644
--- a/gcc/ChangeLog.meissner
+++ b/gcc/ChangeLog.meissner
@@ -8,7 +8,7 @@ gcc/
 
 	* config/rs6000/mma.md (vpair_<pairop>_<pairmode>): Combine define_insns
 	and splitters into define_insn_and_split.  Set insn length.
-	(vpair_SCALE_<pairmode>): New insn.
+	(vpair_SCALE_<pairmode>): Likewise.
 
 ==================== Branch work122-vpair, patch #40 ====================

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/meissner/heads/work122-vpair)] Update ChangeLog.meissner
@ 2023-06-16 18:00 Michael Meissner
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Meissner @ 2023-06-16 18:00 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:067976b85b21c76e2272cb5086d8a4cb540101f6

commit 067976b85b21c76e2272cb5086d8a4cb540101f6
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Fri Jun 16 14:00:50 2023 -0400

    Update ChangeLog.meissner

Diff:
---
 gcc/ChangeLog.meissner | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner
index 8d9247ae951..7d02f026fb8 100644
--- a/gcc/ChangeLog.meissner
+++ b/gcc/ChangeLog.meissner
@@ -1,3 +1,15 @@
+==================== Branch work122-vpair, patch #41 ====================
+
+Combine define_insn and define_split
+
+2023-06-16   Michael Meissner  <meissner@linux.ibm.com>
+
+gcc/
+
+	* config/rs6000/mma.md (vpair_<pairop>_<pairmode>): Combine define_insns
+	and splitters into define_insn_and_split.  Set insn length.
+	(vpair_SCALE_<pairmode>): New insn.
+
 ==================== Branch work122-vpair, patch #40 ====================
 
 Initial vector pair arithmetic support.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/meissner/heads/work122-vpair)] Update ChangeLog.meissner
@ 2023-06-16 16:25 Michael Meissner
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Meissner @ 2023-06-16 16:25 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:1be053ced6ca837b33a9a805e844bf66929cbe6a

commit 1be053ced6ca837b33a9a805e844bf66929cbe6a
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Fri Jun 16 12:25:19 2023 -0400

    Update ChangeLog.meissner

Diff:
---
 gcc/ChangeLog.meissner | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner
index cce8ad925b4..8d9247ae951 100644
--- a/gcc/ChangeLog.meissner
+++ b/gcc/ChangeLog.meissner
@@ -1,3 +1,73 @@
+==================== Branch work122-vpair, patch #40 ====================
+
+Initial vector pair arithmetic support.
+
+2023-06-16   Peter Bergner  <bergner@linux.ibm.com>
+             Michael Meissner  <meissner@linux.ibm.com>
+
+gcc/
+
+	* config/rs6000/mma.md (UNSPEC_PAIR_ABS_F32): New unspec.
+	(UNSPEC_PAIR_ABS_F64): Likewise.
+	(UNSPEC_PAIR_ADD_F32): Likewise.
+	(UNSPEC_PAIR_ADD_F64): Likewise.
+	(UNSPEC_PAIR_FMA_F32): Likewise.
+	(UNSPEC_PAIR_FMA_F64): Likewise.
+	(UNSPEC_PAIR_MULT_F32): Likewise.
+	(UNSPEC_PAIR_MULT_F64): Likewise.
+	(UNSPEC_PAIR_SCALE_F32): Likewise.
+	(UNSPEC_PAIR_SCALE_F64): Likewise.
+	(UNSPEC_PAIR_SUB_F32): Likewise.
+	(UNSPEC_PAIR_SUB_F64): Likewise.
+	(UNSPEC_PAIR_1OPS): New iterator.
+	(UNSPEC_PAIR_2OPS): Likewise.
+	(UNSPEC_PAIR_3OPS): Likewise.
+	(UNSPEC_PAIR_SCALE): Likewise.
+	(pairop): Likewise.
+	(pairmode): Likewise.
+	(vpair_<pairop>_<pairmode>): New insns for unary, binary, and trinary
+	operations.
+	(vpair_<pairop>_<pairmode> splitter): New splitters.
+	(vpair_SCALE_<pairmode>): New insn.
+	(vpair_SCALE_<pairmode> splitter): New splitter.
+	* config/rs6000/rs6000-builtin.cc (rs6000_gimple_fold_builtin): Add
+	vector pair arithmetic support.
+	* config/rs6000/rs6000-builtins.def (__builtin_abs_f32_scalar): New
+	vector pair arithmetic built-in functions.
+	(__builtin_abs_f64_scalar): Likewise.
+	(__builtin_add_f32_scalar): Likewise.
+	(__builtin_add_f64_scalar): Likewise.
+	(__builtin_mult_f32_scalar): Likewise.
+	(__builtin_mult_f64_scalar): Likewise.
+	(__builtin_reduce_f32_scalar): Likewise.
+	(__builtin_reduce_f64_scalar): Likewise.
+	(__builtin_scale_f32_scalar): Likewise.
+	(__builtin_scale_f64_scalar): Likewise.
+	(__builtin_sub_f32_scalar): Likewise.
+	(__builtin_sub_f64_scalar): Likewise.
+	(__builtin_fma_f32_scalar): Likewise.
+	(__builtin_fma_f64_scalar): Likewise.
+	* config/rs6000/rs6000-call.cc (rs6000_return_in_memory): Allow
+	returning and passing vector pair in calls.
+	(rs6000_function_arg_advance_1): Likewise.
+	(rs6000_function_arg): Likewise.
+	* config/rs6000/rs6000-overload.def (__builtin_abs_f32): Add vector pair
+	arithmetic overload built-in functions.
+	(__builtin_abs_f64): Likewise.
+	(__builtin_add_f32): Likewise.
+	(__builtin_add_f64): Likewise.
+	(__builtin_mult_f32): Likewise.
+	(__builtin_mult_f64): Likewise.
+	(__builtin_reduce_f32): Likewise.
+	(__builtin_reduce_f64): Likewise.
+	(__builtin_scale_f32): Likewise.
+	(__builtin_scale_f64): Likewise.
+	(__builtin_sub_f32): Likewise.
+	(__builtin_sub_f64): Likewise.
+	(__builtin_fma_f32): Likewise.
+	(__builtin_fma_f64): Likewise.
+
+
 ==================== Branch work122-vpair, patch #8 from main patches ====================
 
 Fix power10 fusion and -fstack-protector, PR target/105325

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/meissner/heads/work122-vpair)] Update ChangeLog.meissner.
@ 2023-06-14 21:10 Michael Meissner
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Meissner @ 2023-06-14 21:10 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3573e810c75efb9a8113b6eef6562148c64f2cd6

commit 3573e810c75efb9a8113b6eef6562148c64f2cd6
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Wed Jun 14 17:10:01 2023 -0400

    Update ChangeLog.meissner.

Diff:
---
 gcc/ChangeLog.meissner | 124 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 124 insertions(+)

diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner
index 20cb5c2a6c7..cce8ad925b4 100644
--- a/gcc/ChangeLog.meissner
+++ b/gcc/ChangeLog.meissner
@@ -1,3 +1,127 @@
+==================== Branch work122-vpair, patch #8 from main patches ====================
+
+Fix power10 fusion and -fstack-protector, PR target/105325
+
+This patch fixes an issue where if you use the -fstack-protector and
+-mcpu=power10 options and you have a large stack frame, the GCC compiler will
+generate a LWA instruction with a large offset.
+
+The important thing in the bug is that -fstack-protector is used, but it could
+potentially happen with fused load-compare to any stack location when the stack
+frame is larger than 32K without -fstack-protector.
+
+Here is the initial fused initial insn that was created.  It refers to the
+stack location based off of the virtrual frame pointer:
+
+(insn 6 5 7 2 (parallel [
+            (set (reg:CC 119)
+                 (compare:CC (mem/c:SI (plus:DI (reg/f:DI 110 sfp)
+                                                (const_int -4))
+                             (const_int 0 [0])))
+            (clobber (scratch:DI))
+        ])
+     (nil))
+
+After the stack size is finalized, the frame pointer removed, and the post
+reload phase is run, the insn is now:
+
+(insn 6 5 7 2 (parallel [
+            (set (reg:CC 100 0 [119])
+                 (compare:CC (mem/c:SI (plus:DI (reg/f:DI 1 1)
+                                                (const_int 40044))
+                             (const_int 0 [0])))
+            (clobber (reg:DI 9 9 [120]))
+        ])
+     (nil))
+
+When the split2 pass is run after reload has finished the ds_form_mem_operand
+predicate that was used for lwa and ld no longer returns true.  This means that
+since the operand predicates aren't recognized, it won't be split.  Thus, it
+goes all of the way to final.  The automatic prefix instruction support was not
+run because the type was changed from "load" to "fused_load_cmpi".  This meant
+that it was assume that the insn was only 8 bytes, and that we did not need to
+prefer the lwa with a 'p'.
+
+The solution involves:
+
+    1)	Don't use ds_form_mem_operand for ld and lwa, always use
+	non_update_memory_operand.
+
+    2)	Delete ds_form_mem_operand since it is no longer used.
+
+    3)	Use the "YZ" constraints for ld/lwa instead of "m".
+
+    4)	If we don't need to sign extend the lwa, convert it to lwz, and use
+	cmpwi instead of cmpdi.  Adjust the insn name to reflect the code
+	generate.
+
+    5)	Insure that the insn using lwa will be recognized as having a prefixed
+	operand (and hence the instruction length is 16 bytes instead of 8
+	bytes).
+
+	5a) Set the prefixed and maybe_prefix attributes to know that
+	    fused_load_cmpi are also load insns;
+
+	5b) In the case where we are just setting CC and not using the memory
+	    afterward, set the clobber to use a DI register, and put an
+	    explicit sign_extend operation in the split;
+
+	5c) Set the sign_extend attribute to "yes".
+
+	5d) 5a-5c are the things that prefixed_load_p in rs6000.cc checks to
+	    ensure that lwa is treated as a ds-form instruction and not as
+	    a d-form instruction (i.e. lwz).
+
+    6)	Add a new test case for this case.
+
+    7)	Adjust the insn counts in fusion-p10-ldcmpi.c.  Because we are no
+	longer using ds_form_mem_operand, the ld and lwa instructions will fuse
+	x-form (reg+reg) addresses in addition ds-form (reg+offset or reg).
+
+I have built bootstrap compilers and tested them on the following environments.
+There were no regressions in any of the runs.
+
+	Little endian power10, long double is IBM 128-bit
+	Little endian power9, long double is IBM 128-bit
+	Little endian power9, long double is IEEE 128-bit
+	Big endian power8, long double is IBM 128-bit (32/64-bit tests run)
+
+Can I check this patch into the master GCC branch?  After a waiting period, once
+the previous changes to genfusion.pl are checked in, can I install this patch in
+previous GCC compilers?
+
+2023-06-12   Michael Meissner  <meissner@linux.ibm.com>
+
+gcc/
+
+	* config/rs6000/genfusion.pl (gen_ld_cmpi_p10_one): Fix problems that
+	allowed prefixed lwa to be generated.
+	* config/rs6000/fusion.md: Regenerate.
+	* config/rs6000/predicates.md (ds_form_mem_operand): Delete.
+	* config/rs6000/rs6000.md (prefixed attribute): Add support for load
+	plus compare immediate fused insns.
+	(maybe_prefixed): Likewise.
+
+gcc/testsuite/
+
+	* g++.target/powerpc/pr105325.C: New test.
+	* gcc/testsuite/gcc.target/powerpc/fusion-p10-ldcmpi.c: Update insn
+	counts.
+
+==================== Branch work122-vpair, patch #7 from main patches was reverted ====================
+
+==================== Branch work122-vpair, patch #6 from main patches was reverted ====================
+
+==================== Branch work122-vpair, patch #5 from main patches was reverted ====================
+
+==================== Branch work122-vpair, patch #4 from main patches was reverted ====================
+
+==================== Branch work122-vpair, patch #3 from main patches was reverted ====================
+
+==================== Branch work122-vpair, patch #2 from main patches was reverted ====================
+
+==================== Branch work122-vpair, patch #1 from main patches was reverted ====================
+
 ==================== Branch work122-vpair, baseline ====================
 
 2023-06-06   Michael Meissner  <meissner@linux.ibm.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-06-17  1:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-17  1:56 [gcc(refs/users/meissner/heads/work122-vpair)] Update ChangeLog.meissner Michael Meissner
  -- strict thread matches above, loose matches on Subject: below --
2023-06-16 22:46 Michael Meissner
2023-06-16 21:16 Michael Meissner
2023-06-16 18:56 Michael Meissner
2023-06-16 18:00 Michael Meissner
2023-06-16 16:25 Michael Meissner
2023-06-14 21:10 Michael Meissner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).