[PATCH] rs6000: Builtins test changes for BFP scalar tests

2021-11-17 Thread Bill Schmidt via Gcc-patches
t; overload: __builtin_vec_scalar_test_neg The latter maps to three builtins of the appropriate type. The revised test case uses the "real" overload instead, and otherwise the changes to the error messages are the same as for all the other cases. 2021-11-17 Bill Schmidt gcc/tests

Re: [PATCH] rs6000: Builtins test changes for BFP scalar tests

2021-11-17 Thread Bill Schmidt via Gcc-patches
On 11/17/21 3:32 PM, Segher Boessenkool wrote: > On Wed, Nov 17, 2021 at 02:58:54PM -0600, Bill Schmidt wrote: >> Hi! This patch is broken out of the previous patch for all the builtins test >> suite adjustments. Here we have some slight changes in error messages due to >&

Re: [PATCH] rs6000: Builtins test changes for BFP scalar tests

2021-11-18 Thread Bill Schmidt via Gcc-patches
Hi! On 11/17/21 5:06 PM, Bill Schmidt wrote: > On 11/17/21 3:32 PM, Segher Boessenkool wrote: >> On Wed, Nov 17, 2021 at 02:58:54PM -0600, Bill Schmidt wrote: >>> Hi! This patch is broken out of the previous patch for all the builtins >>> test >>> suite ad

[PATCH] rs6000: Builtins test changes for byte-in-set-2.c

2021-11-18 Thread Bill Schmidt via Gcc-patches
a result. Tested on powerpc64le-linux-gnu and powerpc-linux-gnu (-m32/-m64) with no regressions. Is this okay for trunk? Thanks! Bill 2021-11-17 Bill Schmidt gcc/testsuite/ * gcc.target/powerpc/byte-in-set-2.c: Adjust error message. --- gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c |

[PATCH] rs6000: Builtins test changes for compare-bytes tests

2021-11-18 Thread Bill Schmidt via Gcc-patches
arget" are used. The new support initializes all builtins, and waits until expand time to determine whether or not they are enabled. Besides added flexibility, we also get better error messages as a result. The case for cmpb32-2.c is similar. Tested on powerpc64le-linux-gnu and powerpc64-linux

[PATCH] rs6000: Builtin test changes for int_128bit-runnable.c

2021-11-18 Thread Bill Schmidt via Gcc-patches
x-gnu (-m32/-m64) with no regressions. Is this okay for trunk? Thanks! Bill 2021-11-17 Bill Schmidt gcc/testsuite/ * gcc.target/powerpc/int_128bit-runnable.c: Adjust instruction counts since we do better by not gimple-folding some builtins. --- gcc/testsuite/gcc.target/po

[PATCH] rs6000: Builtins test changes for pr80315-*.c, pr88100.c

2021-11-18 Thread Bill Schmidt via Gcc-patches
owerpc64le-linux-gnu and powerpc64-linux-gnu (-m32/-m64) with no regressions. is this okay for trunk? Thanks! Bill 2021-11-17 Bill Schmidt gcc/testsuite/ * gcc.target/powerpc/pr80315-1.c: Adjust error message. * gcc.target/powerpc/pr80315-2.c: Likewise. *

[PATCH] rs6000: Builtins test changes for pragma_misc9.c

2021-11-18 Thread Bill Schmidt via Gcc-patches
Bill Schmidt gcc/testsuite/ * gcc.target/powerpc/pragma_misc9.c: Adjust error message. --- gcc/testsuite/gcc.target/powerpc/pragma_misc9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/powerpc/pragma_misc9.c b/gcc/testsuite/gcc.target

Re: [PATCH] rs6000: Builtin test changes for int_128bit-runnable.c

2021-11-18 Thread Bill Schmidt via Gcc-patches
Hi! On 11/18/21 10:22 AM, Segher Boessenkool wrote: > On Thu, Nov 18, 2021 at 10:09:53AM -0600, Bill Schmidt wrote: >> Hi!  This patch is broken out from the test case patch for the new builtins >> support. >> >> The old builtins code performs gimple folding on 128-bit

[PATCH] rs6000: Builtins test changes for test_fpscr_[d]rn_builtin_error.c

2021-11-18 Thread Bill Schmidt via Gcc-patches
messages. In particular, some messages are improved because previously they did not admit the possibility that an argument could hold a variable. Tested on powerpc64le-linux-gnu and powerpc64-linux-gnu (-m32/-m64) with no regressions. Is this okay for trunk? Thanks! Bill 2021-11-17 Bill Schmid

Summary of outstanding builtins infrastructure patches

2021-11-18 Thread Bill Schmidt via Gcc-patches
Hi! Thanks for all the recent reviews and conversations on the builtins infrastructure patches. I've posted a lot of stuff in the last couple of days, so I thought it might be useful to summarize which patches still need review. No rush, just trying to make it easier to consume... https://gcc.g

Re: [PATCH] rs6000: Builtins test changes for BFP scalar tests

2021-11-18 Thread Bill Schmidt via Gcc-patches
On 11/18/21 3:16 PM, Segher Boessenkool wrote: > Hi! > > On Wed, Nov 17, 2021 at 05:06:05PM -0600, Bill Schmidt wrote: >>> I don't like that at all. The user didn't write the _vsx thing, and it >>> isn't documented either (neither is the _vec one, but

