Re: [PATCH v3] bpf.2: Use standard types and attributes

2021-05-16 Thread Alejandro Colomar (man-pages) via Gcc-patches
On 5/15/21 9:01 PM, Alejandro Colomar wrote: Some manual pages are already using C99 syntax for integral types 'uint32_t', but some aren't. There are some using kernel syntax '__u32'. Fix those. Both the kernel and the standard types are 100% binary compatible, and the source code differences

Re: [PATCH] Add dg-final option-based target selectors

2021-05-16 Thread Thomas Schwinge
Hi Richard! On 2021-04-19T20:28:31+0100, Richard Sandiford via Gcc-patches wrote: > This patch adds target selectors of the form: > > { any-opts "opt1" ... "optn" } > { no-opts "opt1" ... "optn" } > > for skipping or xfailing tests based on compiler options. Nice! > It only > works for dg-

RFA: Fix match_scratch bug in define_subst

2021-05-16 Thread Joern Rennecke
Bootstrapped on x86_64-pc-linux-gnu. 2020-12-10 Joern Rennecke Fix bug in the define_subst handling that made match_scratch unusable for multi-alternative patterns. diff --git a/gcc/gensupport.c b/gcc/gensupport.c index e1ca06dbc1e..4022c661adb 100644 --- a/gcc/gensupport.c +++ b/gcc/g

RFA: Improve message for wrong number of alternatives

2021-05-16 Thread Joern Rennecke
When you have lots of operands and lots of alternatives in a pattern, it is often not immediately apparent if the problem is in the indicated alternative or in the one that genoutput uses as a reference for the 'correct' number of alternatives, and/or if you dropped a comma or had one too many. By

[no subject]

2021-05-16 Thread Joern Rennecke
At the moment, for a match_dup in a define_cond_exec, you'd have to give the number in the resulting pattern(s) rather than in the substitute pattern. That's not only wrong, but can also be impossible when the pattern should apply to multiple patterns with different operand numbers. The attached

RFA: Fix match_dup numbering bug in define_cond_exec

2021-05-16 Thread Joern Rennecke
(Sorry about re-sending - I accidentally forgot to add a subject in the last post, which would make it hard to have a meaningful thread.) At the moment, for a match_dup in a define_cond_exec, you'd have to give the number in the resulting pattern(s) rather than in the substitute pattern. That's n

RFA: Support cobbers in define_cond_exec

2021-05-16 Thread Joern Rennecke
At the moment, define_cond_exec allows only a single substitution pattern. That is rather limiting if the target needs to clobber a scratch register in order to compute the required condition. The attached patch allows to add clobber patterns after the main pattern, and also adds support for MATCH

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

2021-05-16 Thread Segher Boessenkool
On Sat, May 15, 2021 at 08:44:29PM +0200, Hans-Peter Nilsson via Gcc-patches wrote: > When eyeballing the r12-440 / bd1cd0d0e0fe / "Remove > CC0" commit, I noticed parts that could be improved. > > Regarding the first change: at first I thought that just > removing the word "better" was the best

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

2021-05-16 Thread Hans-Peter Nilsson via Gcc-patches
> From: Segher Boessenkool > Date: Sun, 16 May 2021 18:18:17 +0200 > On Sat, May 15, 2021 at 08:44:29PM +0200, Hans-Peter Nilsson via Gcc-patches > wrote: > > When eyeballing the r12-440 / bd1cd0d0e0fe / "Remove > > CC0" commit, I noticed parts that could be improved. > > > > Regarding the firs

RFA: reduce lra spill failures by splitting likely-spilled-reg hogging pseudo

2021-05-16 Thread Joern Rennecke
Bootstrapped regtested and on x86_64-pc-linux-gnu. 2021-02-22 Joern Rennecke lra fix to reduce fatal spill failures. * lra-constraints.c (split_reg): No longer static. * lra-int.h (split_reg): Declare. * lra-assigns.c (lra_split_hard_reg_for): Add strategy t

[PATCH] Don't simplify (A & C) != 0 ? D : 0 for pointer types.

2021-05-16 Thread apinski--- via Gcc-patches
From: Andrew Pinski While rewriting part of PHI-OPT to use match-and-simplify, I ran into a bug where this pattern in match.pd would hit and would produce invalid gimple; a shift of a pointer type. This just disables this simplification for pointer types similarly to what is already done in PHI-

RFA: Add option -fretry-compilation

2021-05-16 Thread Joern Rennecke
For architectures with likely spilled register classes, neither register allocator is guaranteed to succeed when using optimization. If you have just a few files to compile, you can try by hand which compiler options will succeed and still give reasonable code, but for large projects, hand-tweakin

[PATCH] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-16 Thread apinski--- via Gcc-patches
From: Andrew Pinski Instead of some of the more manual optimizations inside phi-opt, it would be good idea to do a lot of the heavy lifting inside match and simplify instead. In the process, this moves the three simple A?CST1:CST2 (where CST1 or CST2 is zero) simplifications. OK? Boostrapped and

RFA: Don't squash target character arrays into a narrower host string

2021-05-16 Thread Joern Rennecke
braced_list_to_string creates a host string, so it's not suitable when e.g. the host has 8 bit chars, but the target has 16 bit chars. The attached patch checks if host and target char sizes are different and in that case falls back to leaving the array as an array. Bootstrapped on x86_64-pc-lin

Re: RFA: Improve message for wrong number of alternatives

2021-05-16 Thread Martin Sebor via Gcc-patches
On 5/16/21 7:57 AM, Joern Rennecke wrote: When you have lots of operands and lots of alternatives in a pattern, it is often not immediately apparent if the problem is in the indicated alternative or in the one that genoutput uses as a reference for the 'correct' number of alternatives, and/or if

[PATCH V2] Split loop for NE condition.

2021-05-16 Thread Jiufu Guo via Gcc-patches
When there is the possibility that overflow/wrap may happen on the loop index, a few optimizations would not happen. For example code: foo (int *a, int *b, unsigned k, unsigned n) { while (++k != n) a[k] = b[k] + 1; } For this code, if "k > n", k would wrap. if "k < n" at begining, it cou

[PATCH] Update mpfr version to 3.1.6

2021-05-16 Thread Richard Biener
This updates the mpfr version to 3.1.6 which is the last bugfix release from the 3.1.x series and avoids printing the version is buggy but acceptable from our configury. Pushed. 2021-05-17 Richard Biener contrib/ * download_prerequesites: Update mpfr version to 3.1.6. * prereq