Re: [PATCH 0/4 GCC11] IVOPTs consider step cost for different forms when unrolling

2020-02-13 Thread Segher Boessenkool
On Thu, Feb 13, 2020 at 08:48:33AM +0100, Richard Biener wrote: > On Wed, 12 Feb 2020, Segher Boessenkool wrote: > > On Wed, Feb 12, 2020 at 11:53:22AM +0100, Richard Biener wrote: > > > BB reorder switches back and forth as well ... :/ > > > > Yes. It is extreme

Re: Fix existing fold-vec-extract-longlong.p8.c testcase

2020-02-13 Thread Segher Boessenkool
} */ Just like this one. Do they match 0 times now? Please keep the entry then, but for 0 times? Okay for trunk with that taken care of whichever way. Thanks! Segher

Re: Update gcc.target/powerpc/pr92132-fp test for power7 and older

2020-02-13 Thread Segher Boessenkool
dg-final { scan-tree-dump-times "LOOP VECTORIZED" 14 "vect" } } */ > +/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 14 "vect" { target > p8vector_hw } } } */ That actually checks if the hardware is p8 or later, while what you care about is what options are compiled with. Say, if running on a p8 but compiling for a p7 this will fail? Segher

[PATCH] rs6000: fixinc: Skip machine_name fix for powerpc*-*-linux*

2020-02-13 Thread Segher Boessenkool
From: Matheus Castanho Some system headers can be broken by the machine_name fix performed by GCC during the fixincludes step. According to the comment in fixincludes/fixinc.h:130 : On some platforms, machine_name doesn't work properly and breaks some of the header files. Since everything

Re: [PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-14 Thread Segher Boessenkool
On Fri, Feb 14, 2020 at 02:58:49PM +0800, Jiufu Guo wrote: > Segher Boessenkool writes: > > > On Sat, Feb 08, 2020 at 10:17:42AM -0600, Segher Boessenkool wrote: > >> And we do not know which of the register will be used for the return, in > >> untyped_call (only

Re: [PATCH 00/14] rs6000: Begin replacing built-in support

2020-02-14 Thread Segher Boessenkool
Hi! On Fri, Feb 14, 2020 at 10:34:40AM -0800, Mike Stump wrote: > On Feb 4, 2020, at 9:40 AM, Segher Boessenkool > wrote: > >> My intent is to make adding new built-in functions as simple as adding > >> a few lines to a couple of files, and automatically genera

Re: [RFC PATCH v0] PPC64: Implement POWER Architecure Vector Function ABI.

2020-02-14 Thread Segher Boessenkool
in order to avoid having a function whose > body is empty. Please Cc: the rs6000 maintainers on rs6000 patches, you will get a reply faster, and more reliably. Please don't use binary attachments, it takes effort to reply to those. Segher

Re: [RFC PATCH v0] PPC64: Implement POWER Architecure Vector Function ABI.

2020-02-16 Thread Segher Boessenkool
it format-patch? You should, as the manual pages for both git imap-send and git send-email explain. > Will try pasting the .patch inline as plain text and see if that works. That doesn't work, unless you take extreme care. It is fine for showing small snippets, but it does not result in patches people can apply. Segher

Re: [PATCH] Generate XXSPLTIDP on power10.

2021-08-31 Thread Segher Boessenkool
ly not allow anything else than bit patterns, not floating point constants, have a separate pattern for that (that can then forward to the integer one). > This way we have just one place that centralizes the knowledge about the > instruction. That one place should be the define_insn for it. Segher

Re: [PATCH] Generate XXSPLTIDP on power10.

2021-08-31 Thread Segher Boessenkool
;movsf_hardfloat" > @@ -8051,20 +8057,21 @@ (define_insn "*mov_hardfloat32" > @@ -8091,19 +8098,19 @@ (define_insn "*mov_softfloat32" > @@ -8125,18 +8132,19 @@ (define_insn "*mov_hardfloat64" > @@ -8170,6 +8178,7 @@ (define_insn "*mov_softfloat64" It would be a good idea to merge many of these patterns again. We can do this now that we have the "isa" and "enabled" attributes. Segher

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

2021-09-02 Thread Segher Boessenkool
nformation for inlinable always_inline functions. > */ > + bool scan_for_target_info = > +(info->inlinable > + && DECL_DISREGARD_INLINE_LIMITS (node->decl) > + && lookup_attribute ("always_inline", DECL_ATTRIBUTES (node->decl)) > + && targetm.target_option.need_ipa_fn_target_info (node->decl, > +info->target_info)); Don't use unnecessary parens please. Segher

Re: [PATCH 2/2] Get rid of all float-int special cases in validate_subreg.

2021-09-02 Thread Segher Boessenkool
ys why it can not be done yet). Segher

Re: [PATCH] Generate XXSPLTIDP on power10.

2021-09-02 Thread Segher Boessenkool
On Wed, Sep 01, 2021 at 04:22:13PM -0400, Michael Meissner wrote: > On Tue, Aug 31, 2021 at 06:41:30PM -0500, Segher Boessenkool wrote: > > Hi! > > > > Please do two separate patches. The first that adds the instruction > > (with a bit pattern, i.e. integer, input), a

[PATCH] rs6000: Don't use r12 for CR save on ELFv2 (PR102107)

2021-09-03 Thread Segher Boessenkool
. So here goes. Segher 2021-09-03 Segher Boessenkool PR target/102107 * config/rs6000/rs6000-logue.c (rs6000_emit_prologue): On ELFv2 use r11 instead of r12 for CR save, in all cases. --- gcc/config/rs6000/rs6000-logue.c | 11 +++ 1 file changed, 7 insertions

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

2021-09-03 Thread Segher Boessenkool
/ These are negative tests, so won't spuriously fail, but this does not test for the function prefixes we can have. See gcc.target/powerpc/builtins-1.c for example. Again, thank you, and thanks to everyone else for the patch review action :-) Segher

Re: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-06 Thread Segher Boessenkool
s well as in other code that handles subregs). I doubt this is possible to do, subreg have so many overloaded meanings already. Segher

