Re: [PATCH 2/4] rs6000: Add tests for SSE4.1 "test" intrinsics

2021-07-12 Thread Segher Boessenkool
On Sun, Jul 11, 2021 at 10:49:27AM -0500, Bill Schmidt wrote: > LGTM.  I can't approve, but recommend approval as is. Okay for trunk. Thanks! Segher > >2021-06-29 Paul A. Clarke > > > >gcc/testsuite/ChangeLog: > > * gcc.target/powerpc/sse4_

Re: [PATCH 4/4] rs6000: Add tests for SSE4.1 "blend" intrinsics

2021-07-12 Thread Segher Boessenkool
On Sun, Jul 11, 2021 at 11:19:56AM -0500, Bill Schmidt wrote: > Please resubmit this when you resubmit 3/4, in case any adjustments are > needed. It is testing if elsewhere-defined functions work according to its specification -- let's hope that doesn't change ;-) Segher

Re: [PATCH] Check type size for doloop iv on BITS_PER_WORD [PR61837]

2021-07-13 Thread Segher Boessenkool
On Mon, Jul 12, 2021 at 08:20:14AM +0200, Richard Biener wrote: > On Fri, 9 Jul 2021, Segher Boessenkool wrote: > > Almost all targets just use Pmode, but there is no such guarantee I > > think, and esp. some targets that do not have machine insns for this > > (but want to ge

Re: [PATCH] Check type size for doloop iv on BITS_PER_WORD [PR61837]

2021-07-13 Thread Segher Boessenkool
in rtl part. > https://gcc.gnu.org/g:8a15faa730f99100f6f3ed12663563356ec5a2c0 Does that solve PR67288 (and its many duplicates)? Segher

Re: [PATCH V2] Use preferred mode for doloop iv [PR61837].

2021-07-13 Thread Segher Boessenkool
p;& TYPE_UNSIGNED (ntype)); Should that be pref_type instead of ntype? If not, write it as two separate asserts please. > +static machine_mode > +rs6000_preferred_doloop_mode (machine_mode) > +{ > + return word_mode; > +} This is fine if the generic code does the right thing if it passes say TImode here, and if it never will pass some other mode class mode. Segher

Re: [PATCH] rs6000: Support [u]mul3_highpart for vector

2021-07-13 Thread Segher Boessenkool
hich enables vectorizer > to recog mul_highpart. It actually is correct already, it will just not be used yet, right? But the testcases will fail until the generic support lands. Okay for trunk. Thanks! Segher

Re: rs6000: Generate an lxvp instead of two adjacent lxv instructions

2021-07-13 Thread Segher Boessenkool
t; then the actual changes as a separate patch? That way it is much easier > > to review :-) > > Ok, I split the patch into 2 patches. The one here is simply the move. This one is obviously okay for trunk. Thanks! Segher

Re: rs6000: Generate an lxvp instead of two adjacent lxv instructions

2021-07-13 Thread Segher Boessenkool
're going to > + load it together with this register. */ > + i++; > + } > + } > + } > + > + rtx dst_i = gen_rtx_REG (GET_MODE (op), regno); > + emit_insn (gen_rtx_SET (dst_i, op)); > } So we are sure we have a hard register here, and it is a VSX register. Okay. Factoring this code would not hurt ;-) Okay for trunk. Thanks! Segher

Re: [PATCH 1/4 committed] rs6000: Add support for SSE4.1 "test" intrinsics

2021-07-13 Thread Segher Boessenkool
offline making a preprocessor macro for this long attribute line. Which is a fine suggestion! Something for the future, maybe? Segher

Re: [Questions] Is there any bit in gimple/rtl to indicate this IR support fast-math or not?

2021-07-14 Thread Segher Boessenkool
o like to have their intrisic code optimized, so there's > likely conflicting interest here. If people do not want anything optimised they should use -O0, or write assembler code instead. GCC in general optimises where it can, as any good compiler should. There are various facilities for preventing optimisations in much more targeted places of course -- and most of those do not tell the compiler "do not do X", but they instead say "here Y happens, and you do not know the details of that", effectively telling the compiler "hands off!" Segher

Re: [PATCH V2] Use preferred mode for doloop iv [PR61837].

2021-07-14 Thread Segher Boessenkool
enient around most REs, you need a lot of escaping without it) to get "partial newline-sensitive matching", which is usually what you want (see "man re_syntax" for the details). The generic changes look fine to me (but what do I know about Gimple!) The rs6000 changes are fine if the rest is approved (and see the testcase comments). Thanks! Segher

Re: [PATCH] rs6000: Support [u]mul3_highpart for vector

2021-07-14 Thread Segher Boessenkool
On Wed, Jul 14, 2021 at 10:12:46AM +0800, Kewen.Lin wrote: > on 2021/7/14 上午6:07, Segher Boessenkool wrote: > > Hi! > > > > On Tue, Jul 13, 2021 at 04:58:42PM +0800, Kewen.Lin wrote: > >> This patch is to make Power10 newly introduced vector > >> multipl

