Re: [PING] Add conversions between _Float128 and Decimal.

2021-02-08 Thread Segher Boessenkool
On Mon, Feb 08, 2021 at 11:32:19AM -0500, Michael Meissner wrote: > Ping patch. This really needs to go in to allow switching the long double > type > to IEEE 128-bit. Please send a version that incorporates fixes to Will's nits? Especially fix the copyright dates. Segher

Re: [PATCH,rs6000] Optimize pcrel access of globals [ping]

2021-02-11 Thread Segher Boessenkool
e, 1, pass_analyze_swaps); That should be a separate patch. Please remove this from this patch. > + if (!TARGET_PCREL && TARGET_PCREL_OPT) > +{ > + if ((rs6000_isa_flags_explicit & OPTION_MASK_PCREL_OPT) != 0) > + error ("%qs requires %qs", "-mpcrel-opt", "-mpcrel"); > + > + rs6000_isa_flags &= ~OPTION_MASK_PCREL_OPT; > +} Please just make the new flag not do anything if pcrel is not enabled (but having the pass not run in that case). > +/* Return true if an REG with a given MODE is loaded from or stored into a > MEM > + location uses a non-prefixed offsettable address. This is used to > validate Please fix that sentence. Also, offsettable is nonsense. > @@ -25771,11 +25854,34 @@ void > rs6000_asm_output_opcode (FILE *stream) > { >if (next_insn_prefixed_p) > -fprintf (stream, "p"); > +{ > + fprintf (stream, "p"); > + > + /* Reset flag in case there are separate insn lines in the sequence, so > + the 'p' is only emited for the first line. This shows up when we are Spelling. > +;; Whether an insn loads an external address for the PCREL_OPT optimizaton. > +(define_attr "loads_extern_addr" "no,yes" > + (const_string "no")) It should be called loads_external_address if that is what it does. Not random characters removed from the name. It really needs a better name than this. It seems to be about loading the value of a global symbol or such, instead? > --- a/gcc/config/rs6000/t-rs6000 > +++ b/gcc/config/rs6000/t-rs6000 > @@ -23,6 +23,10 @@ TM_H += $(srcdir)/config/rs6000/rs6000-cpus.def > TM_H += $(srcdir)/config/rs6000/rs6000-modes.h > PASSES_EXTRA += $(srcdir)/config/rs6000/rs6000-passes.def > > +pcrel-opt.o: $(srcdir)/config/rs6000/pcrel-opt.c > + $(COMPILE) $< > + $(POSTCOMPILE) The filename should start with rs6000-, to prevent collissions (in the object dir this shares the space with everything from gcc/). > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/pcrel-opt-inc-di.c > @@ -0,0 +1,18 @@ > +/* { dg-do compile } */ > +/* { dg-require-effective-target powerpc_pcrel } */ > +/* { dg-require-effective-target lp64 } */ > +/* { dg-options "-O2 -mdejagnu-cpu=power10" } */ Don't check for lp64 separately? The pcrel test already does currently, and if that ever changes we *want* this to be tested. So many things wrong with this still. But, we can reliably disable the whole thing, and it of course improves performance a lot. Aaron, could you please fix everything you think you can do easily, and repost (noting the things you did *not* do?) Thanks in advance! Segher

Re: rs6000: Fix invalid splits when using Altivec style addresses [PR98959]

2021-02-12 Thread Segher Boessenkool
weak. Okay for trunk. Thanks! Also okay for GCC 10. Do you need backports to earlier? Which then? Segher

Re: [PATCH] PR 99133, Mark xxspltiw, xxspltidp, and xxsplti32x as being prefixed

2021-02-17 Thread Segher Boessenkool
ion ended up as some prefixed form (8 bytes). So, for insns like xxspltiw you should just set "prefixed" to "yes", because that makes sense, is not confusing. The code that prefixes "p" to the mnemonic should change, instead. It can look at some new attribute, but it could also just use prefixed_load_p (insn) || prefixed_store_p (insn) || prefixed_paddi_p (insn) or similar (perhaps make a helper function for that then?) Thanks, Segher

Re: [PATCH] rs6000: Convert the vector element register to SImode [PR98914]