Re: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-06 Thread Segher Boessenkool
hich > would also have poorly defined semantics. Perhaps your interpretation of > the > RTL documentation doesn't strictly apply to this part of the RTL optimizers? Perhaps this is a bug. It is if it actually allows subregs of ints as input. Segher

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

2021-09-06 Thread Segher Boessenkool
Hi! On Mon, Sep 06, 2021 at 04:59:27PM +0800, Xionghu Luo wrote: > On 2021/9/4 05:44, Segher Boessenkool wrote: > >>+/* { dg-final { scan-assembler-not {\mbl fmod\M} } } */ > >>+/* { dg-final { scan-assembler-not {\mbl fmodf\M} } } */ > >>+/* { dg-final { scan-a

Re: [PATCH, rs6000] optimization for long long and double vec_reve [PR100868]

2021-09-06 Thread Segher Boessenkool
c anyway. Just write /* { dg-do compile } */ and nothing more (this (compile) is the default as well, you can just leave it out completely if you want). Finally: should whatever the old code generated have been optimised better? Segher

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

2021-09-06 Thread Segher Boessenkool
ings to become unexpected (although it meets > the basic rule, not so elegant), sigh. It has too many parens, making grouping where there is none, that is the core issue. if (kind == vec_to_scalar || kind == vec_perm || kind == vec_promote_demote || kind == vec_construct || kind == scalar_to_vec || (kind == vector_stmt && where == vect_body)) Segher

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-07 Thread Segher Boessenkool
n_movsf_from_si (dest, tmp)); > + return true; > + } This makes it two separate insns. Is that always optimised to code that is at least as good as before? Segher

Re: [PATCH 2/2] Get rid of all float-int special cases in validate_subreg.

2021-09-07 Thread Segher Boessenkool
On Fri, Sep 03, 2021 at 05:05:47PM +0200, Andreas Schwab wrote: > On Sep 02 2021, Segher Boessenkool wrote: > > On Tue, Aug 31, 2021 at 07:17:49PM +0800, liuhongt via Gcc-patches wrote: > >>* emit-rtl.c (validate_subreg): Get rid of all float-int > >>special

[PATCH] rs6000: Fix ELFv2 r12 use in epilogue

2021-09-08 Thread Segher Boessenkool
We cannot use r12 here, it is already in use as the GEP (for sibling calls). Committed to trunk. Will backport later, too. Segher 2021-09-08 Segher Boessenkool PR target/102107 * config/rs6000/rs6000-logue.c (rs6000_emit_epilogue): For ELFv2 use r11 instead of r12

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-08 Thread Segher Boessenkool
Hi! On Wed, Sep 08, 2021 at 08:42:44AM +0200, Richard Biener wrote: > On Wed, Sep 8, 2021 at 1:08 AM Segher Boessenkool > wrote: > > The core of the problem is that subreg of pseudos has three meanings: > > -- Paradoxical subregs; > > -- Actual subregs; > >

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-08 Thread Segher Boessenkool
On Wed, Sep 08, 2021 at 08:39:31PM +0200, Richard Biener wrote: > On September 8, 2021 7:08:09 PM GMT+02:00, Segher Boessenkool > wrote: > >It is not a good idea to do allow all those things. Most backends can > >only support a few combinations of them, and everything else re

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

2021-09-09 Thread Segher Boessenkool
const unsigned int MAX_PENALIZED_COST_FOR_CTOR = 12; > + if (extra_cost > MAX_PENALIZED_COST_FOR_CTOR) > + extra_cost = MAX_PENALIZED_COST_FOR_CTOR; That is a pretty gross hack. Can you think of any saner way to not have those out of scale costs in the first place? Okay for trunk with such tweaks. Thanks! (And please consult with Bill for the wordsmithing :-) ) Segher

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