Re: [RFC/PATCH] vect: Recog mul_highpart pattern

2021-07-14 Thread Segher Boessenkool
by some tool) changing this is Just Wrong. Segher

Re: Repost #2: [PATCH] PR 100170: Fix eq/ne tests on power10.

2021-07-14 Thread Segher Boessenkool
Please do not send the same patches in a new thread. It is much more work to keep track of. Just ping patches by replying to them (either copy the list or not, either works). Thanks! Segher

Re: Repost #2: [PATCH] PR 100170: Fix eq/ne tests on power10.

2021-07-14 Thread Segher Boessenkool
On Wed, Jul 14, 2021 at 03:25:32PM -0500, Segher Boessenkool wrote: > Please do not send the same patches in a new thread. It is much more > work to keep track of. Just ping patches by replying to them (either > copy the list or not, either works). Thanks! Oh, and do not edit th

Re: Repost #2: [PATCH] PR 100170: Fix eq/ne tests on power10.

2021-07-14 Thread Segher Boessenkool
an-assembler-times {\msetbcr\M} 1 { target { > has_arch_pwr10 } } } } */ > +/* { dg-final { scan-assembler-times {\maddze\M} 3 } } */ It may be easier to split the patch into two, where one part can get the setbcr (the first, simplest function), and the rest stays the same. Okay for trunk like that. Thanks! Segher

Re: Repost: [PATCH] Fix long double tests when default long double is not IBM.

2021-07-14 Thread Segher Boessenkool
rcmp (buffer, "3") != 0; > + #endif > + } > +} [add_options_for_ppc_long_double_override_ibm128 ""]] > +} Those casts are useless btw, don't do that. And that sizeof *has* to be 16, and so does that of __ibm128, so just write 16 please. Many more of the same... Use something like the stuff starting at foreach { armfunc armflag armdefs } { (for arm) in target-supports.exp? Segher

Re: [PATCH 05/55] rs6000: Add helper functions for parsing

2021-07-14 Thread Segher Boessenkool
per only skips whitespace, so > nothing unprintable is actually handled or skipped here. Right, and that behaviour would not match with the function name either. isspace returns true for 0x09..0x0d and 0x20, all of which are whitespace. Segher

Re: [PATCH 05/55] rs6000: Add helper functions for parsing

2021-07-14 Thread Segher Boessenkool
eans exactly the same. You can write just diag ("bla bla bla") instead of (*diag) ("bla bla bla"); btw. The patch is okay for trunk with whatever you want to do with those comments (but do fix the consume_whitespace comment please). Thanks! Segher

Re: rs6000: Generate an lxvp instead of two adjacent lxv instructions

2021-07-15 Thread Segher Boessenkool
for backporting to GCC 11 after a day or two on trunk? If it is tested well enough, yes. There are many things that can break in this code, so I am not very comfortable with backporting it so close to a release, but if it is important, we can take that risk. Thanks, Segher

Re: [RFC/PATCH] vect: Recog mul_highpart pattern

2021-07-15 Thread Segher Boessenkool
On Thu, Jul 15, 2021 at 09:40:52AM +0800, Kewen.Lin wrote: > on 2021/7/15 上午3:32, Segher Boessenkool wrote: > > The normal rule is you cannot go over 80. It is perfectly fine to have > > shorter lines, certainly if that is nice for some other reason, so > > automatically (b

Re: [PATCH] Fix PR 101453: ICE with optimize and large integer constant

2021-07-17 Thread Segher Boessenkool
the GGC itself (the aprintf implementation already factors calculating the length needed, it will be easy to do this). Segher

Re: [PATCH] Fix PR 101453: ICE with optimize and large integer constant

2021-07-18 Thread Segher Boessenkool
On Sat, Jul 17, 2021 at 03:13:59PM -0700, Andrew Pinski wrote: > On Sat, Jul 17, 2021 at 2:31 PM Segher Boessenkool > wrote: > > On Fri, Jul 16, 2021 at 11:35:25AM -0700, apinski--- via Gcc-patches wrote: > > > --- a/gcc/c-family/c-common.c > > > +++ b/gcc/c-fami

Re: [PATCH 10/55] rs6000: Main function with stubs for parsing and output

2021-07-19 Thread Segher Boessenkool
quot;r"); > + if (!bif_file) > +{ > + fprintf (stderr, "Cannot find input built-in file '%s'.\n", bif_path); > + exit (1); > +} Say s/find/open/ in the error? > + fprintf (stderr, "Cannot find input overload file '%s'.\n", ovld_path); (more) Okay with those trivialities, and the unlink stuff looked at. Thanks! Segher

Re: [PATCH 11/55] rs6000: Parsing built-in input file, part 1 of 3

2021-07-19 Thread Segher Boessenkool
that you do not need the macro check at every use? Or use a different function, even. (That has nothing to do with this patch in particular of course). Okay for trunk. Thanks! Segher

Re: [PATCH 12/55] rs6000: Parsing built-in input file, part 2 of 3

2021-07-19 Thread Segher Boessenkool
val1[restr_cnt] = argtype->val1; > + val2[restr_cnt++] = argtype->val2; Just make the ++ more explicit please (put it in a separate statement). Okay for trunk. Thanks! Segher

Re: [PATCH 13/55] rs6000: Parsing built-in input file, part 3 of 3

2021-07-19 Thread Segher Boessenkool
= %d, pred = %d, htm = %d, \ > +htmspr = %d, htmcr = %d, mma = %d, quad = %d, pair = %d, no32bit = %d, \ > +32bit = %d, cpu = %d, ldstmask = %d, lxvrse = %d, lxvrze = %d, \ > +endian = %d.\n", This needs some formatting. With thatt, kay for trunk. Thanks! Segher

Re: [PATCH 14/55] rs6000: Parsing of overload input file

2021-07-19 Thread Segher Boessenkool
= match_identifier (); > + ovlds[curr_ovld].ovld_id_name = id; > + consume_whitespace (); > +} So everything is just strings here, so you do not have any real problem with conflicting IDs. Okay. This is fine for trunk as well. Thanks! Segher

