Re: [PATCH 1/4] Optimize vec_splats of constant vec_extract for V2DI/V2DF, PR target 99293.

2022-03-28 Thread Segher Boessenkool
On Mon, Mar 28, 2022 at 06:30:41PM -0400, Michael Meissner wrote: > On Mon, Mar 28, 2022 at 12:14:09PM -0500, Segher Boessenkool wrote: > > On Mon, Mar 28, 2022 at 12:26:02PM -0400, Michael Meissner wrote: > > > However on power9 and power10 it generates: > > > > &g

Re: [PATCH 4/4] Allow vsx_extract_ to use Altivec registers, PR target/99293

2022-03-28 Thread Segher Boessenkool
ot see it, always a possibility of course. > * config/rs6000/rs6000.md (vsx_extract_): Allow destination > to be an Altivec register. ... to be any VSX register. Okay for trunk with those things fixed. Thanks! Segher

Re: [PATCH 2/3] rs6000: Move g++.dg powerpc PR tests to g++.target

2022-03-29 Thread Segher Boessenkool
Hi! On Tue, Feb 22, 2022 at 07:56:40PM -0600, Paul A. Clarke wrote: > On Tue, Feb 22, 2022 at 06:41:45PM -0600, Segher Boessenkool wrote: > > That said... > > > > > -/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ > > > -/* { dg-skip-if &quo

Re: [PATCH 3/3] rs6000: Move more g++.dg powerpc tests to g++.target

2022-03-29 Thread Segher Boessenkool
ght3.C: Likewise. > * g++.dg/other/spu2vmx-1.C: Likewise. Those things can be done later, so: okay for trunk. Thanks! Segher

Re: [PATCH 7/8] rs6000: vec_neg built-ins wrongly require POWER8

2022-03-30 Thread Segher Boessenkool
runk? Okay for trunk. Thanks! I'll apply it myself :-) Segher > 2022-01-27 Bill Schmidt > > gcc/ > * config/rs6000/rs6000-builtin.def (NEG_V16QI): Move to [altivec] > stanza. > (NEG_V4SF): Likewise. > (NEG_V4SI): Likewise. > (NEG_

Re: rs6000 patch ping: [PATCH 8/8] rs6000: Fix some missing built-in attributes [PR104004]

2022-03-30 Thread Segher Boessenkool
ially applied (or not at all even?) It is a mess :-( I'll look into it tomorrow. Segher

Re: rs6000 patch ping: [PATCH 8/8] rs6000: Fix some missing built-in attributes [PR104004]

2022-03-31 Thread Segher Boessenkool
On Wed, Mar 30, 2022 at 06:07:26PM -0500, Segher Boessenkool wrote: > On Tue, Mar 15, 2022 at 02:18:00PM +0100, Jakub Jelinek wrote: > > On Fri, Jan 28, 2022 at 11:50:26AM -0600, Bill Schmidt via Gcc-patches > > wrote: > > > PR104004 caught some misses on my part in conver

Re: [PATCH v2] rs6000: Support UN[GL][ET] in rs6000_maybe_emit_maxc_minc [PR105002]

2022-04-01 Thread Segher Boessenkool
se move this to later, since you touch it anyway: bool max_p; >if (code == GE || code == GT) > max_p = true; >else if (code == LE || code == LT) Okay for trunk with those finishing touches. Thanks! Segher

Re: [PATCH 2/4] Make vsx_splat__reg use correct insn attributes, PR target/99293

2022-04-01 Thread Segher Boessenkool
On Wed, Mar 30, 2022 at 06:41:59PM -0400, Michael Meissner wrote: > On Mon, Mar 28, 2022 at 03:28:39PM -0500, Segher Boessenkool wrote: > > On Mon, Mar 28, 2022 at 12:27:05PM -0400, Michael Meissner wrote: > > > In looking at PR target/99293, I noticed that th

Re: [PATCH] combine: Don't record for UNDO_MODE pointers into regno_reg_rtx array [PR104985]

2022-04-05 Thread Segher Boessenkool
x m; struct insn_link **l; } where; NAK. It is not clear at all what "rtx m" means, esp. since there is an "rtx *r" already. In the PR you said "machine_mode m", that is clear of course, can you do that instead? Okay for trunk with those things fixed. Thanks! Segher

Re: [PATCH] rs6000: Handle pcrel sibcalls to longcall functions [PR104894]

2022-04-05 Thread Segher Boessenkool
w it can contain any others as long as it has that flag as well. Please fix. Not every LONG_CALL needs a TOC restore though? I won't ask you to make it work in those cases of course, but change the comment to not be as misleading? Taking the "Only" out is good already I think :-) You probably should have the same condition here as actually doing a longcall as well, something involving SYMBOL_REF_FUNCTION_P? Thanks, Segher

[PATCH] rs6000/testsuite: Skip pr105140.c

2022-04-06 Thread Segher Boessenkool
code, you may need to do the same? Segher 2022-04-06 Segher Boessenkool PR target/105147 * testsuite/gcc.dg/pr105140.c: Skip for powerpc*-*-*. --- gcc/testsuite/gcc.dg/pr105140.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.dg/pr105140.c b/gcc

Re: [PATCH] combine, v2: Don't record for UNDO_MODE pointers into regno_reg_rtx array [PR104985]

2022-04-06 Thread Segher Boessenkool
Hi! So, the core of this problem is once again that regno_reg_rtx is reallocated. It will be another decade until we got rid of all fallout of breaking that guarantee :-( On Wed, Apr 06, 2022 at 10:50:40AM +0200, Jakub Jelinek wrote: > On Tue, Apr 05, 2022 at 04:56:55PM -0500, Seg

Re: [PATCH] PR middle-end/104885: Fix ICE with large stack frame on powerpc64.

2022-04-06 Thread Segher Boessenkool
d uses stack_usage_watermark rather than a map. Thanks for the fix! Segher

Re: [PATCH] Disable float128 tests on VxWorks, PR target/104253.

2022-04-07 Thread Segher Boessenkool
one extra to the big list here, but, why do we need all these manual exclusions anyway? What is broken about the test itself? It would be so much more useful if the tests would help us, instead of producing a lot of extra busy-work. Segher

Re: [PATCH] rs6000: Guard bifs {un, }pack_{longdouble, ibm128} under hard float [PR103623]

2022-04-07 Thread Segher Boessenkool
t; with the given configuration. While with new bif infrastructure, it > becomes available and gets ICE due to incomplete supports. > > Segher and Peter pointed out that we should make them available with > soft float, I agree we can extend them to cover both soft and hard > float. But

Re: [PATCH] Disable float128 tests on VxWorks, PR target/104253.

2022-04-07 Thread Segher Boessenkool
On Thu, Apr 07, 2022 at 08:50:53AM -0500, will schmidt wrote: > On Thu, 2022-04-07 at 06:00 -0500, Segher Boessenkool wrote: > > On Thu, Apr 07, 2022 at 12:29:45AM -0400, Michael Meissner wrote: > > > In PR target/104253, it was pointed out the that test case added as part >

Re: [PATCH] rs6000/test: Adjust p9-vec-length-7 sensitive to unroll [PR103196]

2022-04-07 Thread Segher Boessenkool
n? There is -fpeel-loops as well, and cunroll is independent of all of these as well? > I would > expect the effect of the option, versus the pragma, two to roughly > equivalent. Obviously it is not. :-) Yes, me too. And I do not see what makes the difference, if it isn't the peel thing :-( Ke Wen, can you try with -fno-peel-loops please? Segher

Re: [PATCH] Disable float128 tests on VxWorks, PR target/104253.

2022-04-07 Thread Segher Boessenkool
Hi! On Thu, Apr 07, 2022 at 02:59:55PM -0400, Michael Meissner wrote: > On Thu, Apr 07, 2022 at 06:00:51AM -0500, Segher Boessenkool wrote: > > On Thu, Apr 07, 2022 at 12:29:45AM -0400, Michael Meissner wrote: > > > In PR target/104253, it was pointed out the that test case adde

Re: [PATCH] rs6000/test: Adjust p9-vec-length-7 sensitive to unroll [PR103196]

2022-04-08 Thread Segher Boessenkool
Hi! Thanks for investigating. On Fri, Apr 08, 2022 at 03:25:51PM +0800, Kewen.Lin wrote: > on 2022/4/8 3:29 AM, Segher Boessenkool wrote: > > On Thu, Apr 07, 2022 at 09:19:51AM -0500, will schmidt wrote: > >> On Mon, 2022-02-28 at 13:37 +0800, Kewen.Lin via Gcc-patches wrote:

Re: [PATCH v2] rs6000: Guard bifs {un, }pack_{longdouble, ibm128} under hard float [PR103623]

2022-04-08 Thread Segher Boessenkool
t; with the given configuration. While with new bif infrastructure, it > becomes available and gets ICE due to incomplete supports. > > Segher and Peter pointed out that we should make them available with > soft float, I agree we can extend them to cover both soft and hard > float. But consi

Re: [PATCH] rs6000: Guard bifs {un, }pack_{longdouble, ibm128} under hard float [PR103623]

2022-04-08 Thread Segher Boessenkool
On Thu, Apr 07, 2022 at 03:00:14PM +0200, Jakub Jelinek wrote: > On Thu, Apr 07, 2022 at 06:09:52AM -0500, Segher Boessenkool wrote: > > On Thu, Mar 03, 2022 at 10:11:32AM +0800, Kewen.Lin wrote: > > > As PR103623 shows, it's a regression failure due to new built-in &

Re: [PATCH] rs6000: Guard bifs {un, }pack_{longdouble, ibm128} under hard float [PR103623]

2022-04-08 Thread Segher Boessenkool
operand:QI 2 "const_0_to_1_operand" "i,i,i")] UNSPEC_UNPACK_128BIT))] "(!TARGET_POWERPC64 || !TARGET_DIRECT_MOVE) && FLOAT128_2REG_P (mode)" "#" @@ -14600,7 +14600,7 @@ (define_insn_and_split "unpack_nodm" operands[3] = gen_rtx_REG (mode, fp_regno); } - [(set_attr "type" "fp,fpstore")]) + [(set_attr "type" "fp,fpstore,store")]) (define_insn_and_split "pack" [(set (match_operand:FMOVE128 0 "register_operand" "=&d") === Segher

Re: [PATCH, rs6000] Correct match pattern in pr56605.c

2022-04-08 Thread Segher Boessenkool
ional (we have an actual reg in one of the cases currently). What do you consider wrong about the old pattern, what in the generated code is different from what you expect? It works correctly on p7 etc. btw; where do you see it fail? p10? Segher

Re: [PATCH] rs6000: Guard bifs {un, }pack_{longdouble, ibm128} under hard float [PR103623]

2022-04-11 Thread Segher Boessenkool
Hi! On Mon, Apr 11, 2022 at 04:29:40PM +0800, Kewen.Lin wrote: > on 2022/4/9 1:31 AM, Segher Boessenkool wrote: > > On Fri, Apr 08, 2022 at 10:09:44AM +0800, Kewen.Lin wrote: > > For me it fails during combine: the unspec suddenly doesn't recog > > anymore. That might b

[PATCH] rs6000: Fix unpack for no-direct-move (PR103623)

2022-04-11 Thread Segher Boessenkool
trunk. Segher 2022-04-11 Segher Boessenkool PR target/105213 PR target/103623 * config/rs6000/rs6000.md (unpack_nodm): Add m,r,i alternative. --- gcc/config/rs6000/rs6000.md | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/config/rs6000/rs6000

Re: [PATCH] rs6000: Handle pcrel sibcalls to longcall functions [PR104894]

2022-04-11 Thread Segher Boessenkool
On Wed, Apr 06, 2022 at 02:33:52PM -0500, Peter Bergner wrote: > On 4/5/22 10:33 PM, Peter Bergner via Gcc-patches wrote: > > On 4/5/22 5:32 PM, Segher Boessenkool wrote: > >> On Tue, Apr 05, 2022 at 05:06:50PM -0500, Peter Bergner wrote: > So the updated change looks like bel

Re: [PATCH, V3] Eliminate power8 fusion options, use power8 tuning, PR target/102059

2022-04-11 Thread Segher Boessenkool
P8_FUSION_SIGN) Var(rs6000_isa_flags) > -Allow sign extension in fusion operations. > +Target Undocumented WarnRemoved Don't WarnRemoved. Do Ignore. Just remove the whole thing please. > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/pr102059-4.c > @@ -0,0 +1,23 @@ > +/* { dg-do compile } */ > +/* { dg-options "-O2 -mdejagnu-cpu=power10" } */ > +/* { dg-require-effective-target power10_ok } */ These last two lines the other way around: first state requirements, and only then the options that those are for. Please resend with those things fixed. Thanks! Segher