2021-02-18 Thread Segher Boessenkool
tsuite/gcc.target/powerpc/pr98914.c > > @@ -0,0 +1,11 @@ > > +/* { dg-do compile } */ > > +/* { dg-require-effective-target powerpc_p8vector_ok } */ > > +/* { dg-options "-Og -mvsx" } */ Please use -Og -mdejagnu-cpu=power8 instead. Was this tested on BE configs? Please make sure you do. Please fix (also all Will's other comments, thanks as always!) and repost (after testing again, of course). Thanks! Segher

Re: [PATCH] rs6000: Use rldimi for vec init instead of shift + ior

2021-02-18 Thread Segher Boessenkool
you make a different testcase perhaps? This patch looks fine otherwise. > > made by Segher here[2], it's to make unsigned int vector init go with > > rldimi to merge two integers instead of shift and ior. > > > > Segher's patch in [2] is required to make the te

Re: [PATCH] rs6000: Use rldimi for vec init instead of shift + ior

2021-02-18 Thread Segher Boessenkool
Hi! On Wed, Feb 03, 2021 at 02:37:05PM +0800, Kewen.Lin wrote: > This patch merges the previously approved one[1] and its relied patch > made by Segher here[2], it's to make unsigned int vector init go with > rldimi to merge two integers instead of shift and ior. > gcc/ChangeLog

Re: [PATCH] rs6000: Use rldimi for vec init instead of shift + ior

2021-02-19 Thread Segher Boessenkool
Hi! On Fri, Feb 19, 2021 at 11:06:16AM +0800, Kewen.Lin wrote: > on 2021/2/19 上午2:33, Segher Boessenkool wrote: > > Is there a PR you should mention here? > > I thought this is trivial so didn't file one upstream PR. I did a > searching in upstream bugzilla, PR93453 look

Re: [PATCH] PR 99133, Mark xxspltiw, xxspltidp, and xxsplti32x as being prefixed

2021-02-19 Thread Segher Boessenkool
On Thu, Feb 18, 2021 at 10:44:14PM -0500, Michael Meissner wrote: > On Wed, Feb 17, 2021 at 06:09:39PM -0600, Segher Boessenkool wrote: > > Why test a p10 patch on a p8? > > Well it is just a code gen patch, so I can test it on any system, even an > x86_64 with a cross compiler.

Re: [PATCH, V2] Add conversions between _Float128 and Decimal.

2021-02-20 Thread Segher Boessenkool
+ > + if (__strtoieee128) > +return __strtoieee128 (string, endptr); > + > + num = strtold (string, endptr); > + return (_Float128) num; Do not cast return values please. All casts you do should be *needed*, have a purpose. > + /* Use the sprintf library function to write the floating point value to a > string. Line too long. Okay for trunk with those fixes. Thanks! Segher

Re: [PATCH] doc: c: c++: Document the C/C++ extended asm empty input constraints

2021-02-22 Thread Segher Boessenkool
"zlc.c":3:2 -1 (nil)) which has no dependency, gets fed the constant 42 instead, because *anything at all* is allowed by an empty constraint. You can also make this clear by using asm volatile("# %0" :: ""(x)); which gives # x0 resp. # 42 or, with -fverbose-asm: # x0// tmp93 and # 42// which is clear as mud, but it means in f there was a variable as input to the asm, and in g there wasn't. Segher

Re: [PATCH, V2] Add conversions between _Float128 and Decimal.

2021-02-22 Thread Segher Boessenkool
On Mon, Feb 22, 2021 at 03:52:52PM -0500, Michael Meissner wrote: > On Sat, Feb 20, 2021 at 06:33:12PM -0600, Segher Boessenkool wrote: > > So if built with a glibc version before 2.32 (less than a year old) it > > will give the wrong answer. This needs improving, or it will be an

Re: [PATCH] doc: c: c++: Document the C/C++ extended asm empty input constraints

2021-02-23 Thread Segher Boessenkool
Hi! On Tue, Feb 23, 2021 at 12:05:34AM +, Neven Sajko wrote: > On Mon, 22 Feb 2021 at 16:30, Segher Boessenkool > wrote: > > On Mon, Feb 15, 2021 at 11:22:52PM +, Neven Sajko via Gcc-patches wrote: > > > There is a long-standing, but undocumented GCC inline assembly

Re: [PATCH] rs6000: Fix MMA API - Add support for compatibility built-ins

2021-02-23 Thread Segher Boessenkool
): USE VSX_BUILTIN_ASSEMBLE_PAIR, s/USE/Use/ The patch is okay for trunk and for 10. Thank you! Segher

Re: [PATCH, rs6000] Rename variable for clarity

2021-02-23 Thread Segher Boessenkool
Hi! On Tue, Feb 23, 2021 at 04:12:42PM -0600, Pat Haugen wrote: > gcc/ > * config/rs6000/rs6000.c (next_insn_prefixed_p): Rename. > (rs6000_final_prescan_insn): Adjust. > (rs6000_asm_output_opcode): Likewise. Excellent. Okay for trunk and 10. Thank you! Segher

Re: [PATCH v2] rs6000: Convert the vector element register to SImode [PR98914]

2021-02-24 Thread Segher Boessenkool
allers of rs6000_expand_vector_init. See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98914#c2> as well? So I don't think you do this in the right place. You can convince me with good arguments of course :-) Segher

Re: [PATCH,rs6000] [v2] Optimize pcrel access of globals

2021-02-24 Thread Segher Boessenkool
ss of an external variable using the PCREL_GOT relocation and a > > single load or store that uses that external address. > > > > Produced by a cast of thousands: > > * Michael Meissner > > * Peter Bergner > > * Bill Schmidt > > * Alan Modra > > * Se

Re: [PATCH,rs6000] [v2] Optimize pcrel access of globals

2021-02-24 Thread Segher Boessenkool
duced by a cast of thousands: > * Michael Meissner > * Peter Bergner > * Bill Schmidt > * Alan Modra > * Segher Boessenkool > * Aaron Sawdey > > This incorporates the changes requested in Segher's review. A few things I > did not change were the insn-at-a-t

Re: [PATCH, V2] Add conversions between _Float128 and Decimal.

2021-02-24 Thread Segher Boessenkool
even in > the absence of the bootstrap issue.) Certainly. The other option, which we need for correctness *anyway*, is to have libgcc do the conversion without using any specific libc. Segher

Re: [PATCH,rs6000] [v2] Optimize pcrel access of globals

2021-02-25 Thread Segher Boessenkool
Hi! On Thu, Feb 25, 2021 at 09:45:29AM +0100, Richard Biener wrote: > On Wed, Feb 24, 2021 at 6:39 PM Segher Boessenkool > wrote: > > On Tue, Feb 23, 2021 at 09:48:28AM +0100, Richard Biener wrote: > > > stage1 please? > > > > Versions of this patch were fi

Re: [PATCH, V2] Add conversions between _Float128 and Decimal.

2021-02-25 Thread Segher Boessenkool
On Thu, Feb 25, 2021 at 02:23:01AM +, Joseph Myers wrote: > On Wed, 24 Feb 2021, Segher Boessenkool wrote: > > > The other option, which we need for correctness *anyway*, is to have > > libgcc do the conversion without using any specific libc. > > Which ends up bein

Re: rs6000: Fix ICE in rs6000_init_builtins when compiling with -mcpu=440 [PR99279]

2021-02-25 Thread Segher Boessenkool
with no regressions. > Ok for mainline? Okay, thank you! > The compat builtin patch was approved for backporting to GCC10, so we'll > need this fix to go along with it. Okay for that as well of course. Segher > PR target/99279 > * config/rs6000/rs6000-call.c (r

Re: rs6000: Fix ICE in rs6000_init_builtins when compiling with -mcpu=440 [PR99279]

2021-02-26 Thread Segher Boessenkool
On Thu, Feb 25, 2021 at 09:40:58PM -0600, Peter Bergner wrote: > On 2/25/21 7:09 PM, Segher Boessenkool wrote: > > On Thu, Feb 25, 2021 at 07:05:26PM -0600, Peter Bergner wrote: > >> The compat builtin patch was approved for backporting to GCC10, so we'll > >> n

Re: [PATCH] Honor --disable-decimal-float in building _Float128 support.

2021-02-26 Thread Segher Boessenkool
s not to not include standard headers (although, for free-standing you need that); the point is not to depend on external code, in libgcc. > -extern int __sprintfkf (char *restrict, const char *restrict, ...); > +extern int __sprintfkf (char *restrict, const char *restrict, _Float128); This is a separate bug fix, so should be separate. Segher

Re: add -mpowerpc-gpopt to options for sqrt insn on PowerPC

2021-02-26 Thread Segher Boessenkool
ou should essentially never use -mpowerpc-gpopt, but instead use a -mcpu= that has it. You also of course whould not do that in run tests if the cpu does not support those insns. But, Alex, you say this avoids an ICE? You shouldn't avoid the ICE in that testcase then -- instead, fix it! (Or report it). Segher

Re: [PATCH] Honor --disable-decimal-float in building _Float128 support.

2021-02-26 Thread Segher Boessenkool
On Fri, Feb 26, 2021 at 07:32:25PM -0500, Michael Meissner wrote: > On Fri, Feb 26, 2021 at 04:36:20PM -0600, Segher Boessenkool wrote: > > On Fri, Feb 26, 2021 at 01:33:41AM -0500, Michael Meissner wrote: > > > In addition, I removed the dependency on the target having a valid

Re: add -mpowerpc-gpopt to options for sqrt insn on PowerPC

2021-03-01 Thread Segher Boessenkool
On Mon, Mar 01, 2021 at 09:46:29AM +0100, Richard Biener wrote: > On Sat, Feb 27, 2021 at 2:43 AM Segher Boessenkool > wrote: > > > > On Fri, Feb 26, 2021 at 12:31:16PM -0500, David Edelsohn wrote: > > > On Fri, Feb 26, 2021 at 11:09 AM Alexandre Oliva > > &g

Re: [PATCH 1/3 V2] Fix __sprintfkf prototype in libgcc.

2021-03-01 Thread Segher Boessenkool
clude _sprintfkf.h. This is okay for trunk. Thank you! Segher

Re: [PATCH 2/3 V2] Do not include stdio.h in libgcc's Decimal/Float128 conversions.

2021-03-01 Thread Segher Boessenkool
format, number); > > - return sprintf (string, format, (long double) number); > + return __builtin_sprintf (string, format, (long double) number); sprintf as well as __builtin_sprintf do not exist exactly when does not (or are not guaranteed to exist, anyway). Segher

Re: add -mpowerpc-gpopt to options for sqrt insn on PowerPC

2021-03-02 Thread Segher Boessenkool
On Tue, Mar 02, 2021 at 08:13:51AM -0300, Alexandre Oliva wrote: > On Feb 26, 2021, Segher Boessenkool wrote: > > You should essentially never use -mpowerpc-gpopt, but instead use a > > -mcpu= that has it. You also of course whould not do that in run tests > > if the cpu d

Re: [PATCH 2/3 V2] Do not include stdio.h in libgcc's Decimal/Float128 conversions.

2021-03-02 Thread Segher Boessenkool
On Tue, Mar 02, 2021 at 04:25:33PM -0500, Michael Meissner wrote: > On Mon, Mar 01, 2021 at 05:15:44PM -0600, Segher Boessenkool wrote: > > On Mon, Mar 01, 2021 at 12:18:52PM -0500, Michael Meissner wrote: > > > The _sprintfkf.c file was including stdio.h to get the definition

Re: [PATCH, rs6000] Add Power10 scheduling description

2021-03-02 Thread Segher Boessenkool
ight (C) 2020-2020 Free Software Foundation, Inc. > > Nit: Can probably just be a single 2020 reference. :-) Not anymore :-/ Segher

Re: [PATCH, rs6000] Add Power10 scheduling description

2021-03-02 Thread Segher Boessenkool
>> + (eq_attr "update" "no") > >> + (eq_attr "size" "!128") > >> + (eq_attr "prefixed" "!no") > > > > I'm sure there is reason, but remind me.. "!no" versus "yes" ? > > >From my prior patch, the prefixed attribute can now have values > >no/yes/always, so '!no' means 'yes' || 'always'. (eq_attr "bla" "!smth") means (ne_attr "bla" "smth") (but that latter syntax is not recognised). Segher

Re: [PATCH, rs6000] Add Power10 scheduling description

2021-03-02 Thread Segher Boessenkool
t; 12 And this (and the other division latencies). Please check Will's comments too, and (build) test on both BE and LE. With that, okay for trunk, and thank you! Segher

Re: add -mpowerpc-gpopt to options for sqrt insn on PowerPC

2021-03-03 Thread Segher Boessenkool
soft-float. Which a) almost no one does, and b) overriding that causes *less* testing, not *more*. Anyway, this is PR99352 now, and I have a patch (that works with -msoft-float as well, etc.) Will commit later today. Segher

Re: add -mpowerpc-gpopt to options for sqrt insn on PowerPC

2021-03-03 Thread Segher Boessenkool
On Wed, Mar 03, 2021 at 04:45:23PM -0300, Alexandre Oliva wrote: > On Mar 2, 2021, Segher Boessenkool wrote: > > > This is PR99352 now. > > Thanks. I've filed PR99371 for the add_options_for_sqrt_insn > incompleteness, As I said before, I don't agree with

Re: [PATCH, rs6000] Update "size" attribute for Power10

2021-03-03 Thread Segher Boessenkool
store,veclogical") > + (set_attr "size" "256,256,*") > (set_attr "length" "*,*,8")]) Does "*" do the right thing here? It has "32" as the default, is that wanted? It doesn't matter much at all of course, but I'd expect 128 or even just 256 for all alternatives. Okay for trunk with or without that tweaked. Thanks! Segher

Re: [PATCH,rs6000] Tighten predicates for p10 ld/cmpi fusion

2021-03-08 Thread Segher Boessenkool
copied this from lwa_operand, but, what is that reload_completed for? It is not clear to me, it could use a comment. Do you know? Should it support subregs *at all* here, since you do not allow reg (unlike lwa_operand, which is a bit confusingly named because of that). (The "inner" variable can just be replaced by "op" everywhere, here and in lwa_operand, "op" is never used again). Segher

Re: [PATCH v3 1/2] rs6000: Add support for _mm_minpos_epu16

2021-08-02 Thread Segher Boessenkool
__i = 1; __i < 8; __i++) > +{ > + if (__u.__uh[__i] < __rmin) > + { > + __rmin = __u.__uh[__i]; > + __ridx = __i; > + } > +} > + __r.__uh[0] = __rmin; > + __r.__uh[1] = __ridx; > + return __r.__m; > +} As before: does this work correctly on BE? Was it tested there? Okay for trunk if so. Thanks! Segher

Re: [PATCH v3 2/2] rs6000: Add test for _mm_minpos_epu16

2021-08-02 Thread Segher Boessenkool
1,68 @@ > +/* { dg-do run } */ > +/* { dg-options "-O2 -mpower8-vector -Wno-psabi" } */ > +/* { dg-require-effective-target p8vector_hw } */ What does this need P8 for? Please test for just what you need, and don't use -mpower8-vector at all, it is never needed? Okay for trunk with that fixed. Thanks! Segher

Re: [PATCH 42/55] rs6000: Handle gimple folding of target built-ins

2021-08-02 Thread Segher Boessenkool
> bears looking at to see why expressions like (uint128_1 < uint128_2) > will generate poor code. Details like this should probably not be exposed before RTL anyway? Everything else is at a more abstracted level as well before expand? It will be interesting to see what causes the worse code though :-) Segher