Re: [PATCH 15/55] rs6000: Build and store function type identifiers

2021-07-19 Thread Segher Boessenkool
(void) rbt_insert (&fntype_rbt, buf); Casting to void does not ignore a return value. But is rbt_insert marked up as warn_unused_result anyway? Simply not using the return value is fine as well. If you want to be very explicit, you can write if (rbt_insert (&fntype_rbt, buf)) ; /* Duplicates are fine and expected here. */ Okay for trunk with or without such improvements. But do fix that indentation thing please ;-) Thanks! Segher

Re: Patch ping (was Re: [PATCH] rs6000: Fix up easy_vector_constant_msb handling [PR101384])

2021-07-20 Thread Segher Boessenkool
gt; > 2021-07-20 Jakub Jelinek > > PR target/101384 > * config/rs6000/rs6000.c (vspltis_constant): Accept EASY_VECTOR_MSB > only if step and copies are equal to 1. > > * gcc.dg/pr101384.c: New test. Okay for all backports. Thanks! Segher

Re: [PATCH] rs6000: Fix up easy_vector_constant_msb handling [PR101384]

2021-07-20 Thread Segher Boessenkool
hat . will not match newlines. See https://www.tcl.tk/man/tcl/TclCmd/re_syntax.html#M95 for details. Here, you could also use /* { dg-final { scan-assembler-times {\mvspltis[whb] [^,]*,-1\M} 9 } } */ (but that (more traditional) approach quickly becomes clumsy). Okay for trunk with or without those improvements (with the switch formatting fix though). Thanks! Segher

Re: [PATCH] rs6000: Fix up easy_vector_constant_msb handling [PR101384]

2021-07-20 Thread Segher Boessenkool
On Tue, Jul 20, 2021 at 05:01:00PM +0200, Jakub Jelinek wrote: > On Tue, Jul 20, 2021 at 09:48:26AM -0500, Segher Boessenkool wrote: > > > --- gcc/testsuite/gcc.dg/pr101384.c.jj2021-07-13 13:45:42.971992584 > > > +0200 > > > +++ gcc/testsuite/gcc.dg/pr1

Re: [PATCH] rs6000: Fix up easy_vector_constant_msb handling [PR101384]

2021-07-20 Thread Segher Boessenkool
On Tue, Jul 20, 2021 at 05:24:57PM +0200, Jakub Jelinek wrote: > On Tue, Jul 20, 2021 at 10:17:08AM -0500, Segher Boessenkool wrote: > > > I think not all of the -Wpsabi diagnostics is emitted with warning{,_at} > > > etc. that -w disables, others are emitted with i

Re: [PATCH] Fix for powerpc64 long double complex divide failure

2021-07-20 Thread Segher Boessenkool
hout the patch and pass with the patch. Hi! In the future, please Cc: the relevant maintainers. Your patch will be seen much quicker and much more reliably if you do. I'll handle it now. Segher

Re: [PATCH] Fix for powerpc64 long double complex divide failure

2021-07-20 Thread Segher Boessenkool
__LIBGCC_DF_EPSILON__) > +#define RMINSCAL (1 / __LIBGCC_DF_EPSILON__) > #define RMAX2 (RBIG * RMIN2) > #else > #define RBIG (__LIBGCC_TF_MAX__ / 2) What *is* your long double? It should always be IEEE QP float in this file! And it is for me. So what did you do differently? Segher

Re: [PATCH 10/55] rs6000: Main function with stubs for parsing and output

2021-07-20 Thread Segher Boessenkool
ent." > > So I think we're good here. Yup, we'll survive, argc > 0 pretty much everywhere (but technically it isn't even required by POSIX afaics). Thanks, Segher

Re: [PATCH 16/55] rs6000: Write output to the builtin definition include file

2021-07-20 Thread Segher Boessenkool
On Thu, Jun 17, 2021 at 10:19:00AM -0500, Bill Schmidt wrote: > 2021-06-07 Bill Schmidt > > gcc/ > * config/rs6000/rs6000-gen-builtins.c (write_defines_file): > Implement. Okay for trunk. Thanks! Segher