Re: [PATCH] rs6000: Handle pcrel sibcalls to longcall functions [PR104894]

2022-04-11 Thread Segher Boessenkool
ed things very thoroughly if you do quick backports like this (although the only thing that seems to be in danger are longcall things, and does anyone use those?) (don't answer that :-) ) Segher

Re: [PATCH] rs6000: Handle pcrel sibcalls to longcall functions [PR104894]

2022-04-11 Thread Segher Boessenkool
On Tue, Apr 05, 2022 at 10:33:14PM -0500, Peter Bergner wrote: > On 4/5/22 5:32 PM, Segher Boessenkool wrote: > >> + gcc_assert (rs6000_pcrel_p ()); > >> + func_desc = rs6000_longcall_ref (func_desc, tlsarg); > >> +} > >> + else >

Re: Ping^2 [PATCH, rs6000] Correct match pattern in pr56605.c

2022-04-12 Thread Segher Boessenkool
[SD]I) \((?:sub)?reg:[SD]I} 1 "combine" } } */ Ah, a nice small change. This looks fine, thanks! Okay for trunk. It is fine to allow zero_extend:SI of :SI or :DI, those are invalid RTL, testcases do not have to test there is no invalid RTL, in general. Segher

Re: [PATCH, rs6000] Correct match pattern in pr56605.c