Re: [PATCH] rs6000: Builtins test changes for BFP scalar tests

2021-11-18 Thread Bill Schmidt via Gcc-patches
Hi! On 11/18/21 3:32 PM, Segher Boessenkool wrote: > On Thu, Nov 18, 2021 at 03:30:48PM -0600, Bill Schmidt wrote: >> On 11/18/21 3:16 PM, Segher Boessenkool wrote: >>> Hi! >>> >>> On Wed, Nov 17, 2021 at 05:06:05PM -0600, Bill Schmidt wrote: >>>>&g

Re: [PATCH 0/3] Add zero cycle move support

2021-11-22 Thread Bill Schmidt via Gcc-patches
Hi! On 11/19/21 8:49 AM, Michael Meissner wrote: > The next set of 3 patches add zero cycle move support to the Power10. Zero > cycle moves are where the move to LR/CTR/TAR register that is adjacent to the > jump to LR/CTR/TAR register can be fused together. > > At the moment, these set of three

Re: [PATCH 2/3] Set power10 fusion if -mtune=power10.

2021-11-22 Thread Bill Schmidt via Gcc-patches
Hi Mike, On 11/19/21 8:55 AM, Michael Meissner wrote: > Set power10 fusion if -mtune=power10. > > In doing the patch for zero cycle moves for switch statements and indirect > jumps, I noticed the fusion support is only done if -mcpu=power10. This > option > enables power10 fusion if we use -mtun

Re: [PATCH 1/3] Add power10 zero cycle moves for switches & indirect jumps

2021-11-22 Thread Bill Schmidt via Gcc-patches
Hi Mike, Thanks for this patch! On 11/19/21 8:53 AM, Michael Meissner wrote: > Add power10 zero cycle moves for switches. > > Power10 will fuse adjacenet 'mtctr' and 'bctr' instructions to form zero > cycle moves. This code exploits this fusion opportunity. > > I have built bootstrapped compiler

[PATCH] rs6000: Clarify overloaded builtin diagnostic

2021-11-23 Thread Bill Schmidt via Gcc-patches
suite, since we don't test for "note" diagnostics anywhere. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill 2021-11-23 Bill Schmidt gcc/ * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builti

[PATCH, committed] rs6000: Fix test_mffsl.c effective target check

2021-11-23 Thread Bill Schmidt via Gcc-patches
Hi! Paul Clarke pointed out to me that I had wrongly used a compile-time check instead of a run-time check in this executable test. This patch fixes that. I also fixed a typo in a string that caught my eye. Tested on powerpc64le-linux-gnu, committed as obvious. Thanks! Bill 2021-11-23 Bill

[PATCH] rs6000: Mirror fix for PR102347 into the new builtins support

2021-12-01 Thread Bill Schmidt via Gcc-patches
-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill 2021-12-01 Bill Schmidt gcc/ PR target/102347 * config/rs6000/rs6000-c.c (rs6000-builtins.h): Stop including. (rs6000-internal.h): Include. (altivec_resolve_new_overloaded_builtin): Mo

Re: [PATCH v2] rs6000: Fix a handful of 32-bit built-in function problems

2021-12-01 Thread Bill Schmidt via Gcc-patches
On 11/16/21 12:56 PM, Bill Schmidt wrote: > Hi! I previously posted [1] to correct some problems with the new builtins > support targeting 32-bit code gen. Based on the discussion, I've made some > adjustments and would like to submit this for consideration. > > We eventuall