2021-09-09 Thread Segher Boessenkool
Hi! On Thu, Sep 09, 2021 at 12:19:28PM -0500, Bill Schmidt wrote: > On 9/9/21 11:11 AM, Segher Boessenkool wrote: > >On Wed, Sep 08, 2021 at 02:57:14PM +0800, Kewen.Lin wrote: > >>+ /* If we have strided or elementwise loads into a vector, it's > >"stri

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-09 Thread Segher Boessenkool
rom that same history it follows that anything you do not super carefully (with testing everywhere) will cause some serious problems. And nonse of these are easy to fix at all -- there is a *reason* targets did this nastiness. > > p.s. Very unrelated... Should we have __builtin_bit_cast for C as well? > > Is there any reason this could not work? Still interested in this btw :-) (And still very unrelated.) Segher

Re: [PATCH 2/2] validate_subreg before call gen_lowpart to avoid ICE.

2021-09-10 Thread Segher Boessenkool
ode @var{n}). Both modes must be fixed point or both floating point. TRULY_NOOP_TRUNCATION does not make sense to ask if changing mode class. Segher

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-10 Thread Segher Boessenkool
On Fri, Sep 10, 2021 at 12:53:37PM +0200, Richard Biener wrote: > On Fri, Sep 10, 2021 at 1:50 AM Segher Boessenkool > wrote: > > And many targets have strange rules for bit-strings in which modes can > > be used as bit-strings in which other modes, and at what offsets in &

Re: [PATCH] Fix SFmode subreg of DImode and TImode

2021-09-10 Thread Segher Boessenkool
On Fri, Sep 10, 2021 at 11:09:31AM +0800, Hongtao Liu wrote: > On Fri, Sep 10, 2021 at 7:49 AM Segher Boessenkool > wrote: > > way too long. But from that same history it follows that anything you > > do not super carefully (with testing everywhere) will cause some serious

Re: [PATCH 2/2] validate_subreg before call gen_lowpart to avoid ICE.

2021-09-10 Thread Segher Boessenkool
On Fri, Sep 10, 2021 at 03:58:47PM +0200, Richard Biener wrote: > On September 10, 2021 3:30:10 PM GMT+02:00, Segher Boessenkool > wrote: > >TRULY_NOOP_TRUNCATION does not make sense to ask if changing mode class. > > OK, so there's a mode class comparison missing here w

Re: [PATCH 2/2] validate_subreg before call gen_lowpart to avoid ICE.

2021-09-10 Thread Segher Boessenkool
ave to* use attachments, use text attachments. Without encoding. <https://gcc.gnu.org/contribute.html#patches> (It says "strongly discouraged", which means people will put it to the bottom of the stack of things to look at). Segher

Re: [PATCH 2/2] validate_subreg before call gen_lowpart to avoid ICE.

2021-09-10 Thread Segher Boessenkool
On Fri, Sep 10, 2021 at 08:36:12PM +0200, Richard Biener wrote: > On September 10, 2021 6:24:50 PM GMT+02:00, Segher Boessenkool > wrote: > >Yes, we should not call TRULY_NOOP_TRUNCATION_MODES_P for any random two > >modes: such a truncation needs to have a meaning at all, for

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

2021-09-12 Thread Segher Boessenkool
er constants in XOmode so we wrap this in an UNSPEC. Does the comment need updating? It may help to point out here that itr needs to be volatile. > (set_attr "length" "4")]) Not new of course: the default length is 4, most insns have that, it helps to be less verbose. Okay for trunk with that changelog fix. Thanks! Segher

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

2021-09-12 Thread Segher Boessenkool
s is the only good reason for > splitting this into two patterns; you need different criteria.) The *good* reason for splitting the pattern is they have completely different expansions as well. Which is why I asked for it. (I'll review the patch later). Segher

Re: [committed] rs6000: Remove typedef for struct rs6000_cost_data

2021-09-13 Thread Segher Boessenkool
On Mon, Sep 13, 2021 at 02:42:10PM +0800, Kewen.Lin wrote: > This patch follows Segher's suggestion here[1] to get rid of > the typedef, it's pre-approved as [1]. Thanks! Segher

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

2021-09-13 Thread Segher Boessenkool
turn TARGET_MMA; > +} > + gcc_unreachable (); > +} Could you put all the CPU ones together (except maybe Cell)? The really mean architecture version, and they should be renamed some day perhaps (the TARGET_ names that is). It now is some kind of revisionist historical order :-) > --- a/gcc/config/rs6000/rs6000-gen-builtins.c > +++ b/gcc/config/rs6000/rs6000-gen-builtins.c > @@ -2314,7 +2314,7 @@ write_decls (void) > >fprintf (header_file, "extern void rs6000_init_generated_builtins > ();\n\n"); >fprintf (header_file, > -"extern bool rs6000_new_builtin_is_supported_p " > +"extern bool rs6000_new_builtin_is_supported " > "(rs6000_gen_builtins);\n"); This now fits on one line, too :-) Okay for trunk with the trivial things fixed. And everythin else needs to be fixed later still. Thanks! Segher

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

2021-09-13 Thread Segher Boessenkool
needs to be volatile. > > I think the comment was referring to the unneeded operand which I have > now removed. I could either remove the comment altogether or change it > to: > > ;; We can't have integer constants in XOmode so we wrap this in an > ;; UNSPEC_VOLATILE. > > ...to refer to the dummy zero for the source. Let me know what you want. No strong opinion, the existing comment looked out of place, that's all. The latter option adds information, so if you think that is useful to have here, let's go with that? Cheers, Segher

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

2021-09-15 Thread Segher Boessenkool
"altivec_register_operand" "wa,v")) >(and:VM > - (match_operand:VM 2 "altivec_register_operand" "v") > - (match_operand:VM 4 "altivec_register_operand" "v"] > + (match_operand:VM 2 "altivec_register_operand" "wa,v") > + (match_operand:VM 4 "altivec_register_operand" "wa,v"] >"VECTOR_UNIT_ALTIVEC_OR_VSX_P (mode) >&& rtx_equal_p (operands[2], operands[3])" > - "vsel %0,%1,%4,%3" > + "@ > + xxsel %x0,%x1,%x4,%x3 > + vsel %0,%1,%4,%3" The mnemonics should align with the @. This ordering makes us prefer xxsel over vsel. Do we want that? We probably do, but it is a change I think? Do we want to add an "isa" attribute? Most patterns still don't, but we probably should wherever we can. "altivec_register_operand" is wrong. Just "gpc_reg_operand" I think? Segher

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

2021-09-16 Thread Segher Boessenkool
r changelogs. > -rs6000-gen-builtins: rs6000-gen-builtins.o rbtree.o > +build/rs6000-gen-builtins$(build_exeext): build/rs6000-gen-builtins.o > build/rbtree.o $(BUILD_LIBDEPS) Maybe break the prerequisites here (with "\"), the line is very long now? Okay for trunk. Thanks! Segher

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

2021-09-16 Thread Segher Boessenkool
o arrange things better? Anyway: okay for trunk. Thanks! Segher

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

2021-09-16 Thread Segher Boessenkool
ns are at 80 chars, not 72. Okay for trunk (w/ the fixes from Will's review). Thanks! Segher

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

2021-09-16 Thread Segher Boessenkool
lace_with_seq (gsi, new_seq, true); > + return true; > +} Fwiw, all those cases return, so those "else" are not needed. Also it would be nice if this could be factored a bit better, hrm. Is that "if" in there useful? Maybe add a helper function for it, then? Anyway: okay for trunk. Thanks! Segher

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

2021-09-17 Thread Segher Boessenkool
e (or not worse than what there already was, anyway ;-) ). So put this on the big "one day we will clean this up" list? Okay for trunk. Thanks! Segher

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

2021-09-17 Thread Segher Boessenkool
_ipa_fn_target_info (uint16_t &, const gimple *) I'm surprised the compiler didn't warn about this btw. The rs6000 parts are okay for trunk (with the trivial cleanups please). Thanks! Segher

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

2021-09-17 Thread Segher Boessenkool
ee this, either. A magic crazy formula like this is no good. If you want to make the cost of everything but V2D* be the same, and that of V2D* be twice that, that is a weird heuristic, but we can live with that perhaps. But that beats completely unexplained (and unexplainable) magic! Sorry. Segher

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

2021-09-17 Thread Segher Boessenkool
It is a percentage. (0,100) is the maximum that makes any sense :-) It may be useful to make it a bit more sensitive than hundreds, but it is a heuristic anyway, this will work fine. But allowing 100 will be good. Segher

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

2021-09-17 Thread Segher Boessenkool
Hi! On Wed, Sep 15, 2021 at 04:52:49PM +0800, Kewen.Lin wrote: > This patch follows the discussion here[1], where Segher suggested > parameterizing those exact magic constants for density heuristics, > to make it easier to tweak if need. > > Since these heuristics are quite i

Re: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-20 Thread Segher Boessenkool
Hi! On Sun, Sep 19, 2021 at 09:14:55AM -0600, Jeff Law wrote: > On 9/6/2021 8:24 AM, Segher Boessenkool wrote: > >On Mon, Sep 06, 2021 at 12:32:13PM +0100, Roger Sayle wrote: > >>I think the current documentation is sufficient. During compilation, > >>GCC&#x

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

2021-09-21 Thread Segher Boessenkool
Hi! On Tue, Sep 21, 2021 at 01:47:19PM +0800, Kewen.Lin wrote: > on 2021/9/18 上午6:26, Segher Boessenkool wrote: > >> + if (data->nloads > (unsigned int) rs6000_density_load_num_threshold > >> +&& load_pct > (unsigned int) rs6000_density_load_pct_t

Re: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-21 Thread Segher Boessenkool
On Mon, Sep 20, 2021 at 10:18:15PM -0600, Jeff Law wrote: > On 9/20/2021 6:23 PM, Segher Boessenkool wrote: > >There is no such thing as "earlier than simplify-rtx", that is the > >point. simplify-rtx is not a pass: it is like a library that is used > >from a

Re: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-21 Thread Segher Boessenkool
(aka we're combining on the fly). > > It's a bit like fold_convert (double_type_node, integer_one_node) > second-guessing and doing a FLOAT_EXPR when folding > the implicit CONVERT_EXPR. Yeah :-/ Segher

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

2021-09-22 Thread Segher Boessenkool
Hi! On Tue, Sep 21, 2021 at 11:24:08AM +0800, Kewen.Lin wrote: > on 2021/9/18 上午6:01, Segher Boessenkool wrote: > > On Thu, Sep 16, 2021 at 09:14:15AM +0800, Kewen.Lin wrote: > >> The way with nunits * stmt_cost can get one much exaggerated > >> penalized cost, such a

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

2021-09-22 Thread Segher Boessenkool
// { dg-message "parameter passing for an argument > containing zero-width bit fields but that is otherwise a homogeneous > aggregate changed in GCC 12.1" } I think you used "format=flawed" again? Okay for trunk with such comment updates. Thanks! Segher

Re: [PATCH] Relax condition of (vec_concat:M(vec_select op0 idx0)(vec_select op0 idx1)) to allow different modes between op0 and M, but have same inner mode.

2021-09-24 Thread Segher Boessenkool
modes is called, the name GET_MODE_INNER is a bit confusing though :-) ) Btw, the documentation for "concat" says @findex concat @item (concat@var{m} @var{rtx} @var{rtx}) This RTX represents the concatenation of two other RTXs. This is used for complex values. It should only appear in the RTL attached to declarations and during RTL generation. It should not appear in the ordinary insn chain. which needs some updating (in many ways). Segher

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

2021-09-28 Thread Segher Boessenkool
> + void *buffer[10]; > + > + addresses = backtrace(buffer, 10); > + if(addresses != 4) > +__builtin_abort(); > +} Does that work?! Has this been tested on all powerpc*-linux configs? Importantly also BE and 32-bit. Okay for trunk with the testcase fix, if all testing works out. Thanks! Segher

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

2021-09-29 Thread Segher Boessenkool
On Wed, Sep 29, 2021 at 11:14:55AM -0300, Raphael M Zinsly wrote: > On 28/09/2021 16:50, Segher Boessenkool wrote: > >>+/* { dg-do run { target { powerpc*-*-linux* } } } */ > > > >Don't say such targets in gcc.target/powerpc/ tests please. Everything > >in gcc

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