Re: [PATCH 17/55] rs6000: Write output to the builtins header file

2021-07-20 Thread Segher Boessenkool
d change the enum fields to ints and cast them in and out > + to avoid requiring a GTY((user)) designation, but that seems > + unnecessarily gross. */ Quite :-) Maybe you want to print that as a comment to the generated file as well? It makes more sense there. Okay for trunk. Thanks! Segher

Re: [PATCH 18/55] rs6000: Write output to the builtins init file, part 1 of 3

2021-07-20 Thread Segher Boessenkool
t; + for the overload. We sort out the real types when > + processing the overload in the gcc front end. */ Same as before -- please put such comments in the generated file! Okay for trunk. Thanks! Segher

Re: [PATCH 19/55] rs6000: Write output to the builtins init file, part 2 of 3

2021-07-20 Thread Segher Boessenkool
On Thu, Jun 17, 2021 at 10:19:03AM -0500, Bill Schmidt wrote: > 2021-06-07 Bill Schmidt > > gcc/ > * config/rs6000/rs6000-gen-builtins.c (write_init_bif_table): > Implement. Okido. Thanks! Segher

Re: [PATCH 10/55] rs6000: Main function with stubs for parsing and output

2021-07-21 Thread Segher Boessenkool
On Tue, Jul 20, 2021 at 08:51:58PM -0500, Bill Schmidt wrote: > On 7/20/21 6:22 PM, Segher Boessenkool wrote: > >On Tue, Jul 20, 2021 at 05:19:54PM -0500, Bill Schmidt wrote: > >>See the main function.  All three files are guaranteed to have been > >>opened for writi

Re: [PATCH 20/55] rs6000: Write output to the builtins init file, part 3 of 3

2021-07-21 Thread Segher Boessenkool
side effects of strtok on the original string by using a copy. */ > + char *buf = (char *) malloc (strlen (str) + 1); > + strcpy (buf, str); libiberty has xstrdup (and it can also be done using your new best friend asprintf of course ;-) ) Okay for trunk with or without such improvements. Thanks! Segher

Re: [PATCH 21/55] rs6000: Write static initializations for built-in table

2021-07-21 Thread Segher Boessenkool
ne as the condition but : on another is not normal style. Some "if"s would be more readable anyway? Okay for trunk. Thanks! Segher

Re: [PATCH 22/55] rs6000: Write static initializations for overload tables

2021-07-21 Thread Segher Boessenkool
On Thu, Jun 17, 2021 at 10:19:06AM -0500, Bill Schmidt wrote: > 2021-06-07 Bill Schmidt > > gcc/ > * config/rs6000/rs6000-gen-builtins.c (write_ovld_static_init): New > function. > (write_init_file): Call write_ovld_static_init. Okay for trunk. Thanks! Segher

Re: [PATCH 23/55] rs6000: Incorporate new builtins code into the build machinery

2021-07-21 Thread Segher Boessenkool
antime, you can make all these targets depend on an intermediate target (that you mark with .INTERMEDIATE), and have that intermediate target have the dependencies. This is from version 3.74.3 and we require 3.80 already, so this is fine. > +EXTRA_HEADERS += rs6000-vecdefines.h > +rs6000-vecdefines.h : rs6000-builtins.c No space before the colon please. Segher

Re: [PATCH, rs6000] fix execution failure of parity_1.f90 on P10 [PR100952]

2021-07-21 Thread Segher Boessenkool
t does hurt combine. So don't. */ Perfect. Okay for trunk and backports (but do not touch GCC 11 right now without RM approval, see <https://gcc.gnu.org/pipermail/gcc/2021-July/236837.html>). Thanks! Segher

Re: [PATCH, rs6000] fix failure test cases caused by disabling mode promotion for pseudos [PR100952]

2021-07-21 Thread Segher Boessenkool
embler {\mmtvsrwa\M} } } */ (This test should not test for powerpc64*-*-* but powerpc*-*-* btw, and that means it can just be left out, so just /* { dg-do compile { target lp64 } } */ and nothing more). Okay for trunk with those changes (the RE and lp64). Thanks! (Test if it works of course; I did not :-) ) Segher

Re: 0001-Don-t-skip-prologue-instructions-as-it-could-affect-.patch

2021-07-22 Thread Segher Boessenkool
s use gen_frame_mem(), which does set_mem_alias_set (mem, get_frame_alias_set ()); so what is going wrong here? Segher

Re: 0001-Don-t-skip-prologue-instructions-as-it-could-affect-.patch

2021-07-22 Thread Segher Boessenkool
treload? Or what else? Your patch looks correct, but I'd like to know why it has seemed to work for so long :-) Segher

Re: [PATCH] rs6000: Fix restored rs6000_long_double_type_size.

2021-07-23 Thread Segher Boessenkool
Hi! On Fri, Jul 23, 2021 at 07:47:54AM +0200, Martin Liška wrote: > On 7/12/21 7:20 PM, Segher Boessenkool wrote: > >>>>+static __attribute__ ((optimize ("-fno-stack-protector"))) __typeof > >>>>(f) * > >>> > >>>-fno-stack-prot