[PATCH, PING] rs6000: Builtins test changes for BFP scalar tests

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi! I'd like to ping this patch. Segher had objected to the change in diagnostics, but I hope we've solved that now with the better informational message [1]. Thanks! Bill [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585250.html On 11/17/21 2:58 PM, Bill Schmidt w

[PATCH, PING] rs6000: Builtins test changes for compare-bytes tests

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi!  I'd like to ping this patch. Thanks! Bill On 11/18/21 7:47 AM, Bill Schmidt wrote: > Hi! This patch is broken out from the patch with test suite changes for the > new builtins support. > > With the old builtins support, cmpb-2.c produces: > warning: implicit dec

[PATCH, PING] rs6000: Builtins test changes for pr80315-*.c, pr88100.c

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi!  I'd like to ping this patch. Thanks! Bill On 11/18/21 10:15 AM, Bill Schmidt wrote: > Hi! This patch is broken out from the test case patch for the new > builtins support. > > One advantage of the new builtins support is uniform error messages for > arguments wi

[PATCH, PING] rs6000: Builtins test changes for pragma_misc9.c

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi!  I'd like to ping this patch. Thanks! Bill On 11/18/21 10:18 AM, Bill Schmidt wrote: > Hi! This patch is broken out from the test suite patch for the new > builtins support. This one is just a minor adjustment for the error > message wording. > > Tested on power

[PATCH, PING] rs6000: Builtins test changes for test_fpscr_[d]rn_builtin_error.c

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi!  I'd like to ping this patch. Thanks! Bill On 11/18/21 10:36 AM, Bill Schmidt wrote: > Hi! This is the last patch broken out of the previous test suite patch > for the new builtins support. > > One advantage of the new builtins support is uniform error messages for

Re: [PATCH] rs6000: Mirror fix for PR102347 into the new builtins support

2021-12-01 Thread Bill Schmidt via Gcc-patches
On 12/1/21 11:21 AM, Segher Boessenkool wrote: > Hi! > > On Wed, Dec 01, 2021 at 09:29:42AM -0600, Bill Schmidt wrote: >> Recently Kewen fixed a problem in the old builtins support where >> rs6000_builtin_decl prematurely indicated that a target builtin is >> unavaila

Re: [PATCH v2] rs6000: Fix a handful of 32-bit built-in function problems

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi! On 12/1/21 3:08 PM, Segher Boessenkool wrote: > On Tue, Nov 16, 2021 at 12:56:52PM -0600, Bill Schmidt wrote: >> Hi! I previously posted [1] to correct some problems with the new builtins >> support targeting 32-bit code gen. Based on the discussion, I've made some >

Re: [PATCH] rs6000: Builtins test changes for pr80315-*.c, pr88100.c

2021-12-01 Thread Bill Schmidt via Gcc-patches
Hi! On 12/1/21 4:29 PM, Segher Boessenkool wrote: > On Thu, Nov 18, 2021 at 10:15:21AM -0600, Bill Schmidt wrote: >> Hi! This patch is broken out from the test case patch for the new >> builtins support. >> >> One advantage of the new builtins support is uniform erro

Re: [PATCH] rs6000: Builtins test changes for test_fpscr_[d]rn_builtin_error.c

2021-12-02 Thread Bill Schmidt via Gcc-patches
Hi! On 12/1/21 5:00 PM, Segher Boessenkool wrote: > On Thu, Nov 18, 2021 at 10:36:52AM -0600, Bill Schmidt wrote: >> Hi! This is the last patch broken out of the previous test suite patch >> for the new builtins support. > Whew :-) > >> One advantage of the new builti

[PATCH] rs6000: Fix use of wrong enum for built-in function code.

2021-12-02 Thread Bill Schmidt via Gcc-patches
we're not going to do that anymore, and the remnants of that code will be removed shortly. Regstrap is in progress on powerpc64le-linux-gnu. Assuming no problems, is this okay to commit to trunk? Thanks! Bill 2021-12-02 Bill Schmidt gcc/ * config/rs6000/rs6

Re: [PATCH] rs6000: Fix use of wrong enum for built-in function code.

2021-12-03 Thread Bill Schmidt via Gcc-patches
On 12/3/21 10:26 AM, Segher Boessenkool wrote: > Hi! > > On Thu, Dec 02, 2021 at 04:53:18PM -0600, Bill Schmidt wrote: >> I discovered this bug while working on patches to remove the old built-ins >> infrastructure. I missed a spot in converting from the rs6000_builti

[PATCH 0/6] rs6000: Remove "old" built-in function infrastructure

2021-12-03 Thread Bill Schmidt via Gcc-patches
From: Bill Schmidt Hi! Now that the new built-in function support is all upstream and enabled, it seems safe and prudent to remove the old code to avoid confusion. I broke this up to the extent possible, but the first patch is a bit large and messy because so many dead functions have to be

[PATCH 3/6] rs6000: Rename rs6000-builtin-new.def to rs6000-builtins.def

2021-12-03 Thread Bill Schmidt via Gcc-patches
From: Bill Schmidt Hi! This patch just renames a file and updates the build machinery accordingly. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill 2021-12-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def

[PATCH 5/6] rs6000: Rename functions with "new" in their names

2021-12-03 Thread Bill Schmidt via Gcc-patches
From: Bill Schmidt Hi! While we had two sets of built-in functionality at the same time, I put "new" in the names of quite a few functions. Time to undo that. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill 2021-12-02 Bi

[PATCH 6/6] rs6000: Rename arrays to remove temporary _x suffix

2021-12-03 Thread Bill Schmidt via Gcc-patches
From: Bill Schmidt Hi! While we had two sets of built-in infrastructure at once, I added _x as a suffix to two arrays to disambiguate the old and new versions. Time to fix that also. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill

Re: [PATCH 0/6] rs6000: Remove "old" built-in function infrastructure

2021-12-06 Thread Bill Schmidt via Gcc-patches
I had difficulty with patch 1/6 being too large, and there have been some small upstream changes in this area, so I will resubmit this series shortly. There were also problems with my SMTP server for some of the CCs as well... Sorry for the churn! Bill On 12/3/21 12:22 PM, Bill Schmidt wrote

[PATCH v2 0/6] Remove "old" built-in function infrastructure

2021-12-06 Thread Bill Schmidt via Gcc-patches
functions for AIX, and his fix for that required me to re-spin the patches. I also generated the diff with a more efficient algorithm to reduce the patch size. Otherwise this series is identical to V1. Thanks! Bill Bill Schmidt (6): rs6000: Remove new_builtins_are_live and dead code it was guarding

[PATCH 3/6] rs6000: Rename rs6000-builtin-new.def to rs6000-builtins.def

2021-12-06 Thread Bill Schmidt via Gcc-patches
Hi! This patch just renames a file and updates the build machinery accordingly. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill 2021-12-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Rename to