2021-09-30 Thread Segher Boessenkool
Unless you can convince me (in the patch / commit message) that this is safe :-) Whichever way you choose, it is likely best to do the same on 10 and 11 as on trunk, since it will all be replaced on trunk soon anyway. Segher

Re: [PATCH] rs6000: Fix 2 for PR92661, Do not define builtins that overload disabled builtins

2019-12-04 Thread Segher Boessenkool
* while that isn't really necessary). Why do you need/want the check_effective_target_dfp test? If for example this is to prevent ICEs, that is no good, that is *hiding* problems. I suspect it is to stop the testsuite from complaining if you configure with --disable-decimal-float. What is different there then, compared to targets that do actually not support decimal float? Okay for trunk minus the changes to powerpc-dfp.exp (we can iterate on that). Thanks! Segher

Re: [PATCH] rs6000: Fix 2 for PR92661, Do not define builtins that overload disabled builtins

2019-12-04 Thread Segher Boessenkool
On Wed, Dec 04, 2019 at 01:56:45PM -0600, Peter Bergner wrote: > On 12/4/19 1:16 PM, Segher Boessenkool wrote: > > Why do you need/want the check_effective_target_dfp test? If for example > > this is to prevent ICEs, that is no good, that is *hiding* problems. > > > >

Re: [PATCH] rs6000: Fix 2 for PR92661, Do not define builtins that overload disabled builtins