2022-04-12 Thread Segher Boessenkool
On Mon, Apr 11, 2022 at 10:47:53AM +0800, HAO CHEN GUI wrote: > There are two issues left in this PR. One is pr56605.c. My patch fixes it. > Another is prefix-no-update.c. The patch Segher proposed in 103197 could fix > it. So today all remaining problems will be fixed. Thanks for sh

Re: [PATCH] ppc: testsuite: test for arch_pwr7 with -mvsx in fold-vec-insert-double

2022-04-12 Thread Segher Boessenkool
powerpc_vsx_ok is satisfied) you always are compiling for power7 or higher. What goes wrong? Segher

[PATCH] rs6000: Disparage lfiwzx and similar

2022-04-12 Thread Segher Boessenkool
alternatives for those. Doing one final testsuite run on this now, will commit to trunk once that finishes. It probably will need some backports as well. Segher 2022-04-12 Segher Boessenkool PR target/103197 PR target/102146 * config/rs6000/rs6000.md (*movsi_internal1

Re: [PATCH] ppc: testsuite: skip pr60203 on no ldbl128

2022-04-12 Thread Segher Boessenkool
ongdouble128 instead? /* { dg-require-effective-target longdouble128 } */ Okay for trunk, preferably like that. Thanks! Segher

Re: [PATCH] rs6000: Guard bifs {un, }pack_{longdouble, ibm128} under hard float [PR103623]

2022-04-12 Thread Segher Boessenkool
On Tue, Apr 12, 2022 at 10:02:06AM +0800, Kewen.Lin wrote: > on 2022/4/11 11:42 PM, Segher Boessenkool wrote: > > On Mon, Apr 11, 2022 at 04:29:40PM +0800, Kewen.Lin wrote: > >> Nice, I confirmed this makes ICE gone, I've filed one new PR > >> PR105213 for GCC13

Re: Ping^2 [PATCH, rs6000] Correct match pattern in pr56605.c

2022-04-13 Thread Segher Boessenkool
rs6000/, we get SImode. Adjust the expectations. > > Tested with gcc-11 targeting ppc64-vx7r2. Ok to install? This should have been tested on Linux as well: it is now broken on both -m32 and -m64 there. Please revert? Segher

Re: Ping^2 [PATCH, rs6000] Correct match pattern in pr56605.c

2022-04-13 Thread Segher Boessenkool
On Wed, Apr 13, 2022 at 04:30:36PM -0500, Segher Boessenkool wrote: > This should have been tested on Linux as well: it is now broken on both > -m32 and -m64 there. Please revert? Sorry, confusing with another new regression: this one is only -m64 of course. Segher

Re: enable __ieee128 for p9vector tests

2022-04-14 Thread Segher Boessenkool
Hi! On Sat, Apr 17, 2021 at 06:19:02AM -0300, Alexandre Oliva wrote: > On Apr 12, 2021, Segher Boessenkool wrote: > > On Fri, Apr 02, 2021 at 01:52:59PM -0300, Alexandre Oliva wrote: > >> Several compile tests that use the __ieee128 type do not ensure it is > >>

Re: enable __ieee128 for p9vector tests

2022-04-14 Thread Segher Boessenkool
On Wed, Apr 13, 2022 at 08:37:40PM -0300, Alexandre Oliva wrote: > On Apr 17, 2021, Alexandre Oliva wrote: > > On Apr 12, 2021, Segher Boessenkool wrote: > My supposition was wrong. It turned out to be just because in > vxworks.h, for TARGET_VXWORKS7, there&

Re: ppc: testsuite: bfp: enable float128 for __ieee128

2022-04-14 Thread Segher Boessenkool
power9 (etc.) to enable VSX just as well. You should not change such defaults for your platform. Segher

Re: enable __ieee128 for p9vector tests

2022-04-14 Thread Segher Boessenkool
On Thu, Apr 14, 2022 at 01:56:39PM -0300, Alexandre Oliva wrote: > On Apr 14, 2022, Segher Boessenkool wrote: > > On Sat, Apr 17, 2021 at 06:19:02AM -0300, Alexandre Oliva wrote: > >> On Apr 12, 2021, Segher Boessenkool wrote: > >> > On Fri, Apr 02, 2021 at 01:

Re: [PATCH] testsuite: Skip pr105250.c for powerpc and s390 [PR105266]

2022-04-15 Thread Segher Boessenkool
25 and r12-8039, this fix is to add the dg-skip-if for > powerpc*-*-* and s390*-*-*. > > Tested on powerpc64le-linux-gnu P9 and it should work on s390 > as its similar PR105147. > > Is it ok for trunk? Yes. Thanks! Segher

Re: [PATCH][v2] rtl-optimization/105231 - distribute_notes and REG_EH_REGION

2022-04-19 Thread Segher Boessenkool
+those. */ That sounds like we do not know what is correct to do, so just sweep it under the carpet and hope it works out. "Just drop those, that is always safe"? (Is it always safe?) Okay for trunk with maybe a word or two more there. Thanks! Segher

Re: [PATCH][v2] rtl-optimization/105231 - distribute_notes and REG_EH_REGION

2022-04-19 Thread Segher Boessenkool
On Tue, Apr 19, 2022 at 02:58:26PM +0200, Richard Biener wrote: > On Tue, 19 Apr 2022, Segher Boessenkool wrote: > The assert was for any landing pad which obviously failed - the > testsuite fails were all for MUST_NOT_THROW (negative) regions > which do not end basic-blocks. I

Re: [PATCH][v2] rtl-optimization/105231 - distribute_notes and REG_EH_REGION

2022-04-19 Thread Segher Boessenkool
On Tue, Apr 19, 2022 at 05:00:12PM +0200, Richard Biener wrote: > On Tue, 19 Apr 2022, Segher Boessenkool wrote: > > > > And that always is safe? Why do we have REG_EH_REGION for those cases > > > > at all, then? > > > > > > It's the only "

Re: Ping^2 [PATCH, rs6000] Correct match pattern in pr56605.c

2022-04-19 Thread Segher Boessenkool
(clobber (scratch:DI)) ]) 207 {*anddi3_imm_mask_dot} (expr_list:REG_DEAD (reg:SI 136 [ niters.6 ]) (nil))) The paradoxical subreg in the latter wasn't expected :-) Segher