Re: [PATCH] rs6000: Fix restored rs6000_long_double_type_size

2021-07-23 Thread Segher Boessenkool
if (rs6000_long_double_type_size == FLOAT_PRECISION_TFmode) > +; /* The option value can be seen when cl_target_option_restore is > called. */ (line too long) The comment is still very cryptic. What you have in the changelog is much better digestible. Okay for trunk with those things fixed. Thanks! Segher

Re: Repost #2: [PATCH] PR 100170: Fix eq/ne tests on power10.

2021-07-26 Thread Segher Boessenkool
On Mon, Jul 26, 2021 at 04:46:46PM -0400, Michael Meissner wrote: > On Wed, Jul 14, 2021 at 04:22:06PM -0500, Segher Boessenkool wrote: > > > --- a/gcc/testsuite/gcc.target/powerpc/ppc-ne0-1.c > > > +++ b/gcc/testsuite/gcc.target/powerpc/ppc-ne0-1.c > > > > > -

Re: 0001-Don-t-skip-prologue-instructions-as-it-could-affect-.patch

2021-07-26 Thread Segher Boessenkool
t RTL, that RTL follows just the normal semantics of RTL. This means that dead code can be deleted, etc. Well that is about the most interesting transform that can be done so late in the compilation pipeline :-) Segher

Re: [PATCH 23/55] rs6000: Incorporate new builtins code into the build machinery

2021-07-27 Thread Segher Boessenkool
Hi! On Mon, Jul 26, 2021 at 10:26:25PM -0500, Bill Schmidt wrote: > On 7/21/21 1:58 PM, Segher Boessenkool wrote: > >On Thu, Jun 17, 2021 at 10:19:07AM -0500, Bill Schmidt wrote: > >>+# TODO: Whenever GNU make 4.3 is the minimum required, we should use > >>+# grouped t

Re: [PATCH v2 1/6] rs6000: Add support for SSE4.1 "blend" intrinsics

2021-07-28 Thread Segher Boessenkool
> _mm_blend_ps, _mm_blendv_ps): New. I'm not sure if this is allowed like this in changelogs? In either case it is more obvious / aesthetically pleasing / etc. to write "gcc/". But also, it is fine to leave out this one, it being the default :-) The patch is fiune for trunk. Thank you! Segher

Re: [PATCH v2 2/6] rs6000: Add tests for SSE4.1 "blend" intrinsics

2021-07-28 Thread Segher Boessenkool
maybe say that? Okay for trunk. Thanks! Segher

Re: [PATCH v2 3/6] rs6000: Add support for SSE4.1 "ceil" intrinsics

2021-07-28 Thread Segher Boessenkool
Hi! On Fri, Jul 16, 2021 at 08:50:19AM -0500, Paul A. Clarke wrote: > * config/rs6000/smmintrin.h (_mm_ceil_pd, _mm_ceil_ps, > _mm_ceil_sd, _mm_ceil_ss): New. This is fine. Thanks! Segher

Re: [PATCH v2 4/6] rs6000: Add tests for SSE4.1 "ceil" intrinsics

2021-07-28 Thread Segher Boessenkool
l testsuite files after all, and we should test horrrible style as well! :-P ) Thanks, Segher

Re: [PATCH v2 5/6] rs6000: Add support for SSE4.1 "floor" intrinsics

2021-07-28 Thread Segher Boessenkool
On Fri, Jul 16, 2021 at 08:50:21AM -0500, Paul A. Clarke wrote: > * config/rs6000/smmintrin.h (_mm_floor_pd, _mm_floor_ps, > _mm_floor_sd, _mm_floor_ss): New. Okay for trunk. Thanks! Segher

Re: [PATCH v2 6/6] rs6000: Add tests for SSE4.1 "floor" intrinsics

2021-07-28 Thread Segher Boessenkool
-floorss.c: New. > * gcc.target/powerpc/sse4_1-roundpd-2.c: Copy from > gcc/testsuite/gcc.target/i386. Okido. Thanks! Segher

Re: Repost: [PATCH] PR 100168: Fix call test on power10.

2021-07-28 Thread Segher Boessenkool
t as { dg-final { scan-assembler {bl f(\n\s*nop|@notoc)} { target { powerpc*-*-linux* && lp64 } } } } */ though? Segher

Re: [PATCH v2] Fix for powerpc64 long double complex divide failure

2021-07-30 Thread Segher Boessenkool
.c (RBIG, RMIN, RMIN2, RMINSCAL, RMAX2): > Fix long double complex divide for native IBM 128-bit. "Use more correct values."? Okay for trunk. Thank you! Segher

Re: [PATCH, V2] Define KFmode constants for libgcc.

2021-04-29 Thread Segher Boessenkool
ame isn't good (supported for _what_? It is only for complex multiplication, right?) > (rs6000_iibgcc_floating_mode_supported_p): New target hook. Typo ("iib"). > +rs6000_libgccc_floating_mode_supported_p (scalar_float_mode mode) Typo ("gccc"). Segher