2019-12-04 Thread Segher Boessenkool
On Wed, Dec 04, 2019 at 08:47:49PM +, Iain Sandoe wrote: > Peter Bergner wrote: > >On 12/4/19 1:16 PM, Segher Boessenkool wrote: > >>This isn't run from powerpc.exp, so it needs to still do that first check. > >>And it's up to the Darwin maintaine

Re: [PATCH] rs6000: Fix 2 for PR92661, Do not define builtins that overload disabled builtins

2019-12-04 Thread Segher Boessenkool
being run for > you. Otherwise, you'll have to hunt through the DFP tests looking for > a dg-skip-if darwin test. Yes, and most of those skip-if do not document *why* it is disabled, either! Segher

Re: [PATCH] rs6000: Fix 2 for PR92661, Do not define builtins that overload disabled builtins

2019-12-04 Thread Segher Boessenkool
On Wed, Dec 04, 2019 at 03:53:30PM -0600, Peter Bergner wrote: > On 12/4/19 2:50 PM, Segher Boessenkool wrote: > > It would be nice to keep *some* dfp test(s) to make sure we don't ICE. > > If we disabled all such tests already, like with this patch, we wouldn't > >

Re: PowerPC V9 patches, Add the PCREL_OPT optimization

2019-12-04 Thread Segher Boessenkool
Hi Alan, Thanks for looking, and for the corrections :-) On Thu, Dec 05, 2019 at 09:26:09AM +1030, Alan Modra wrote: > On Mon, Dec 02, 2019 at 06:07:23PM -0600, Segher Boessenkool wrote: > > Is that "paddi" syntax correct? I think you might mean > > "paddi