Re: [PATCH][v3] rtl-optimization/105231 - distribute_notes and REG_EH_REGION

2022-04-20 Thread Segher Boessenkool
resulting > +insns and just pick the first. */ > + if (!find_reg_note (i3, REG_EH_REGION, NULL_RTX) > + && (CALL_P (i3) > + || (cfun->can_throw_non_call_exceptions > + && may_trap_p (i3 > + place = i3; > + if (i2 > + && !find_reg_note (i2, REG_EH_REGION, NULL_RTX) > + && cfun->can_throw_non_call_exceptions > + && may_trap_p (i2)) > + { > + if (place) > + place2 = i2; > + else > + place = i2; > + } > + } > + break; > + } Okay for trunk with the spello fixed, and maybe one more assert added. Thanks for all the work on this! Segher

[PATCH 0/3] rs6000: Disparage lfiwzx and similar

2022-04-21 Thread Segher Boessenkool
This series adds "?" on the "Z" for lfiwzx and similar, so that we preferably choose some D-form storage insn, instead of the X-form insn. The D-form insns work on GPRs only, but it is still much preferred. Committing to trunk. Segher Segher Boessenkool (3): rs6000:

[PATCH 1/3] rs6000: Add effective target has_arch_ppc64

2022-04-21 Thread Segher Boessenkool
This is true if we have -mpowerpc64. 2022-04-21 Segher Boessenkool gcc/testsuite/ * lib/target-supports.exp (check_effective_target_has_arch_ppc64): New. --- gcc/testsuite/lib/target-supports.exp | 10 ++ 1 file changed, 10 insertions(+) diff --git a/gcc/testsuite/lib/target

[PATCH 2/3] rs6000: Disparage lfiwzx and similar

2022-04-21 Thread Segher Boessenkool
alternatives for those. 2022-04-21 Segher Boessenkool PR target/103197 PR target/102146 * config/rs6000/rs6000.md (zero_extendqi2 for EXTQI): Disparage the "Z" alternatives in {l,st}{f,xs}iwzx. (zero_extendhi2 for EXTHI): Ditto. (zero_extendsi2

[PATCH 3/3] rs6000/testsuite: xfail bswap-brw.c

2022-04-21 Thread Segher Boessenkool
This testcase does not generate anywhere near optimal code for 32-bit code. For p10 it actually now fails this testcase, after the previous patch. Let's xfail it. 2022-04-21 Segher Boessenkool gcc/testsuite/ PR target/103197 PR target/102146 * gcc.target/po

Re: [PATCH][v4] rtl-optimization/105231 - distribute_notes and REG_EH_REGION

2022-04-22 Thread Segher Boessenkool
fsanitize-coverage=trace-pc > -fnon-call-exceptions --param=max-cse-insns=1 -frounding-math" } */ > +/* { dg-additional-options "-mstack-arg-probe" { target x86_64-*-* i?86-*-* > } } */ > + > +void baz (int *); > +void bar (double, double, _Decimal64); > + > +void > +foo (void) > +{ > + int s __attribute__((cleanup (baz))); > + bar (0xfffe, 0xebf3fff2fbebaf7f, 0xff); > +} Why the int32plus? It needs 64-bit integers, and the size of "int" does not matter at all afaics? Maybe you want lp64? Okay for trunk with the naming and comment stuff looked at. Thank you! Segher

Re: [PATCH] rs6000: fix last -Wformat-diag

2022-01-18 Thread Segher Boessenkool
On Tue, Jan 18, 2022 at 05:21:30PM +0100, Martin Liška wrote: > I'm going to install the following -Wformat-diag that is based on Segher's > wording. Thanks! (But please fix the format=flawed: > Content-Type: text/plain; charset=UTF-8; format=flowed ) Segher

Re: [PATCH] testsuite: Adjust possibly fragile slp-perm-9.c [PR104015]

2022-01-18 Thread Segher Boessenkool
erpc/pr104015-2.c: New test. > OK for the target-independent part, thanks. IMO it's OK independently > of the rs6000 tests. The rs6000 parts are fine as well. Thanks! I see you got rid of the ilp32 tests, I was going to holler about that, there is no reason this should only work (or only be tested) on 64-bit systems :-) Segher

Re: [PATCH] powerc: Fix asm machine directive for some CPUs

2022-01-18 Thread Segher Boessenkool
d it will do exactly the same as not having a default at all. Not having such useless code is by far the most readable, so please don't include a default case at all. Okay with those changes. Thanks! Segher

Re: [committed] rs6000: Fix bootstrap

2022-01-19 Thread Segher Boessenkool
On Wed, Jan 19, 2022 at 12:27:32PM +0100, Jakub Jelinek wrote: > On Wed, Jan 19, 2022 at 07:54:19AM +0100, Sebastian Huber wrote: > > On 18/01/2022 22:42, Segher Boessenkool wrote: > > > > +default: > > > > + break; > > > Please don'

Re: [PATCH v2, rs6000] Add a combine pattern for CA minus one [PR95737]

2022-01-20 Thread Segher Boessenkool
4, the testcase could use "long" instead > of "long long". The testcase really needs "powerpc64", if that would mean "test if -mpowerpc64 is (implicitly) used". But that is not what it currently means (it is something akin to "powerpc64_hw", instead). So we test lp64, which is set if and only if -m64 was used. It is reasonable coverage, no one cares much for -m32 -mpowerpc64 . Segher

Re: [PATCH] rs6000: Support vector float/double for vec_sldw

2022-01-21 Thread Segher Boessenkool
uot; 32 } } */ This will need modification for the phase of the moon. It also does not even test only xxlor insn (also xxlorc insns, for example). > +/* { dg-final { scan-assembler-times "xxsldwi" 10 } } */ Okay if you make this \mxxsldwi\M or even \m(?:xxsldwi|vsldoi)\M Thanks! Segher

Re: [PATCH] Mark XXSPLTIW/XXSPLTIDP as prefixed -- PR 104136

2022-01-21 Thread Segher Boessenkool
r something. Not really worth it unless you need this often, the four we have now (which could be two perhaps, by merging each pair of patterns again) isn't enough to warrant the extra indirection. Okay for trunk. Also fine for backports if you need them. Thanks! Segher

Re: [PATCH v9] rtl: builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2022-01-24 Thread Segher Boessenkool
t code to check builtins return code. > + Added more tests to test all valid (standard) exceptions input This is okay for trunk (Jeff already approved the generic parts). Thanks! Segher

Re: [PATCH] rs6000: Remove GCC 8.1 U10__float128 mangling compatibility [PR104172]

2022-01-24 Thread Segher Boessenkool
of > ieee128_mangling_gcc_8_1 ? "U10__float128" : "u9__ieee128". > (rs6000_globalize_decl_name): Remove. > * config/rs6000/rs6000-call.cc (init_cumulative_args, > rs6000_function_arg_advance_1): Don't set rs6000_passes_ieee128. I love deleting code :-) Segher

Re: [PATCH v1] rtl: builtins: Fix builtins feclearexcept and feraiseexcept operand check [PR94193]

2022-01-26 Thread Segher Boessenkool
ate check. Perfect, and pushed. Thank you! Segher

Re: [PATCH] rs6000: Fix constraint v with rs6000_constraints[RS6000_CONSTRAINT_v]

2022-01-26 Thread Segher Boessenkool
and tested one below patch to remove all the code using > >> RS6000_CONSTRAINT_v on powerpc64le-linux-gnu P10 and P9, > >> powerpc64-linux-gnu P8 and P7 with no regressions. > > I would prefer that we not make gratuitous changes to this code, but > > maybe Segher has a

Re: [PATCH] rs6000: Fix up *intrin.h for C89 [PR104239]

2022-01-26 Thread Segher Boessenkool
before it is used, not at the start of the function? Okay for trunk like that. Thanks! Also any and all backports you want are fine. Segher

Re: [PATCH] rs6000: Disable MMA if no P9 VECTOR support [PR103627]

2022-01-26 Thread Segher Boessenkool
ertain code we want to disallow whole register banks. But disallowing or allowing some instructions separately is not a good idea: it doesn't give any useful extra functionality, it is hard to use, and it is a lot of extra work for us (it is impossible to test, already, too many combinations). Segher

Re: [PATCH] rs6000: Move the hunk affecting VSX/ALTIVEC ahead [PR103627]

2022-01-26 Thread Segher Boessenkool
ilp32 } */ > +/* We don't have one powerpc.*_ok for Power6, use altivec_ok conservatively. > */ > +/* { dg-require-effective-target powerpc_altivec_ok } */ > +/* { dg-options "-mdejagnu-cpu=power6" } */ It is okay always, no _ok at all please. Okay for trunk with those things (but do test of course). Thanks! Segher