Re: [PATCH, V2] Define KFmode constants for libgcc.

2021-04-29 Thread Segher Boessenkool
On Thu, Apr 29, 2021 at 07:23:03PM -0400, Michael Meissner wrote: > On Thu, Apr 29, 2021 at 05:50:03PM -0500, Segher Boessenkool wrote: > > On Thu, Apr 29, 2021 at 05:48:53PM -0400, Michael Meissner wrote: > > > This patch defines the constants needed for libgcc for the PowerPC &

Re: [PATCH] split loop for NE condition.

2021-04-30 Thread Segher Boessenkool
) > + || TYPE_PRECISION (type) == TYPE_PRECISION (sizetype)) > + continue; "IDX is an unsigned type that is widened to SIZETYPE" etc. This code assumes SIZETYPE is bigger than any other integer type. Is that true? Even if so, the second comment could be improved. (Not reviewing further, my Gimple isn't near good enough, sorry. But at least to my untrained eye it looks pretty good :-) ) Segher

Re: [PATCH] Remove CC0

2021-05-04 Thread Segher Boessenkool
On Tue, May 04, 2021 at 10:44:38AM +0200, Richard Biener wrote: > On Tue, May 4, 2021 at 1:40 AM Segher Boessenkool > wrote: > > > > This removes CC0 and all directly related infrastructure. > > > > CC_STATUS, CC_STATUS_MDEP, CC_STATUS_MDEP_INIT, and NOTICE_UPDATE_C

[wwwdocs] Remove CC0 from backends.html

2021-05-04 Thread Segher Boessenkool
Pushed. What is next? :-) Segher --- htdocs/backends.html | 105 +-- 1 file changed, 52 insertions(+), 53 deletions(-) diff --git a/htdocs/backends.html b/htdocs/backends.html index 8d95e915709c..8034a5776360 100644 --- a/htdocs/backends.html

Re: [PATCH] Remove CC0

2021-05-05 Thread Segher Boessenkool
Hi~ On Tue, May 04, 2021 at 04:08:22PM +0100, Richard Earnshaw wrote: > On 03/05/2021 23:55, Segher Boessenkool wrote: > >CC_STATUS_INIT is suggested in final.c to also be useful for ports that > >are not CC0, and at least arm seems to use it for something. So I am > >le

[wwwdocs] Remove powerpcspe from backends.html

2021-05-05 Thread Segher Boessenkool
Committed. Segher --- htdocs/backends.html | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/backends.html b/htdocs/backends.html index 8034a5776360..f80378b90170 100644 --- a/htdocs/backends.html +++ b/htdocs/backends.html @@ -103,7 +103,6 @@ nios2 | C ia

Re: [wwwdocs] Remove CC0 from backends.html

2021-05-05 Thread Segher Boessenkool
On Tue, May 04, 2021 at 06:30:04PM +0200, Eric Botcazou wrote: > > Pushed. What is next? :-) > > You can finally remove powerpcspe. :-) Done, thanks! Segher

Re: [PATCH, rs6000] Add ALTIVEC_REGS as pressure class

2021-05-07 Thread Segher Boessenkool
" 3 } } */ > +/* { dg-final { scan-assembler-times "xxlor" 2 } } */ > /* { dg-final { scan-assembler-times "vrlwnm" 2 } } */ > /* { dg-final { scan-assembler-times "vrldnm" 2 } } */ So what is this replaced with? Was it an "xxlmr" and it is just unnecessary now? The patch is okay for trunk. Thanks! Segher

Re: PR98125, PowerPC64 -fpatchable-function-entry

2021-05-07 Thread Segher Boessenkool
Bootstrapped powerpc64le-linux and x86_64-linux all langs. I did see > one regression on both targets, libgo runtime/pprof. It's unclear to > me what that means. Probably nothing? It is one of the tests that fail regularly. Segher

Re: Revert "rs6000: Avoid -fpatchable-function-entry* regressions on powerpc64 be [PR98125]"

2021-05-07 Thread Segher Boessenkool
On Fri, May 07, 2021 at 12:19:51PM +0930, Alan Modra wrote: > This reverts commit b680b9049737198d010e49cf434704c6a6ed2b3f now > that the PowerPC64 ELFv1 regression is fixed properly. This is okay when the rest goes in. Do it in a bisectable order if possible? If that is easy :-) Segher

Re: PowerPC64 ELFv1 -fpatchable-function-entry

2021-05-07 Thread Segher Boessenkool
ode_labelno; > > + switch_to_section (function_section (decl)); This could in theory call us again. That should not be a problem, if > > + ++func_code_labelno; (Please use postfix increments btw) ...this is done *before* the call, so that we get two different labels. Segher

Re: PowerPC64 ELFv1 -fpatchable-function-entry