Re: [RFC] Characters per line: from punch card (80) to line printer (132) (was: [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments)

2019-12-05 Thread Segher Boessenkool
ot; forces you to uglify your code, then maybe it is not such a nice feature, and you should not use it. If you have issues with scoping your functions are WAY too long already. Segher

Re: [RFC] Characters per line: from punch card (80) to line printer (132) (was: [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments)

2019-12-05 Thread Segher Boessenkool
ould not indent that far, so this all works out splendidly. Segher

Re: [RFC] Characters per line: from punch card (80) to line printer (132) (was: [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments)

2019-12-05 Thread Segher Boessenkool
for a piece of code, it is probably not chosen as a good factor anyway! > and using > way too long function names. If you look at the earlier suggestion where > the code is indented reasonably, using the temporary there makes the code more > readable and shorter. Yup. Segher

Re: [RFC] Characters per line: from punch card (80) to line printer (132)

2019-12-05 Thread Segher Boessenkool
r 40 or whatever) lines ago, in WAY too long functions. All those problems do not exist in well-factored code. The point is not to have short routines: the point is to not have too much (external) complexity per routine. A routine should ideally only do one thing, and its name should describe what it does. Segher

Re: [RFC] Characters per line: from punch card (80) to line printer (132) (was: [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments)

2019-12-05 Thread Segher Boessenkool
On Thu, Dec 05, 2019 at 03:38:15PM -0500, Marek Polacek wrote: > On Thu, Dec 05, 2019 at 02:06:50PM -0600, Segher Boessenkool wrote: > > > When you're forced to uglify every variable with a leading __ you run > > > out of characters pretty damn quickly. > > > &g

Re: [RFC] Characters per line: from punch card (80) to line printer (132) (was: [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments)

2019-12-05 Thread Segher Boessenkool
On Thu, Dec 05, 2019 at 08:56:35PM +, Jonathan Wakely wrote: > On Thu, 5 Dec 2019 at 20:07, Segher Boessenkool > wrote: > > On Thu, Dec 05, 2019 at 05:03:43PM +, Jonathan Wakely wrote: > > > C++17 introduces a nice feature, with rationale similar to declaring > >

Re: [RFC] Characters per line: from punch card (80) to line printer (132) (was: [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments)

2019-12-05 Thread Segher Boessenkool
On Thu, Dec 05, 2019 at 10:37:33PM +, Jonathan Wakely wrote: > On Thu, 5 Dec 2019 at 22:19, Segher Boessenkool wrote: > > Or you could write > > > > auto __c = (__builtin_memcmp(&*__first1, &*__first2, __len) <=> 0); > > if (__c) > >

Re: [PATCH] Enable ICE-after-error with -fchecking

2019-12-06 Thread Segher Boessenkool
case anyway? Does it not already happen? You need dump files enabled, of course. Segher

Re: Add a new combine pass

2019-12-06 Thread Segher Boessenkool
On Wed, Dec 04, 2019 at 07:43:30PM +0900, Oleg Endo wrote: > On Tue, 2019-12-03 at 12:05 -0600, Segher Boessenkool wrote: > > > Hmm ... the R0 problem ... SH doesn't override class_likely_spilled > > > explicitly, but it's got a R0_REGS class with only one said r

Re: PowerPC V9 patches, Add the PCREL_OPT optimization

2019-12-06 Thread Segher Boessenkool
On Thu, Dec 05, 2019 at 10:14:13AM +1030, Alan Modra wrote: > On Wed, Dec 04, 2019 at 05:16:05PM -0600, Segher Boessenkool wrote: > > > pla 9,ext_symbol@pcrel # add (0),1 for optional operands > > > > pla does not have optional operands like that? > > It does, jus

Re: [PATCH] rs6000: Fix 2 for PR92661, Do not define builtins that overload disabled builtins

2019-12-06 Thread Segher Boessenkool
On Thu, Dec 05, 2019 at 08:44:57AM +, Iain Sandoe wrote: > .. or I can just force a false return from effective_target_dfp as we > do for other cases where assembler support does not imply system > support. That's what I would do, yes. Segher

[PATCH] rs6000: Name set_cc, and delete some old mfcr patterns

2019-12-09 Thread Segher Boessenkool
c64-linux {-m32,-m64}. (This defaults to power4, so this code actually is tested then). Committing to trunk. Segher 2019-12-09 Segher Boessenkool * config/rs6000/rs6000.md (unnamed mfcr define_insn): Name this set_cc. (unnamed define_insn_and_split): Delete.

Re: [mid-end] Add notes to dataflow insn info when re-emitting (PR92410)

2019-12-09 Thread Segher Boessenkool
On Mon, Dec 09, 2019 at 01:48:51PM +0100, Martin Liška wrote: > - gcc_assert (INSN_UID (insn) < DF_INSN_SIZE ()); > + gcc_assert (INSN_UID (insn) < (int)DF_INSN_SIZE ()); Space after cast please. Segher

Re: [PATCH, rs6000] Adjust vectorization cost for scalar COND_EXPR

2019-12-11 Thread Segher Boessenkool
On Wed, Dec 11, 2019 at 07:39:38AM -0600, Bill Schmidt wrote: > I can't approve this, but for what it's worth it looks fine to me. But I can :-) Thanks for looking Bill! The patch is okay for trunk. Thanks Ke Wen! Segher > >2019-12-11 Kewen Lin > > > &g

Re: [PATCH] rs6000: Fix 2 for PR92661, Do not define builtins that overload disabled builtins

2019-12-12 Thread Segher Boessenkool
e of course, and it's simple as can be. This configure thing does not gate whether the backend code supports DFP though? Or is that handled somewhere? I.e. can we ever end up with TARGET_DFP set while enable_decimal_float is not set? Segher

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread Segher Boessenkool
come. > And the current implementation is IMHO unusable for lra since it did not > introduce a CC register to track clobbering. So it's a dead end. I disagree. There *is* nothing to clobber, during LRA. There are no live values. Segher

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread Segher Boessenkool
On Thu, Dec 12, 2019 at 09:32:27AM +, Richard Sandiford wrote: > I doubt it will be long before we deprecate > all targets that require old reload.) Do we wait until GCC 12 (to remove old reload completely)? If not, we should deprecate it now. Segher

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread Segher Boessenkool
On Fri, Dec 13, 2019 at 10:06:20PM +0900, Oleg Endo wrote: > On Fri, 2019-12-13 at 05:03 -0600, Segher Boessenkool wrote: > > On Thu, Dec 12, 2019 at 09:32:27AM +, Richard Sandiford wrote: > > > I doubt it will be long before we deprecate > > > all targets that requi

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread Segher Boessenkool
On Fri, Dec 13, 2019 at 01:19:55PM +0100, Richard Biener wrote: > On December 13, 2019 12:03:30 PM GMT+01:00, Segher Boessenkool > wrote: > >On Thu, Dec 12, 2019 at 09:32:27AM +, Richard Sandiford wrote: > >> I doubt it will be long before we deprecate > >>

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread Segher Boessenkool
On Sat, Dec 14, 2019 at 12:06:36AM +0900, Oleg Endo wrote: > On Fri, 2019-12-13 at 15:57 +0100, John Paul Adrian Glaubitz wrote: > > Hello Segher! Hi :-) > > > With LRA, sh builds fine (with the combine2 patches). I have no idea > > > if correct code is generated,

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Segher Boessenkool
one expression object of code @code{cc0}; it is the value of the variable @code{cc0_rtx}. Any attempt to create an expression of code @code{cc0} will return @code{cc0_rtx}. There is a lot of code that depends on this property, you cannot break it without fixing everything. Segher

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Segher Boessenkool
On Fri, Dec 13, 2019 at 08:55:15PM +0100, Stefan Franke wrote: > Am 2019-12-13 18:58, schrieb Segher Boessenkool: > >On Fri, Dec 13, 2019 at 05:25:41PM +0100, Stefan Franke wrote: > >>Why? If you are using a cc register plus your architecture as many > >>instruction

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-15 Thread Segher Boessenkool
gnoring those is a great idea, unless you are unlucky enough to have to use them ;-) ). So it isn't hard to handle the "dataflow" for them, in principle, but it is special cases *everywhere*. Segher