Re: [PATCH] rs6000: Fix constraint v with rs6000_constraints[RS6000_CONSTRAINT_v]

2022-01-27 Thread Segher Boessenkool
On Thu, Jan 27, 2022 at 07:24:53PM +0800, Kewen.Lin wrote: > on 2022/1/27 上午1:57, Segher Boessenkool wrote: > > I like your original patch better. But for stage 1, sorry. > > Thanks Segher! Is it ok to commit it then? Or I'll repost this once > next stage1 starts. Eith

Re: [PATCH v2] rs6000: Disable MMA if no VSX support [PR103627]

2022-01-27 Thread Segher Boessenkool
owerpc/pr103627-1.c: New test. > * gcc.target/powerpc/pr103627-2.c: New test. Okay for trunk. Thanks! Segher

Re: [PATCH] rs6000: Fix up #include or [PR104239]

2022-01-27 Thread Segher Boessenkool
ger problem, and nothing that a few scattershot tests will help fix :-( Segher

Re: [PATCH 1/8] rs6000: More factoring of overload processing

2022-01-28 Thread Segher Boessenkool
ut some number of if statements. You cannot use a switch as a shorthand for this because we have a silly warning and -Werror for this use. You probably get easier to understand code that way, too, you can get rid of the above (just do some early returns), etc. Segher

Re: [PATCH 2/8] rs6000: Don't #ifdef "short" built-in names

2022-01-28 Thread Segher Boessenkool
t;By removing the apply"... What does that mean? Nice cleanup (and nice bugfix of course). Okay for trunk (with that comment improved a bit perhaps). Thanks! Segher

Re: [PATCH 1/8] rs6000: More factoring of overload processing

2022-01-28 Thread Segher Boessenkool
On Fri, Jan 28, 2022 at 03:19:48PM -0600, Bill Schmidt wrote: > On 1/28/22 1:11 PM, Segher Boessenkool wrote: > > On Fri, Jan 28, 2022 at 11:50:19AM -0600, Bill Schmidt wrote: > >> + and the generic code will issue the appropriate error message. Skip > >> + th

Re: [PATCH 3/8] rs6000: Convert built-in constraints to form

2022-01-28 Thread Segher Boessenkool
be a literal > between X' and Y', inclusive". During reviews, Segher requested that I > eventually convert all messages of the first form into the second form for > consistency. That's what this patch does, replacing all -form > constraints (first form) with -form

Re: [PATCH 3/8] rs6000: Convert built-in constraints to form

2022-01-31 Thread Segher Boessenkool
On Mon, Jan 31, 2022 at 11:21:32AM -0600, Bill Schmidt wrote: > On 1/28/22 5:24 PM, Segher Boessenkool wrote: > > On Fri, Jan 28, 2022 at 11:50:21AM -0600, Bill Schmidt wrote: > >> When introducing the new built-in support, I tried to match as many > >> existing error

Re: [PATCH] rs6000: Fix up build of non-glibc/aix/darwin powerpc* targets [PR104298]

2022-01-31 Thread Segher Boessenkool
, it is much nicer to have those explicit everywhere. > +#ifndef OPTION_GLIBC > +#define OPTION_GLIBC 0 > +#endif So can you add a comment like that before this please? Okay for trunk with that. Thanks! Segher

Re: Ping: [PATCH] Use system default for long double if not specified on PowerPC.

2022-01-31 Thread Segher Boessenkool
compiler configured the same should behave the same, whatever the host compiler does. I've told you this before. Segher

Re: [PATCH 4/8] rs6000: Consolidate target built-ins code

2022-01-31 Thread Segher Boessenkool
; +void > +rs6000_init_builtins (void) > +{ > + tree tdecl; > + tree t; Don't declare things long before they are used please. ... Bah, I am commenting on existing code... Please do not mix code movement and other things in the same patch. In the (very few!) cases where you need things to stay together for bisectability, you can still submit it as multiple patches (and you have that, that is how you write it in the first place!), just comment that you need to check in a few patches together. Is it a big hassle to do that now, for this patch? Segher

Re: Ping: [PATCH] Use system default for long double if not specified on PowerPC.

2022-01-31 Thread Segher Boessenkool
On Mon, Jan 31, 2022 at 02:38:27PM -0500, Michael Meissner wrote: > On Mon, Jan 31, 2022 at 12:52:28PM -0600, Segher Boessenkool wrote: > > Hi! > > > > On Mon, Jan 31, 2022 at 01:49:03PM -0500, Michael Meissner wrote: > > > * config/rs6000/rs6000.cc (TA

Re: [PATCH 4/8] rs6000: Consolidate target built-ins code

2022-01-31 Thread Segher Boessenkool
On Mon, Jan 31, 2022 at 04:01:58PM -0600, Bill Schmidt wrote: > On 1/31/22 3:32 PM, Segher Boessenkool wrote: > > On Fri, Jan 28, 2022 at 11:50:22AM -0600, Bill Schmidt wrote: > >> Overloading support remains in rs6000-c.cc. > > So, what is needed to move that as well? Is

Re: [PATCH] rs6000: Fix up PCH on powerpc* [PR104323]

2022-02-01 Thread Segher Boessenkool
ee %s = NULL_TREE;\n if (float128_type_node)\n", > + buf); >else if (dfp_found) > - fprintf (init_file, " if (dfloat64_type_node)\n "); > +fprintf (init_file, > + " tree %s = NULL_TREE;\n if (dfloat64_type_node)\n", > + buf); Things are much more readable if you break this into multiple print statements. I realise the existomg code is like that, but that could be improved. So, okay for trunk (modulo what Bill finds), and you can include the testcase as well after I have fixed the selector. Thanks Jakub! Segher

Re: [PATCH v2 1/8] rs6000: More factoring of overload processing

2022-02-01 Thread Segher Boessenkool
code == RS6000_OVLD_VEC_INSERT) > +returned_expr = resolve_vec_insert (&res, arglist, nargs, loc); > + else if (fcode == RS6000_OVLD_VEC_STEP) > +returned_expr = resolve_vec_step (&res, arglist, nargs); > + > + if (res == resolved) > +return returned_expr; This is so convoluted because the functions do two things, and have two return values (res and returned_expr). Segher

Re: [PATCH v2 3/8] rs6000: Unify error messages for built-in constant restrictions

2022-02-01 Thread Segher Boessenkool
eed to be 1ULL btw? (You need this if restr_val1[i] can be greater than or equal to 32). (32 itself would work, but is UB nevertheless). Okay with that. Thanks! Segher

Re: [PATCH 5/8] rs6000: Fix LE code gen for vec_cnt[lt]z_lsbb [PR95082]

2022-02-01 Thread Segher Boessenkool
; (VCTZLSBB_V4SI): Likewise. > (VCTZLSBB_V8HI): Likewise. Please don't break lines early? Changelog lines are one tab followed by 72 chars. The patch is fine though. Thanks! Segher

Re: [PATCH] powerc: Fix asm machine directive for some CPUs

2022-02-02 Thread Segher Boessenkool
> > The default is to ask for back ports after a break. Can I back port the > patch (with the default: break) to GCC 10 and 11 now? I have many more changes, but I'll deal with that. Okay for 11 and 10. Thanks! Segher

[PATCH] rs6000/testsuite: Return 0 for powerpc_altivec_ok on other targets

2022-02-02 Thread Segher Boessenkool
Tested on powerpc64-linux {-m32,-m64}. Committed. Segher 2022-02-02 Segher Boessenkool gcc/testsuite/ * lib/target-supports.exp (check_effective_target_powerpc_altivec_ok): Return 0 if the target is not Power. Restructure and add some comments. --- gcc/testsuite/lib

Re: [PATCH 6/8] rs6000: Remove -m[no-]fold-gimple flag [PR103686]

2022-02-02 Thread Segher Boessenkool
rd ends there, there is no need to assert that :-) Okay for trunk like that. Thanks! Segher

Re: [PATCH v3 1/8] rs6000: More factoring of overload processing

2022-02-03 Thread Segher Boessenkool
TS > +|| fcode == RS6000_OVLD_VEC_EXTRACT > +|| fcode == RS6000_OVLD_VEC_INSERT > +|| fcode == RS6000_OVLD_VEC_STEP)) > return NULL; Even I can understand that! Thank you! :-) Okay for trunk. Segher