2021-05-07 Thread Segher Boessenkool
get (&id); > - const char *name = IDENTIFIER_POINTER (id); > - name = targetm.strip_name_encoding (name); > - fprintf (asm_out_file, ",%s", name); > + fputc (',', asm_out_file); Please don't use fputc and friends, just use fprintf. The compiler will make that fputc if that is a good idea. Looks good with those things tweaked. Segher

Re: [PATCH, rs6000] Add ALTIVEC_REGS as pressure class

2021-05-10 Thread Segher Boessenkool
On Mon, May 10, 2021 at 08:53:31AM -0500, Peter Bergner wrote: > On 5/10/21 7:52 AM, Pat Haugen wrote: > > On 5/7/21 6:00 PM, Segher Boessenkool wrote: > >> So what is this replaced with? Was it an "xxlmr" and it is just > >> unnecessary now? > >

Re: [PATCH 2/2 v2] rs6000: Guard density_test only for vector version

2021-05-10 Thread Segher Boessenkool
; + computing single scalar iteration cost). */ > + if (data->costing_for_scalar) > +return; "..., so immediately return if we are passed costing for ..."? The patch is okay for trunk with those or similar changes. Thanks! Segher

Re: [PATCH] rs6000: Move rs6000_vect_nonmem into target cost_data

2021-05-10 Thread Segher Boessenkool
; (struct rs6000_cost_data): ...here. > (rs6000_init_cost): Use vect_nonmem of cost_data instead. > (rs6000_add_stmt_cost): Likewise. > (rs6000_finish_cost): Likewise. This is okay for trunk. Thanks! Segher

Re: PowerPC64 ELFv2 -fpatchable-function-entry

2021-05-10 Thread Segher Boessenkool
thus no NOPs will be output. */ > + if (record_p) > +default_print_patchable_function_entry (file, crtl->patch_area_entry, > + record_p); > +} That is trickiness that will break later. Can you make this less hacky please? Changing the generic code is just fine as well, it needs some love. Segher

Re: [PATCH] rs6000: Fix cpu selection w/ isel (PR100108)

2021-05-10 Thread Segher Boessenkool
On Tue, Apr 20, 2021 at 03:00:42PM +, Segher Boessenkool wrote: > There are various non-IBM CPUs with isel as well, so it is easiest if we > just don't consider that flag here (it is not needed). > > 2021-04-20 Segher Boessenkool > > PR target/100108 >

Re: [PATCH] forwprop: Support vec perm fed by CTOR and CTOR/CST [PR99398]

2021-05-11 Thread Segher Boessenkool
that is as technical as I can review this :-) Segher

Re: [PATCH 00/57] Replace the Power target-specific built-in machinery

2021-05-11 Thread Segher Boessenkool
y the last three patches). I'll dig it up from the archives. Segher

Re: [PATCH 1/4] rs6000: Add -mrop-protect and -mprivileged flags

2021-05-12 Thread Segher Boessenkool
document it in the right location :-) Okay for trunk and 11 with those changes. Thanks! Segher

Re: [PATCH 1/4] rs6000: Add -mrop-protect and -mprivileged flags

2021-05-12 Thread Segher Boessenkool
+@option{-mcpu=power10} is used. > > Is the option on by default? Nope. > if so, may want another testcase to > verify ROP instructions are generated with just -mcpu=power10. > if not, > perhaps the "-mcpu=power10" reference here instead be "-mrop-protect". This is the help text for -mrop-protect :-) Probably the help text could be more future-proof though? Segher

Re: [PATCH 2/4] rs6000: Emit ROP-protect instructions in prologue and epilogue

2021-05-12 Thread Segher Boessenkool
the template, or maybe you can use print_operand_punct_valid if you think this 'p' will happen more often (there exist more insns like this already, we just never generate them). > +;; ROP mitigation instructions. > + > +(define_insn "hashst" > + [(set (match_operand:DI 0 "simple_offsettable_mem_operand" "=m") > +(unspec:DI [(match_operand:DI 1 "int_reg_operand" "r")] > +UNSPEC_HASHST))] This needs unspec_volatile in principle. There will be only one per function, so it is kind of moot, but still. Thanks, Segher

Re: [PATCH 3/4] rs6000: Conditionally define __ROP_PROTECT__

2021-05-12 Thread Segher Boessenkool
er the place in the compiler should be. Currently there are 53 of 64 bits used, there is some room, and that is good :-) Segher

Re: [PATCH 3/4] rs6000: Conditionally define __ROP_PROTECT__

2021-05-12 Thread Segher Boessenkool
On Sun, Apr 25, 2021 at 08:50:17PM -0500, Bill Schmidt wrote: > 2021-03-25 Bill Schmidt > > gcc/ > * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define > __ROP_PROTECT__ if -mrop-protect is selected. Okay for trunk and 11. Thanks! Segher

Re: [PATCH 4/4] rs6000: Add ROP tests

2021-05-12 Thread Segher Boessenkool
7;s off by default (see the Init(0) in patch 1/4). And in general we only need a test for it if the default isn't fixed. Segher

Re: [PATCH 4/4] rs6000: Add ROP tests