[PATCH 4/6] rs6000: Remove rs6000-builtin.def and associated data and functions

2021-12-06 Thread Bill Schmidt via Gcc-patches
Hi! The old rs6000-builtin.def file is no longer needed. Remove it and the code that depends on it. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill 2021-12-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin.def: Delete

[PATCH 5/6] rs6000: Rename functions with "new" in their names

2021-12-06 Thread Bill Schmidt via Gcc-patches
Hi! While we had two sets of built-in functionality at the same time, I put "new" in the names of quite a few functions. Time to undo that. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill 2021-12-02 Bill Schm

[PATCH 6/6] rs6000: Rename arrays to remove temporary _x suffix

2021-12-06 Thread Bill Schmidt via Gcc-patches
Hi! While we had two sets of built-in infrastructure at once, I added _x as a suffix to two arrays to disambiguate the old and new versions. Time to fix that also. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill 2021-12-06 Bill

[PATCH] rs6000: Refactor altivec_build_resolved_builtin

2021-12-09 Thread Bill Schmidt via Gcc-patches
egressions. Is this okay for trunk? Thanks! Bill 2021-12-09 Bill Schmidt gcc/ * config/rs6000/rs6000-c.c (resolution): New enum. (resolve_VEC_MUL): New function. (resolve_VEC_CMPNE): Likewise. (resolve_VEC_ADDE_SUBE): Likewise. (resolve_VEC_ADDEC_SUBEC)

Re: [PATCH] rs6000: Refactor altivec_build_resolved_builtin

2021-12-09 Thread Bill Schmidt via Gcc-patches
I forgot to point out that this patch is dependent on the pending patches to remove the old builtins code. Thanks, Bill On 12/9/21 12:33 PM, Bill Schmidt via Gcc-patches wrote: > Hi! > > While replacing the built-in machinery, we agreed to defer some necessary > refactoring of

[PATCH 01/18] rs6000: Handle overloads during program parsing

2021-09-01 Thread Bill Schmidt via Gcc-patches
eview, unfortunately. Just be aware that generally we aren't changing the logic and functionality of overload handling. 2021-08-31 Bill Schmidt gcc/ * config/rs6000/rs6000-c.c (rs6000-builtins.h): New include. (altivec_resolve_new_overloaded_builtin): New fo

[PATCHv5 00/18] Replace the Power target-specific builtin machinery

2021-09-01 Thread Bill Schmidt via Gcc-patches
. Thanks again for all of the helpful reviews so far! Bill Bill Schmidt (18): rs6000: Handle overloads during program parsing rs6000: Move __builtin_mffsl to the [always] stanza rs6000: Handle gimple folding of target built-ins rs6000: Handle some recent MMA builtin changes rs60

[PATCH 02/18] rs6000: Move __builtin_mffsl to the [always] stanza

2021-09-01 Thread Bill Schmidt via Gcc-patches
I over-restricted use of __builtin_mffsl, since I was unaware that it automatically uses mffs when mffsl is not available. Paul Clarke pointed this out in discussion of his SSE 4.1 compatibility patches. 2021-08-31 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (__builtin_mffsl

[PATCH 04/18] rs6000: Handle some recent MMA builtin changes

2021-09-01 Thread Bill Schmidt via Gcc-patches
ntion that adds _INTERNAL to the builtin index name remains. The rest of the patch is just duplicating Peter's patch, using the new builtin infrastructure. 2021-08-23 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def (ASSEMBLE_ACC): Add mmaint flag. (ASSEMBLE_

[PATCH 03/18] rs6000: Handle gimple folding of target built-ins

2021-09-01 Thread Bill Schmidt via Gcc-patches
. 2021-08-31 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_gimple_fold_new_builtin): New forward decl. (rs6000_gimple_fold_builtin): Call rs6000_gimple_fold_new_builtin. (rs6000_new_builtin_valid_without_lhs): New function

[PATCH 05/18] rs6000: Support for vectorizing built-in functions

2021-09-01 Thread Bill Schmidt via Gcc-patches
This patch just duplicates a couple of functions and adjusts them to use the new builtin names. There's no logical change otherwise. 2021-08-31 Bill Schmidt gcc/ * config/rs6000/rs6000.c (rs6000-builtins.h): New include. (rs6000_new_builtin_vectorized_function): New fun

[PATCH 06/18] rs6000: Builtin expansion, part 1

2021-09-01 Thread Bill Schmidt via Gcc-patches
that are restricted to specific values or ranges. Note that these six patches must be pushed together, because otherwise unused parameter warnings in the stub functions will prevent bootstrap. If preferred, I can flag them unused to remove this restriction. 2021-08-31 Bill Schmidt

[PATCH 07/18] rs6000: Builtin expansion, part 2

2021-09-01 Thread Bill Schmidt via Gcc-patches
variable altivec_builtin_mask_for_load is initialized. 2021-09-01 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_invalid_new_builtin): Implement. (rs6000_expand_ldst_mask): Likewise. (rs6000_init_builtins): Initialize altivec_builtin_mask_for_load

[PATCH 08/18] rs6000: Builtin expansion, part 3

2021-09-01 Thread Bill Schmidt via Gcc-patches
Implement the replacement for cpu_expand_builtin. There are no logic changes here, just changes to use the new built-in function names and clean up some formatting. 2021-09-01 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (new_cpu_expand_builtin): Implement. --- gcc/config