Re: [PATCH] PR rtl-optimization/101885: Prevent combine from clobbering flags

2022-02-03 Thread Segher Boessenkool
p (reg, SET_DEST (set1))) > + { > + undo_all (); > + return 0; > + } > + } > + } The patch is okay for trunk. Thank you! Also okay for backports (after waiting for fallout a week or two). Segher

Re: [PATCH, V2] Use system default for long double if not specified on PowerPC.

2022-02-04 Thread Segher Boessenkool
he gcc -v output) dows not say what defaults the build compiler used. I already NAKed this patch for weeks, and I do it again now. Segher

Re: [PATCH, V2] Use system default for long double if not specified on PowerPC.

2022-02-04 Thread Segher Boessenkool
On Fri, Feb 04, 2022 at 02:10:03PM -0600, Peter Bergner wrote: > On 2/4/22 12:03 PM, Segher Boessenkool wrote: > > On Fri, Feb 04, 2022 at 04:43:53PM +0100, Andreas Schwab wrote: > >> On Feb 04 2022, Michael Meissner via Gcc-patches wrote: > >>> If the user did not

Re: [PATCH v3] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]

2022-02-06 Thread Segher Boessenkool
but then error; in all other cases it should do it. This patch is pretty much equal to not allowing any inlining if the caller and callee have not identical compilation options. So sure, it causes us to not have any unwanted inlining, but it does that by preventing all other inlining at the same time. Segher