[PATCH] rs6000: Use symbolic names for the CR fields in more cases

2019-12-16 Thread Segher Boessenkool
It turns out we still used hardcoded register numbers for the CR fields in some cases, and they now use the wrong numbers since we renumbered most of the registers. So let's use the symbolic names, instead. Committing to trunk. Segher 2019-12-16 Segher Boessenkool * config/r

Re: [PATCH] V10 patch #1, Use PLI to load up large DImode constants if -mcpu=future

2019-12-17 Thread Segher Boessenkool
t; 31 == -1 || value >> 31 == 0)) > return 1; > > + /* PADDI can support up to 34 bit signed integers. */ > + else if (TARGET_PREFIXED_ADDR && SIGNED_34BIT_OFFSET_P (value)) > +return 1; Please follow up with a patch to not call random numbers "OFFSET". Okay for trunk. Thanks! Segher

Re: [PATCH] V10 patch #2, use PLI to load up large SImode constants if -mcpu=future

2019-12-17 Thread Segher Boessenkool
it constants if -mcpu=future. This is okay for trunk. Thanks! Segher

Re: [PATCH] V10 patch #3, Use PADDI to add large constants if -mcpu=future is used

2019-12-17 Thread Segher Boessenkool
ow eI constants. > * config/rs6000/rs6000.md (add3): Add alternative to > generate PADDI for 34-bit constants if -mcpu=future. This is fine. Okay for trunk. Thanks! Segher