[PATCH 09/18] rs6000: Builtin expansion, part 4

2021-09-01 Thread Bill Schmidt via Gcc-patches
altivec_expand_lxvr_builtin = stv_expand builtin replaces altivec_expand_stv_builtin In all cases, there are no logic changes except that some code was already factored out into rs6000_expand_new_builtin. 2021-09-01 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (elemrev_icode): Implement

[PATCH 10/18] rs6000: Builtin expansion, part 5

2021-09-01 Thread Bill Schmidt via Gcc-patches
Replace mma_expand_builtin. There are no significant logic changes, just adjustments to use the new infrastructure and clean up formatting. 2021-09-01 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (new_mma_expand_builtin): Implement. --- gcc/config/rs6000/rs6000-call.c

[PATCH 11/18] rs6000: Builtin expansion, part 6

2021-09-01 Thread Bill Schmidt via Gcc-patches
bit" attributes, which is straightforward. These just do icode substitution. 2021-09-01 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (new_htm_spr_num): New function. (new_htm_expand_builtin): Implement. (rs6000_expand_new_builtin): Handle 32-bit and endian ca

[PATCH 12/18] rs6000: Update rs6000_builtin_decl

2021-09-01 Thread Bill Schmidt via Gcc-patches
Create a new version of this function that uses the new infrastructure, and particularly checks for supported builtins the new way. 2021-08-31 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_new_builtin_decl): New function. (rs6000_builtin_decl): Call it

[PATCH 13/18] rs6000: Miscellaneous uses of rs6000_builtins_decl_x

2021-09-01 Thread Bill Schmidt via Gcc-patches
There are a few leftover places where we use the old rs6000_builtins_decl array, but we need to use rs6000_builtins_decl_x instead when the new builtins infrastructure is in play. 2021-07-28 Bill Schmidt gcc/ * config/rs6000/rs6000.c (rs6000_builtin_reciprocal): Use

[PATCH 14/18] rs6000: Debug support

2021-09-01 Thread Bill Schmidt via Gcc-patches
2021-07-28 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_debug_type): New function. (def_builtin): Change debug formatting for easier parsing and include more information. (rs6000_init_builtins): Add dump of autogenerated builtins

[PATCH 15/18] rs6000: Update altivec.h for automated interfaces

2021-09-01 Thread Bill Schmidt via Gcc-patches
2021-07-28 Bill Schmidt gcc/ * config/rs6000/altivec.h: Delete a number of #defines that are now superfluous. Alphabetize. Include rs6000-vecdefines.h. Include some synonyms. --- gcc/config/rs6000/altivec.h | 519 +++- 1 file changed

[PATCH 17/18] rs6000: Enable the new builtin support

2021-09-01 Thread Bill Schmidt via Gcc-patches
2021-03-05 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_init_file): Initialize new_builtins_are_live to 1. --- gcc/config/rs6000/rs6000-gen-builtins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c

[PATCH 16/18] rs6000: Test case adjustments

2021-09-01 Thread Bill Schmidt via Gcc-patches
2021-07-19 Bill Schmidt gcc/testsuite/ * gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust. * gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Adjust. * gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Adjust. * gcc.target/powerpc/bfp/scalar-insert-exp-5.c

[PATCH 18/18] rs6000: Add escape-newline support for builtins files

2021-09-01 Thread Bill Schmidt via Gcc-patches
2021-08-19 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def (VEC_INIT_V16QI): Use escape-newline support. (VEC_INIT_V4SI): Likewise. (VEC_INIT_V8HI): Likewise. (PACK_V1TI): Likewise. (DIVDEU): Likewise

Re: Ping ^ 2: [PATCH] rs6000: Expand fmod and remainder when built with fast-math [PR97142]

2021-09-03 Thread Bill Schmidt via Gcc-patches
Hi Xionghu, This looks okay to me.  Recommend maintainers approve. Thanks! Bill On 9/2/21 9:31 PM, Xionghu Luo wrote: Resend the patch that addressed Will's comments. fmod/fmodf and remainder/remainderf could be expanded instead of library call when fast-math build, which is much faster. fm

Re: [PATCH v3] rs6000: Add load density heuristic

2021-09-03 Thread Bill Schmidt via Gcc-patches
Hi Kewen, Sorry that we lost track of this patch!  The heuristic approach looks good.  It is limited in scope and won't kick in often, and the case you're trying to account for is important. At the time you submitted this, I think reliable P10 testing wasn't possible.  Now that it is, could

Re: [PATCH v4] rs6000: Add load density heuristic