Re: [PATCH v2] rs6000: Disable MMA if no VSX support [PR103627]

2022-02-07 Thread Segher Boessenkool
On Mon, Feb 07, 2022 at 01:54:00PM +0800, Kewen.Lin wrote: > on 2022/1/28 上午1:17, Segher Boessenkool wrote: > > On Thu, Jan 27, 2022 at 07:21:33PM +0800, Kewen.Lin wrote: > >>PR target/103627 > >>* config/rs6000/rs6000.cc (rs6000_option_override_intern

Re: [PATCH] rs6000: Add support for vmsumcud and vec_msumc

2022-02-07 Thread Segher Boessenkool
r_operand" "v") > + (match_operand:V1TI 3 "register_operand" "v")] > +UNSPEC_VMSUMCUD))] > + "TARGET_POWER10" > + "vmsumcud %0,%1,%2,%3" > + [(set_attr "type" "vecsimple")] > +) This can be properly described in RTL instead of using an unspec. This is much preferable. I would say compare to maddhd[u], but those insns aren't implemented either (maddld is though). Segher

Re: [PATCH] rs6000: Add support for vmsumcud and vec_msumc

2022-02-08 Thread Segher Boessenkool
On Mon, Feb 07, 2022 at 10:06:36PM -0600, Bill Schmidt wrote: > On 2/7/22 5:05 PM, Segher Boessenkool wrote: > > On Mon, Feb 07, 2022 at 04:20:24PM -0600, Bill Schmidt wrote: > >> I observed recently that a couple of Power10 instructions and built-in > >> func

Re: [PATCH, V2] Use system default for long double if not specified on PowerPC.

2022-02-09 Thread Segher Boessenkool
parent goal here is to give users compilers that default to IEEE QP long double earlier. That is a fine goal, but it should be achieved bu actually changing the default earlier, not by leaving behind a large fraction of users! Segher

Re: [PATCH] rs6000: Correct function prototypes for vec_replace_unaligned

2022-02-09 Thread Segher Boessenkool
ken. You could use const_0_to_15_operand together with an insn condition for example. It seems all uses of 0_to_12 have similar problems? Removing it completely also saves use from having to fix its documentation (in predicates.md) :-) The patch is okay for trunk. Thanks! Segher