Re: [PATCH] V10 patch #4, Add new prefixed/non-prefixed memory constraints

2019-12-17 Thread Segher Boessenkool
d_memory" nor "non_prefixed_memory"! > --- gcc/doc/md.texi (revision 279182) > +++ gcc/doc/md.texi (working copy) > @@ -3373,6 +3373,12 @@ asm ("st %1,%0" : "=m<>" (mem) : "r" (va > > is not. > > +@item em > +A memory operand that does not contain a prefixed address. > + > +@item ep > +A memory operand that does contains a prefixed address. Same comments as above. Segher

Re: [PATCH] V10 patch #5, Fix codegen bug with vector extracts using a variable offset & PC-relative address

2019-12-17 Thread Segher Boessenkool
t;)) > + (clobber (match_scratch:V2DI 4 "=&v,X,X,X,X")) > + (clobber (match_scratch:DI 5 "=X,X,X,&b,&b"))] >"VECTOR_MEM_VSX_P (mode) && TARGET_DIRECT_MOVE_64BIT" >"#" >"&& reload_completed" >[(const_int 0)] > { >rs6000_split_vec_extract_var (operands[0], operands[1], operands[2], > - operands[3], operands[4]); > + operands[3], operands[4], operands[5]); This writes to operands[2], which does not match its constraint. Same in the other splitters. Segher

Re: [PATCH] V10 patch #4, Add new prefixed/non-prefixed memory constraints

2019-12-17 Thread Segher Boessenkool
On Tue, Dec 17, 2019 at 05:29:44PM -0500, Michael Meissner wrote: > On Tue, Dec 17, 2019 at 11:15:29AM -0600, Segher Boessenkool wrote: > > > +;; Return true if the operand is a valid memory address that does not > > > use a > > > +;; prefixed add

Re: [PATCH] Fix redundant load missed by fre [tree-optimization 92980]

2019-12-18 Thread Segher Boessenkool
tors or similar? Segher

Re: [PATCH] V10 patch #4, Add new prefixed/non-prefixed memory constraints

2019-12-18 Thread Segher Boessenkool
Hi! On Tue, Dec 17, 2019 at 07:38:51PM -0500, Michael Meissner wrote: > On Tue, Dec 17, 2019 at 05:35:24PM -0600, Segher Boessenkool wrote: > > And what is with the INSN_FORM_PCREL_EXTERNAL? > > INSN_FORM_PCREL_EXTERNAL says that the operand is a reference to an external >

Re: [PATCH] rs6000: Fix 2 for PR92661, Do not define builtins that overload disabled builtins

2019-12-18 Thread Segher Boessenkool
(Whoops, I missed replying t this one. Sorry.) On Tue, Dec 10, 2019 at 12:27:11PM -0600, Peter Bergner wrote: > On 12/4/19 5:03 PM, Segher Boessenkool wrote: > > On Wed, Dec 04, 2019 at 03:53:30PM -0600, Peter Bergner wrote: > >> Right. I'll come up with a patch and hopef

Re: [PATCH] rs6000: Fix PR92923, __builtin_vec_xor() causes subregs to be used when not using V4SImode vectors

2019-12-20 Thread Segher Boessenkool
ot. Same comments for the p8 test of course. Okay with or without those adjusted (they aren't wrong, just weird style). Thanks, Segher

Re: [PATCH] PowerPC, Rename SIGNED_BIT_OFFSET_P to SIGNED_INTEGER_BIT_P

2019-12-20 Thread Segher Boessenkool
Hi! On Wed, Dec 18, 2019 at 05:15:21PM -0500, Michael Meissner wrote: > In the patch: > https://gcc.gnu.org/ml/gcc-patches/2019-12/msg01201.html > > Segher Boessenkool asked me to submit a patch to rename the macros used to see > if a number is a valid signed 16 or 34-bit value

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