2021-09-09 Thread Bill Schmidt via Gcc-patches
On 9/9/21 11:11 AM, Segher Boessenkool wrote: Hi! On Wed, Sep 08, 2021 at 02:57:14PM +0800, Kewen.Lin wrote: + /* If we have strided or elementwise loads into a vector, it's +possible to be bounded by latency and execution resources for +many scalar loads. Try to account f

Re: [PATCH v4] rs6000: Add load density heuristic

2021-09-09 Thread Bill Schmidt via Gcc-patches
On 9/9/21 12:19 PM, Bill Schmidt wrote: On 9/9/21 11:11 AM, Segher Boessenkool wrote: Hi! On Wed, Sep 08, 2021 at 02:57:14PM +0800, Kewen.Lin wrote: + /* If we have strided or elementwise loads into a vector, it's +possible to be bounded by latency and execution resource

Re: [PATCH, rs6000] Optimization for vec_xl_sext

2021-09-10 Thread Bill Schmidt via Gcc-patches
+vector signed __int128 +foo4 (signed long a, signed long *b) +{ +  return vec_xl_sext (a, b); +} + +/* { dg-final { scan-assembler-times {\mvextsd2q\M} 4 } } */ +/* { dg-final { scan-assembler-times {\mvextsb2d\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mvextsh2d\M} 1 } } */ +/* { dg-final { sc

Re: [PATCH] rs6000: Disable optimizing multiple xxsetaccz instructions into one xxsetaccz

2021-09-12 Thread Bill Schmidt via Gcc-patches
Hi Peter, This patch looks fine to me.  The approach to avoiding incorrect optimization is reasonable.  Maintainers? Thanks for the patch! Bill On 8/27/21 2:58 PM, Peter Bergner via Gcc-patches wrote: Fwprop will happily optimize two xxsetaccz instructions into one xxsetaccz by propagating t

Re: [PATCH, rs6000] optimization for vec_reve builtin [PR100868]

2021-09-12 Thread Bill Schmidt via Gcc-patches
Hi Haochen, On 9/8/21 1:42 AM, HAO CHEN GUI wrote: Hi,   The patch optimized for vec_reve builtin on rs6000. For V2DI and V2DF, it is implemented by xxswapd on all targets. For V16QI, V8HI, V4SI and V4SF, it is implemented by quadword byte reverse plus halfword/word byte reverse when p9_vecto

Re: [PATCH v2] ipa-inline: Add target info into fn summary [PR102059]

2021-09-12 Thread Bill Schmidt via Gcc-patches
Hi Kewen, I'll leave the continued review of the back-end parts of this to Segher, but I do have one long-term comment.  The rs6000_builtin_info[code].mask field that you're relying on is going away as part of the built-in function rewrite.  There will be a "bifattrs" field that replaces this

Re: [PATCHv5 00/18] Replace the Power target-specific builtin machinery

2021-09-13 Thread Bill Schmidt via Gcc-patches
Ping. Message-Id: Thanks! Bill On 9/1/21 11:13 AM, Bill Schmidt via Gcc-patches wrote: Hi! Original patch series here: https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568840.html V2 patch series here: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572231.html V3 patch series

Re: [PATCH 03/18] rs6000: Handle gimple folding of target built-ins

2021-09-14 Thread Bill Schmidt via Gcc-patches
Hi Will, On 9/13/21 1:42 PM, will schmidt wrote: On Wed, 2021-09-01 at 11:13 -0500, Bill Schmidt via Gcc-patches wrote: This is another patch that looks bigger than it really is. Because we have a new namespace for the builtins, allowing us to have both the old and new builtin infrastructure

Re: [Patch] PowerPC: Fix rs6000-gen-builtins with build != host [PR102353]

2021-09-16 Thread Bill Schmidt via Gcc-patches
Thank you, Tobias!  This looks good to me and doesn't break host=target=build bootstrap.  I appreciate the patch very much.  (I can't approve it, so please wait for Segher/David to weigh in.) Bill On 9/16/21 4:07 AM, Tobias Burnus wrote: As mentioned in https://gcc.gnu.org/PR102353 and in the

Re: [PATCH 04/18] rs6000: Handle some recent MMA builtin changes

2021-09-17 Thread Bill Schmidt via Gcc-patches
Thanks!  I'll remove the elses in the committed patch, along with a TODO comment for the additional factoring opportunity for when I get to that stage. Thanks for all the reviews! Bill On 9/16/21 6:38 PM, Segher Boessenkool wrote: Hi! On Wed, Sep 01, 2021 at 11:13:40AM -0500, Bill Sc

Re: [PATCH] rs6000: Parameterize some const values for density test

2021-09-17 Thread Bill Schmidt via Gcc-patches
Hi Kewen, On 9/15/21 3:52 AM, Kewen.Lin wrote: Hi, This patch follows the discussion here[1], where Segher suggested parameterizing those exact magic constants for density heuristics, to make it easier to tweak if need. Since these heuristics are quite internal, I make these parameters as undo

Re: [PATCH] rs6000: Modify the way for extra penalized cost

2021-09-17 Thread Bill Schmidt via Gcc-patches
Hi Kewen, On 9/15/21 8:14 PM, Kewen.Lin wrote: Hi, This patch follows the discussion here[1], where Segher pointed out the existing way to guard the extra penalized cost for strided/elementwise loads with a magic bound doesn't scale. The way with nunits * stmt_cost can get one much exaggerated

[PATCH] rs6000: Add psabi diagnostic for C++ zero-width bit field ABI change (PR102024)

2021-09-21 Thread Bill Schmidt via Gcc-patches
c64le-unknown-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill 2021-09-21 Bill Schmidt gcc/ PR target/102024 * config/rs6000/rs6000-call.c (rs6000_aggregate_candidate): Detect zero-width bit fields and return indi

Re: [PATCH] rs6000: Add psabi diagnostic for C++ zero-width bit field ABI change (PR102024)

2021-09-22 Thread Bill Schmidt via Gcc-patches
On 9/22/21 9:35 AM, will schmidt wrote: On Tue, 2021-09-21 at 17:35 -0500, Bill Schmidt wrote: Hi! Previously zero-width bit fields were removed from structs, so that otherwise homogeneous aggregates were treated as such and passed in FPRs and VSRs. This was incorrect behavior per the ELFv2

Re: [PATCH] rs6000: Add psabi diagnostic for C++ zero-width bit field ABI change (PR102024)

2021-09-22 Thread Bill Schmidt via Gcc-patches
Hi Jakub, On 9/22/21 11:33 AM, Jakub Jelinek wrote: On Wed, Sep 22, 2021 at 05:02:15PM +0200, Jakub Jelinek via Gcc-patches wrote: @@ -6298,7 +6298,8 @@ rs6000_aggregate_candidate (const_tree type, machine_mode *modep, return -1; count = rs6000_aggregate_candidate (TREE_TYPE

Re: [PATCH] rs6000: Add psabi diagnostic for C++ zero-width bit field ABI change (PR102024)

2021-09-23 Thread Bill Schmidt via Gcc-patches
Hi Segher, Thanks for the review!  This is what I committed. 2021-09-23 Bill Schmidt gcc/ PR target/102024 * config/rs6000/rs6000-call.c (rs6000_aggregate_candidate): Detect zero-width bit fields and return indicator. (rs6000_discover_homogeneous_aggregate

[PATCH] rs6000: Fix vec_cpsgn parameter order (PR101985)

2021-09-24 Thread Bill Schmidt via Gcc-patches
infrastructure where we were using the VSX form of the VEC_COPYSIGN built-in when we should default to the VMX form. Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill 2021-09-24 Bill Schmidt gcc/ PR target/101985

Re: [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-09-28 Thread Bill Schmidt via Gcc-patches
Hi Kewen, Although I agree that what we do now is tragically bad (and will be fixed in the builtin rewrite), this seems a little too cavalier to remove all checking during initialization without adding any checking somewhere else. :-)  We still need to check for invalid usage when the builtin i

Re: [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-09-29 Thread Bill Schmidt via Gcc-patches
Hi Kewen, On 9/28/21 9:34 PM, Kewen.Lin wrote: > Hi Bill, > > Thanks for your prompt comments! > > on 2021/9/29 上午3:24, Bill Schmidt wrote: >> Hi Kewen, >> >> Although I agree that what we do now is tragically bad (and will be fixed in >> the builtin rewrit

[PING] rs600 built-in series

2021-09-29 Thread Bill Schmidt via Gcc-patches
Hi Segher, Might as well ping this before I go on vacation.  :-)  I think we're up to 06/18: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578604.html Thanks!! Bill

Re: [PATCH v2] libstdc++: Add support for POWER9 DARN instruction to std::random_device

2021-11-04 Thread Bill Schmidt via Gcc-patches
For posterity:  This was discussed briefly on IRC, and Segher approved with some simplifications and a request to implement a fail/retry check. Thanks, Bill On 11/3/21 10:02 AM, Jonathan Wakely wrote: > On Wed, 3 Nov 2021 at 15:01, Jonathan Wakely wrote: Any feedback from POWER > maintainers a

Re: [PATCH v2] libstdc++: Add support for POWER9 DARN instruction to std::random_device

2021-11-05 Thread Bill Schmidt via Gcc-patches
On 11/5/21 7:44 AM, Jonathan Wakely wrote: > On Thu, 4 Nov 2021 at 20:44, Bill Schmidt wrote: For posterity:  This was > discussed briefly on IRC, and Segher approved with some simplifications and a > request to implement a fail/retry check. Here's what I have now. No more >

Re: [PATCH 11/18] rs6000: Builtin expansion, part 6

2021-11-07 Thread Bill Schmidt via Gcc-patches
d. Thanks again! Bill On 11/3/21 8:24 PM, Segher Boessenkool wrote: > Hi! > > On Wed, Sep 01, 2021 at 11:13:47AM -0500, Bill Schmidt wrote: >> Provide replacements for htm_spr_num and htm_expand_builtin. No logic >> changes are intended here, as usual.

Re: [PATCH 11/18] rs6000: Builtin expansion, part 6

2021-11-08 Thread Bill Schmidt via Gcc-patches
Sorry for the misunderstanding.  What I meant is the 6 patches entitled "Builtin expansion, part N". I still have 6-7 patches left to look at. Thanks! Bill On 11/7/21 3:05 PM, Segher Boessenkool wrote: > Hi! > > On Sun, Nov 07, 2021 at 09:28:09AM -0600, Bill Schmidt wrote: &

Re: [PATCH 18/18] rs6000: Add escape-newline support for builtins files

2021-11-08 Thread Bill Schmidt via Gcc-patches
On 11/5/21 6:50 PM, Segher Boessenkool wrote: > Hi! > > On Wed, Sep 01, 2021 at 11:13:54AM -0500, Bill Schmidt wrote: >> +/* Escape-newline support. For readability, we prefer to allow developers >> + to use escape-newline to continue long lines to the next one. We >&g

Re: [PATCH 14/18] rs6000: Debug support

2021-11-09 Thread Bill Schmidt via Gcc-patches
On 11/5/21 4:34 PM, Segher Boessenkool wrote: > On Wed, Sep 01, 2021 at 11:13:50AM -0500, Bill Schmidt wrote: >> * config/rs6000/rs6000-call.c (rs6000_debug_type): New function. >> (def_builtin): Change debug formatting for easier parsing and >> inc

[PATCH] rs6000: Match recent builtins changes in new builtins support

2021-11-09 Thread Bill Schmidt via Gcc-patches
e. I corrected that as part of this patch. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill 2021-11-09 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_gimple_fold_new_builtin): Disable gimple fold for RS6000_

[PATCH] rs6000: Fix a handful of 32-bit built-in function problems in the new support

2021-11-09 Thread Bill Schmidt via Gcc-patches
th no regressions. Is this okay for trunk? Thanks! Bill 2021-09-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def (CMPB): Flag as no32bit. (BPERMD): Flag as 32bit. (UNPACK_TD): Return unsigned long long instead of unsigned long. (SET_TEXASR): Pass uns

Re: [PATCH] rs6000: Fix a handful of 32-bit built-in function problems in the new support

2021-11-10 Thread Bill Schmidt via Gcc-patches
On 11/10/21 2:33 AM, Segher Boessenkool wrote: > On Tue, Nov 09, 2021 at 03:46:54PM -0600, Bill Schmidt wrote: >> Hi! Some time ago I realized I hadn't tested the new builtin support >> against 32-bit >> big-endian in quite a while. When I did, I found a handful

Re: [PATCH] rs6000: Fix a handful of 32-bit built-in function problems in the new support

2021-11-11 Thread Bill Schmidt via Gcc-patches
Hi! On 11/11/21 7:11 AM, Segher Boessenkool wrote: > On Wed, Nov 10, 2021 at 03:28:18PM -0600, Bill Schmidt wrote: >> On 11/10/21 2:33 AM, Segher Boessenkool wrote: >>> On Tue, Nov 09, 2021 at 03:46:54PM -0600, Bill Schmidt wrote: >>>>* config/rs6000/rs6000-b

Re: [PATCH 16/18] rs6000: Test case adjustments

2021-11-11 Thread Bill Schmidt via Gcc-patches
Hi Segher, [Sorry to be answering these out of order...] On 11/5/21 5:37 PM, Segher Boessenkool wrote: > On Wed, Sep 01, 2021 at 11:13:52AM -0500, Bill Schmidt wrote: >> * gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust. > My favourite changelog entry! But, adjust to wh

[PATCH, committed] rs6000: Fix test_mffsl.c to require Power9 support

2021-11-11 Thread Bill Schmidt via Gcc-patches
Hi! Per previous discussion, committed the following as obvious. commit 8a8458ac6bbc4263dd2c1ee55979b29fc7195794 Author: Bill Schmidt Date: Thu Nov 11 14:36:04 2021 -0600 rs6000: Fix test_mffsl.c to require Power9 support 2021-11-11 Bill Schmidt gcc/testsuite

Re: [PATCH 16/18] rs6000: Test case adjustments

2021-11-11 Thread Bill Schmidt via Gcc-patches
On 11/11/21 2:06 PM, Bill Schmidt wrote: > >>> --- a/gcc/testsuite/gcc.target/powerpc/int_128bit-runnable.c >>> +++ b/gcc/testsuite/gcc.target/powerpc/int_128bit-runnable.c >>> @@ -11,9 +11,9 @@ >>> /* { dg-final { scan-assembler-times {\mvrlq\M} 2 } } */ &g