Re: [PATCH] combine: Fix ICE with substitution of CONST_INT into PRE_DEC argument [PR104446]

2022-02-10 Thread Segher Boessenkool
gt; +/* { dg-do compile { target ia32 } } */ > +/* { dg-options "-O2 -mrtd" } */ > + > +register volatile int a __asm__("%esp"); > +void foo (void *); > +void bar (void *); > + > +void > +baz (void) > +{ > + foo (__builtin_return_address (0)); > + a = 0; > + bar (__builtin_return_address (0)); > +} So does it not fail if you make this valid code (by using another register)? bp, si, or di maybe? Okay with that fixed. If fixing it is too hard, okay like this (I don't have to maintain other peoples' backends' testsuites after all...) Thanks! Segher

Re: [PATCH] combine: Fix ICE with substitution of CONST_INT into PRE_DEC argument [PR104446]

2022-02-10 Thread Segher Boessenkool
On Thu, Feb 10, 2022 at 05:21:07PM +0100, Jakub Jelinek wrote: > On Thu, Feb 10, 2022 at 10:10:13AM -0600, Segher Boessenkool wrote: > > But we do have that in other cases, and not just for combine. IMO it > > is a good idea to robustify for_each_inc_dec (simply have it skip if the

Re: [PATCH] combine: Fix ICE with substitution of CONST_INT into PRE_DEC argument [PR104446]

2022-02-10 Thread Segher Boessenkool
On Thu, Feb 10, 2022 at 06:23:58PM +0100, Jakub Jelinek wrote: > On Thu, Feb 10, 2022 at 10:42:03AM -0600, Segher Boessenkool wrote: > > > Not on x86, that isn't a general auto-inc-dec target, but uses PRE_DEC > > > etc. only for the sp hard register. > > > &g

<    1   2   3   4   5   6   7   8   9   10   >