[PATCH] rs6000: "e" is not a free constraint letter

2021-08-03 Thread Segher Boessenkool
It is the prefix of the "es" and "eI" constraints. Committing to trunk. Segher 2021-08-03 Segher Boessenkool * config/rs6000/constraints.md: Remove "e" from the list of available constraint characters. --- gcc/config/rs6000/constraint

gcc-patches@gcc.gnu.org

2021-08-03 Thread Segher Boessenkool
No functional changes. Tested on powerpc64-linux. Committed. Segher 2021-08-03 Segher Boessenkool * config/rs6000/vsx.md (*vsx_le_perm_store_): Use && instead of &. --- gcc/config/rs6000/vsx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/c

Re: [PATCH 46/55] rs6000: Builtin expansion, part 3

2021-08-03 Thread Segher Boessenkool
and the compiler > issues a warning." Yup. And we still (have to) support older glibc versions, since various distros ship with something older (2.23 is only 5 years old). Segher

Re: [PATCH 47/55] rs6000: Builtin expansion, part 4

2021-08-03 Thread Segher Boessenkool
ke three extra characters will kill you here. But is have to be changed in the machine description of course, these are existing pattern names. Segher

Re: [PATCH 47/55] rs6000: Builtin expansion, part 4

2021-08-03 Thread Segher Boessenkool
> > + || GET_MODE (target) != tmode > > + || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) > > No space after "!" ? (here and later on 'pat'.). It can be written as just || !insn_data[icode].operand[0].predicate (target, tmode)) even. The * is completely optional, and you don't need the extra parens without it. Segher