Re: [PATCH] rs6000: Fix a handful of 32-bit built-in function problems in the new support

2021-11-14 Thread Bill Schmidt via Gcc-patches
On 11/11/21 10:50 AM, Bill Schmidt wrote: > On 11/11/21 7:11 AM, Segher Boessenkool wrote: >> void f(long x) { __builtin_set_texasr(x); } >> >> built with -m32 -mpowerpc64 gives (in the expand dump): >> >> void f (long int x) >> { >> long long un

Re: [PATCH] rs6000: Fix a handful of 32-bit built-in function problems in the new support

2021-11-15 Thread Bill Schmidt via Gcc-patches
Hi Segher, On 11/14/21 9:29 AM, Segher Boessenkool wrote: > Hi! > > On Sun, Nov 14, 2021 at 08:17:41AM -0600, Bill Schmidt wrote: >> On 11/11/21 10:50 AM, Bill Schmidt wrote: >>> On 11/11/21 7:11 AM, Segher Boessenkool wrote: >>>> void f(long x) { __builtin_s

Re: [PATCH, rs6000] Optimization for vec_xl_sext

2021-11-16 Thread Bill Schmidt via Gcc-patches
Hi Hao Chen, I don't understand.  This patch was already approved and you committed it. :-) I know because I needed to make corresponding adjustments to the new builtins code. Thanks, Bill On 11/15/21 8:16 PM, HAO CHEN GUI wrote: > Hi, > >    The patch optimizes the code generation for vec_xl_

<    6   7   8   9   10   11   12   13   14   15   >