2021-05-12 Thread Segher Boessenkool
-mrop-protect" } */ > + > +/* Verify that __ROP_PROTECT__ is predefined for -mrop-protect. */ > + > +extern void abort (void); > + > +int main () > +{ > +#ifndef __ROP_PROTECT__ > + abort (); > +#endif > + return 0; > +} Please do this in a compile test instead? #ifndef __ROP_PROTECT__ har har har #endif Okay for trunk and 11 with such changes. Thank you! Segher

Re: [PATCH] rs6000: Fix wrong code generation for vec_sel [PR94613]

2021-05-13 Thread Segher Boessenkool
/* Mark unsigned tests with CCUNSmode. */ > - cc_mode = CCUNSmode; > >/* Invert condition to avoid compound test if necessary. */ > if (rcode == GEU || rcode == LEU) So this is related to the _uns thing. Could you split off that change? Probably as an earlier patch (but either works for me). > @@ -15629,6 +15625,9 @@ rs6000_emit_vector_cond_expr (rtx dest, rtx op_true, > rtx op_false, >if (!mask) > return 0; > > + if (mask_mode != dest_mode) > + mask = simplify_gen_subreg (dest_mode, mask, mask_mode, 0); Indent just two characters please: line continuations (usually) align, but indents do not. Can you fold vsel and xxsel together completely? They have exactly the same semantics! This does not have to be in this patch of course. Thanks, Segher

Re: [PATCH 1/4] rs6000: Add -mrop-protect and -mprivileged flags

2021-05-14 Thread Segher Boessenkool
est: "Generate code that will run in privileged state." Okay for trunk and 11 with whatever you end up with. Thanks! Segher

Re: [PATCH 2/4] rs6000: Emit ROP-mitigation instructions in prologue and epilogue

2021-05-14 Thread Segher Boessenkool
har *p = rs6000_privileged ? "p" : ""; Please make this an unspec_volatile? > +(define_insn "hashchk" Same things here of course, but it is volatile already. Okay for trunk and 11 with such changes. Thanks! Segher

Re: [PATCH 3/4] rs6000: Conditionally define __ROP_PROTECT__

2021-05-14 Thread Segher Boessenkool
On Thu, May 13, 2021 at 10:34:56PM -0500, Bill Schmidt via Gcc-patches wrote: > gcc/ > * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define > __ROP_PROTECT__ if -mrop-protect is selected. Okay for trunk and 11. Segher

Re: [PATCH 4/4] rs6000: Add ROP tests

2021-05-14 Thread Segher Boessenkool
gcc.target/powerpc/rop-5.c: New. Okay for trunk and everything. Thanks! Segher

Re: reorg.c (fill_slots_from_thread): Reinstate code typoed out in "Remove CC0".

2021-05-15 Thread Segher Boessenkool
r cris-elf. FWIW, I wrote the removed code (sans the > validly removed cc0 line), a part of what was committed at > 2020-08-24 as 0e6c51de8ec47 / r11-2814. > > This commit gets cris-elf test-results back to a sane state > (tested at 0ffdbc85d9a6 / r12-761). > > gcc: > * reorg.c (fill_slots_from_thread): Reinstate code typoed out in > "Remove CC0". Thank you for fixing it! And sorry for the mistake. Cheers, Segher

Re: doc/tm.texi.in (Condition Code): Tweak post-cc0 wording.

2021-05-16 Thread Segher Boessenkool
;s no non-modern > representation, so the "Modern" qualifier is just confusing. That is just fine of course :-) I would commit such changes as obvious btw, so if you do so as well, you can blame me if anyone asks! Segher

Re: PowerPC64 ELFv2 -fpatchable-function-entry

2021-05-18 Thread Segher Boessenkool
Hi! On Tue, May 18, 2021 at 07:43:49PM +0930, Alan Modra wrote: > On Mon, May 10, 2021 at 04:39:55PM -0500, Segher Boessenkool wrote: > > Huh, did it not already do that?! Hrm, all the other hooks seem to be > > called via rs6000.c currently. But you do the same, so why do

Re: [PATCH V2] Split loop for NE condition.

2021-05-18 Thread Segher Boessenkool
tch, > like "bootstrap and regression test on x86_64-pc-linux-gnu" for instance. Jiu Fu did all that. If you understand that ppc64le means powerpc64-linux of course. It is interesting one loop fails on x86. But that is why we have stage1 :-) Segher

Re: [PATCH] rs6000: Remove old psabi warnings

2021-05-18 Thread Segher Boessenkool
s in the testsuite. But someone who is bored could just delete them all and see what breaks, perhaps :-) Segher

Re: [PATCH V3 2/2] rs6000: Load store fusion for rs6000 target using common infrastructure

2024-02-29 Thread Segher Boessenkool
es please. * Better documentation, too, including documentations in the code. Don't describe *what*, anyone can see that anyway, but describe *why*. * This is way too much for one patch. Split this into many patches, properly structured in a patch series. The design will need some explanation, but none of the code should need that, ever! Segher

<    9   10   11   12   13   14   15   16   17   18   >