Re: [PATCH 50/55] rs6000: Update rs6000_builtin_decl

2021-08-03 Thread Segher Boessenkool
o fill the space would prob be fine.) Well, this should completely go away later in the series... Anything named "new" should :-) But some short comment wrt that wouldn't hurt, sure. And there always are a few words too say about any patch, if only to help reviewers :-) Segher

Re: [PATCH 52/55] rs6000: Debug support

2021-08-03 Thread Segher Boessenkool
d of commenting it out. Or fix up its spacing :-P > > + for (int i = 1; i < (int) RS6000_BIF_MAX; i++) That is an good reason to *not* have the max as enum value, btw: you need a cast to use it. Make the max a macro, and then it can include all casting you need right in there :-) Segher

Re: [PATCH 53/55] rs6000: Update altivec.h for automated interfaces

2021-08-03 Thread Segher Boessenkool
ver cause problems. But yes, it certainly is not the best place to do it here, and it is done elsewhere already, as you say. It does make a user-visible difference though: without the #if user code using the name "vec_vgbbd" for some other purpose will stop working (when building for older machines, it already will break on power8). These aren't reserved names. We don't really care though I guess ;-) Segher

Re: [PATCH, rs6000] Add store fusion support for Power10

2021-08-04 Thread Segher Boessenkool
> Can you think of any test cases we can use to demonstrate store fusion? It may be possible to make that reliable by doing a *really* simple testcase? But then it isn't testing very much :-( Segher

Re: [PATCH, rs6000] Add store fusion support for Power10

2021-08-04 Thread Segher Boessenkool
ion does. This might mean you need more than one testcase. The number one goal of our testsuite is to warn of regressions, so it really should be more than just a single two-liner scanning for one assembler insn. Maybe do a handful of cases? :-) Segher

Re: [PATCH 01/34] rs6000: Incorporate new builtins code into the build machinery

2021-08-04 Thread Segher Boessenkool
_LINKERFLAGS) $(BUILD_LDFLAGS) -o $@ \ > + $(filter-out $(BUILD_LIBDEPS), $^) $(BUILD_LIBS) I wonder what the difference is between BUILD_LINKERFLAGS and BUILD_LDFLAGS? Do you have any idea? Okay for trunk. Thanks! Segher

Re: [PATCH 02/34] rs6000: Add gengtype handling to the build machinery

2021-08-04 Thread Segher Boessenkool
gt; rs6000-pcrel-opt.o: $(srcdir)/config/rs6000/rs6000-pcrel-opt.c > $(COMPILE) $< Surprisingly I couldn't find docs or examples for EXTRA_GTYPE_DEPS. But it loks like it will work. Okay for trunkm thanks! Segher

Re: [PATCH] rs6000: Fix restored rs6000_long_double_type_size.

2021-08-05 Thread Segher Boessenkool
On Thu, Aug 05, 2021 at 02:05:24PM +0200, Martin Liška wrote: > On 7/23/21 7:57 PM, Segher Boessenkool wrote: > >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: > >>>>&g

Re: [PATCH 01/34] rs6000: Incorporate new builtins code into the build machinery

2021-08-05 Thread Segher Boessenkool
On Thu, Aug 05, 2021 at 08:47:54AM -0500, Bill Schmidt wrote: > Hi Segher, > > On 8/4/21 5:29 PM, Segher Boessenkool wrote: > >On Thu, Jul 29, 2021 at 08:30:48AM -0500, Bill Schmidt wrote: > >+rs6000-gen-builtins: rs6000-gen-builtins.o rbtree.o > >>+ $(LINKER_

Re: [PATCH] rs6000: Fix restored rs6000_long_double_type_size.

2021-08-05 Thread Segher Boessenkool
On Thu, Aug 05, 2021 at 06:49:21PM +0200, Martin Liška wrote: > On 8/5/21 5:39 PM, Segher Boessenkool wrote: > >>>If -mbork is the default, the coompiler whould behave the same if you > >>>invoke it with -mbork as when you do not. And the optimize attribute > >

Re: [PATCH] [rtl-optimization] Simplify vector shift/rotate with const_vec_duplicate to vector shift/rotate with const_int element.

2021-08-06 Thread Segher Boessenkool
't the end of the world, we have to do that already. If we can simplify things with a canonical form, that is great; if that causes too much extra work instead, it is not so great. These things have to be thought about. Segher

Re: [PATCH, rs6000] Add additional checks when identifying load/store instructions

2021-08-06 Thread Segher Boessenkool
at == NULL_RTX) > return false; > > - if (GET_CODE (pat) == SET) > + if (GET_CODE (pat) == SET > + && (REG_P (SET_SRC (pat)) || SUBREG_P (SET_SRC (pat > return find_mem_ref (SET_DEST (pat), str_mem); Similar here. Segher

Re: [PATCH, rs6000] Add additional checks when identifying load/store instructions

2021-08-06 Thread Segher Boessenkool
On Fri, Aug 06, 2021 at 10:29:40AM -0500, Pat Haugen wrote: > On 8/6/21 10:02 AM, Segher Boessenkool wrote: > >> - if (GET_CODE (pat) == SET) > >> + if (GET_CODE (pat) == SET && REG_P (SET_DEST (pat))) > >> return find_mem_ref (SET_SRC (pat), load_mem);

Re: [PATCH] rs6000: Add vec_unpacku_{hi,lo}_v4si

2021-08-06 Thread Segher Boessenkool
mail separately, your reply is whitespace damaged (format=flawed it looks like). Segher

Re: [PATCH, rs6000 V2] Add additional checks when identifying load/store instructions

2021-08-06 Thread Segher Boessenkool
, rtx *load_mem) >if (!pat || pat == NULL_RTX) > return false; > > - if (GET_CODE (pat) == SET) > -return find_mem_ref (SET_SRC (pat), load_mem); > + if (GET_CODE (pat)== SET) (space before ==) Okay for trunk with that. Thanks! Segher

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-06 Thread Segher Boessenkool
st pointer to void */ >RS6000_BTI_MAX > }; That is not what build_pointer_type (build_qualified_type (void_type_node, TYPE_QUAL_CONST)); builds though? Okay for trunk, but please look at those things, especially the pcvoid one! Thanks, Segher

Re: [PATCH] Fix typo in fold-vec-load-builtin_vec_xl-* tests.

2021-08-08 Thread Segher Boessenkool
ere? We do not *expect* it of course, but depending on that means we will have more patches to this testcase later. So maybe something like {\mp?lxv|\mlvx\M} Okay for trunk, thanks! Please think about making these tests more robust :-) Segher

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-08 Thread Segher Boessenkool
Hi! On Sun, Aug 08, 2021 at 11:53:38AM -0500, Bill Schmidt wrote: > On 8/6/21 7:01 PM, Segher Boessenkool wrote: > >On Thu, Jul 29, 2021 at 08:30:50AM -0500, Bill Schmidt wrote: > >>+ const vsc __builtin_altivec_abss_v16qi (vsc); > >>+ABSS_V16QI altivec_abss_v16q

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-09 Thread Segher Boessenkool
On Sun, Aug 08, 2021 at 03:53:01PM -0500, Bill Schmidt wrote: > On 8/8/21 3:27 PM, Segher Boessenkool wrote: > >Okido. What about the signed char though? > > Sorry, forgot to address that.  There are two reasons to keep it as is:  > (a) It matches what we have in the old s

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-09 Thread Segher Boessenkool
een working since the "dawn > of time," and I'm not proposing changes to that.  I'm hopeful with the > new system that it is a little clearer what is going on, though, since > you can easily see the const void * arguments in the definitions. Yeah, me too. But it all sounds just wrong. Segher

Re: [Patch v2 Fortran] Fix c_float128 and c_float128_complex on targets with 128-bit long double.

2021-08-10 Thread Segher Boessenkool
d, and it will change some day. > >and we can only support one of them unless we make some exception to > >the formula for mapping precision -> kind. And the mode the Fortran > >front end already prefers is the one that corresponds to long double > >or TFmode. > I concur. A kind number should always map to the same floating point format, it should not depend on unrelated compiler flags. It should not matter at all what "long double" maps to. Anything else leads to more insanity than needed. Segher

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-10 Thread Segher Boessenkool
On Tue, Aug 10, 2021 at 07:17:54AM -0500, Bill Schmidt wrote: > On 8/9/21 6:44 PM, Segher Boessenkool wrote: > >This is not a documented GCC extension either, and it might even > >conflict with the existing void * extension (allowing arithmetic on it, > >by defining sizeof(vo

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-10 Thread Segher Boessenkool
matter what it is cast to, will not be modified. So it is just documentation, nothing to do with overloading? Any cast (implicit as well!) will give new qualifiers, not just a new type. So I still do not see the point here. I'll just read it as "void *" :-) Segher

Re: [PATCH 05/34] rs6000: Add available-everywhere and ancient builtins

2021-08-10 Thread Segher Boessenkool
). So maybe the return type should be changed? The name of the builtin of course is unfortunate, but it is too late to change :-) Segher

Re: [PATCH 06/34] rs6000: Add power7 and power7-64 builtins

2021-08-10 Thread Segher Boessenkool
ate sixes." Look it up in the ISA if you aren't confused enough yet :-) Segher

Re: [PATCH 04/34] rs6000: Add VSX builtins

2021-08-10 Thread Segher Boessenkool
On Thu, Jul 29, 2021 at 08:30:51AM -0500, Bill Schmidt wrote: > * config/rs6000/rs6000-builtin-new.def: Add vsx stanza. Okay for trunk. Thanks! Segher

Re: [PATCH 05/34] rs6000: Add available-everywhere and ancient builtins

2021-08-10 Thread Segher Boessenkool
builtin exists on both 32-bit and on 64-bit, and returns what is a "long" in both cases. The point is that it is just a single "mfspr 268" always, which is fast, and importantly has fixed and low latency. Modulo perhaps that, okay for trunk. Thanks! Segher

Re: [PATCH 05/34] rs6000: Add available-everywhere and ancient builtins

2021-08-10 Thread Segher Boessenkool
On Tue, Aug 10, 2021 at 01:56:58PM -0500, Bill Schmidt wrote: > On 8/10/21 1:38 PM, Segher Boessenkool wrote: > >On Thu, Jul 29, 2021 at 08:30:52AM -0500, Bill Schmidt wrote: > >>* config/rs6000/rs6000-builtin-new.def: Add always, power5, and > >>power6 st

Re: [PATCH 05/34] rs6000: Add available-everywhere and ancient builtins

2021-08-11 Thread Segher Boessenkool
On Tue, Aug 10, 2021 at 04:29:10PM -0500, Bill Schmidt wrote: > On 8/10/21 12:34 PM, Segher Boessenkool wrote: > >On Tue, Aug 10, 2021 at 11:17:05AM -0500, will schmidt wrote: > >>On Thu, 2021-07-29 at 08:30 -0500, Bill Schmidt wrote: > >>>+; This will break for lon

Re: [Patch v3 Fortran] Fix c_float128 and c_float128_complex on targets with 128-bit long double.

2021-08-11 Thread Segher Boessenkool
ormat, and it would be wrong to assume that > *any* 128-bit mode that's not long double is IEEE. Absolutely. Modes are not types, and types are not modes. There are 128-bit floating point modes that are not IEEE, there are that are, and either can be used for long double, or neither. Segher

Re: [Patch v3 Fortran] Fix c_float128 and c_float128_complex on targets with 128-bit long double.

2021-08-11 Thread Segher Boessenkool
Hi! On Wed, Aug 11, 2021 at 12:29:06PM +0100, Iain Sandoe wrote: > > On 11 Aug 2021, at 11:55, Segher Boessenkool > > wrote: > > On Tue, Aug 10, 2021 at 04:46:11PM -0600, Sandra Loosemore wrote: > >> OK. I used your wording verbatim for the first one. For the

Re: [PATCH] rs6000: Make some BIFs vectorized on P10

2021-08-12 Thread Segher Boessenkool
another. > +#define CHECK(name) > \ > + __attribute__ ((optimize (1))) void check_##name () > \ What is the attribute for, btw? It seems fragile, but perhaps I do not understand the intention. Okay for trunk with whose lp64 things improved. Thanks! Segher

Re: [PATCH] rs6000: Make some BIFs vectorized on P10

2021-08-12 Thread Segher Boessenkool
lt" initially, didn't noticed the > following condition > need an adjustment after updating it to early return. Will fix it. Thanks :-) Segher

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

2021-08-12 Thread Segher Boessenkool
he L_divtc3 case in libgcc2.c to use different > constants in the case where TFmode is IBM long double, that would make > sense to me. This whole thing is there to *not* change generic code. Segher

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

2021-08-12 Thread Segher Boessenkool
what has changed in v3. Please do that in future patches? Segher

Re: [PATCH] Fix xxeval predicates (PR 99921).

2021-08-13 Thread Segher Boessenkool
ing point > register. This patch fixes that. Why register_operand instead of gpc_reg_operand? The former allows subregs of memory, likely not what you want here (and not in other rs6000 pattern that currently use it, either). Segher

Re: [PATCH] libgcc: Add a backchain fallback to _Unwind_Backtrace() on PowerPC

2021-08-13 Thread Segher Boessenkool
* symbol address from the trampoline saved area. */ No leading * in comments. > + context->ra = current->return_address; > + if (current->return_address != NULL && get_regs(context) != NULL) You can just write if (current->return_address && get_regs (context)) fwiw (note the space before the "("). > + { > + struct rt_sigframe *sigframe = (struct rt_sigframe*) current; Space before *. > + if (count + 1 == arg->size) > + break; > + arg->array[++count] = (void *) sigframe->uc.rsave.nip; > + current = (void *) sigframe->uc.rsave.gpr[1]; No two spaces. This needs a testcase (that can run on all subtargets). Segher

Re: [PATCH] Fix xxeval predicates (PR 99921).

2021-08-13 Thread Segher Boessenkool
On Fri, Aug 13, 2021 at 11:15:21AM -0400, David Edelsohn wrote: > On Fri, Aug 13, 2021 at 10:49 AM Segher Boessenkool > wrote: > > > > On Fri, Aug 13, 2021 at 12:14:14AM -0400, Michael Meissner wrote: > > > I noticed that the xxeval built-in function used the >

Re: [PATCH] Fix xxeval predicates (PR 99921).

2021-08-13 Thread Segher Boessenkool
On Fri, Aug 13, 2021 at 02:07:25PM -0400, David Edelsohn wrote: > On Fri, Aug 13, 2021 at 12:08 PM Segher Boessenkool > wrote: > > > > On Fri, Aug 13, 2021 at 11:15:21AM -0400, David Edelsohn wrote: > > > On Fri, Aug 13, 2021 at 10:49 AM Segher Boessenkool > >

Re: [PATCH] Fix xxeval predicates (PR 99921).

2021-08-14 Thread Segher Boessenkool
On Fri, Aug 13, 2021 at 04:33:26PM -0400, David Edelsohn wrote: > On Fri, Aug 13, 2021 at 4:24 PM Segher Boessenkool > wrote: > > On Fri, Aug 13, 2021 at 02:07:25PM -0400, David Edelsohn wrote: > > > On Fri, Aug 13, 2021 at 12:08 PM Segher Boessenkool > > > wrote: &

Re: [PATCH] Fix xxeval predicates (PR 99921).

2021-08-14 Thread Segher Boessenkool
d it as a pattern predicate. > I did actually think whether to use gpc_reg_operand or vsx_register_operand. > I > opted to use register_operand just because most of the surrounding code used > it. Not an unreasonable thing to do. But for that same reason, thinking it is good because surrounding code does the same thing, is a trap as well! Segher

Re: [PATCH] Fix incorrect computation in fill_always_executed_in_1

2021-08-17 Thread Segher Boessenkool
es after the rest. A very mimimal example would use [diff] orderfile = .gitorder with that file containing something like gcc/*.* and nothing else even. Yeah this is minimal ;-) Segher

Re: [PATCH 1/6] rs6000: Support SSE4.1 "round" intrinsics

2021-08-18 Thread Segher Boessenkool
a block at all, anyway? > >+__asm__ __volatile__ ( > >+ ".machine push; .machine \"power9\"; mffsce %0; .machine pop" > > Same issues in this function as above, I won't repeat them all. You need no quotes either, so you don't need to quote the quotes, fwiw. Segher

Re: [PATCH 1/6] rs6000: Support SSE4.1 "round" intrinsics

2021-08-18 Thread Segher Boessenkool
tin for mffsce, then please make one? :-) > +case _MM_FROUND_TO_NEAREST_INT: > + __tmp.__fr = __builtin_mffsl (); > + __attribute__((fallthrough)); Space before (. > +case _MM_FROUND_TO_NEAREST_INT |_MM_FROUND_NO_EXC: Space after |. Please fix these things and resend. Segher

Re: [PATCH] Move xx* builtins to vsx.md.

2021-08-18 Thread Segher Boessenkool
On Wed, Aug 18, 2021 at 04:42:42PM -0400, David Edelsohn wrote: > I wanted to give Segher a chance to comment on the structure. I think the current vector.md / altivec.md / vsx.md / rs6000.md division is artificial at best. Most of the basic (movement etc.) things are in rs6000.md (and

Re: [PATCH] more warning code refactoring

2021-08-19 Thread Segher Boessenkool
max_size after the change are out > of GC's tracking? That looks exactly right. Thanks Ke Wen! This also means this was not a refactoring at all -- nothing changing anything to do with GC is ever a refactoring. Refactorings are trivial one-to-one code transforms that do not change semantics at all. Segher

Re: [PATCH] more warning code refactoring

2021-08-19 Thread Segher Boessenkool
). It's something > I was planning to do next. But even that I wouldn't expect to > eat up a whole 1GB or memory. The testcase is super heavy in the instruction combiner, so you get a lot of garbage. Which is not a problem, except you made the garbage collector not pick this up, so we get a ton of garbage accumulating. Segher

Re: [PATCH 1/6] rs6000: Support SSE4.1 "round" intrinsics

2021-08-19 Thread Segher Boessenkool
Hi! On Thu, Aug 19, 2021 at 01:16:16PM -0500, Paul A. Clarke wrote: > On Wed, Aug 18, 2021 at 05:46:58PM -0500, Segher Boessenkool wrote: > > There are __builtin_set_fpscr_rn and friends, please use those, those > > are optimised for any platform. > > I do. (Unless I

Re: [PATCH] more warning code refactoring

2021-08-19 Thread Segher Boessenkool
On Thu, Aug 19, 2021 at 12:53:16PM -0600, Martin Sebor wrote: > That said, I introduced > the variable in r243470 to begin with and I consider its removal > a trivially correct and appropriate part of refactoring. It is not a refactoring. It changes behaviour. Segher

Re: [PATCH] Move xx* builtins to vsx.md.

2021-08-19 Thread Segher Boessenkool
On Thu, Aug 19, 2021 at 06:10:46PM -0400, Michael Meissner wrote: > On Wed, Aug 18, 2021 at 06:11:03PM -0500, Segher Boessenkool wrote: > > I think the current vector.md / altivec.md / vsx.md / rs6000.md > > division is artificial at best. Most of the basic (movement etc.) &g

Re: [PATCH v2] rs6000: Avoid buffer overruns

2021-08-20 Thread Segher Boessenkool
reak changelog lines unnecessary. > (safe_inc_pos): Fix overrun detection. > (match_identifier): Diagnose buffer overrun. > (match_integer): Likewise. > (match_to_right_bracket): Likewise. Okay for trunk. Thanks! Segher

Re: [PATCH] Fix tests that require IBM 128-bit long double

2021-08-20 Thread Segher Boessenkool
rder). Okay for trunk with the casts removed. Thanks! Segher

Re: [PATCH 07/34] rs6000: Add power8-vector builtins

2021-08-23 Thread Segher Boessenkool
On Thu, Jul 29, 2021 at 08:30:54AM -0500, Bill Schmidt wrote: > * config/rs6000/rs6000-builtin-new.def: Add power8-vector stanza. I looked it over and didn't see errors. Okay for trunk. Thanks! Segher

Re: [PATCH 08/34] rs6000: Add Power9 builtins

2021-08-23 Thread Segher Boessenkool
for xsxexpdp as well, or we would get a weird holey API. Okay for trunk (with the typo fixed if it is one). Thanks! Segher

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