[committed] libgomp: Add a testcase for omp_get_num_teams inside of target inside of host teams

2021-11-15 Thread Jakub Jelinek via Gcc-patches
Hi! This is https://github.com/OpenMP/spec/issues/3183 There is an agreement that we should return 1 team inside of target, even if that target is inside of host teams. We were doing that when offloading and not during host fallback, r12-5151 should fix that even for host fallback. Bootstrapped/

Re: [PATCH] x86: Require TARGET_HIMODE_MATH for HImode atomic bit expanders

2021-11-15 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 12, 2021 at 04:34:27PM +0100, Jakub Jelinek via Gcc-patches wrote: > Why? When one uses 16-bit atomics, no matter what he does there will be > some HImode math (at least the atomic instruction). And the rest can be > dealt with. > > I have following patch queued for testing for this.

[pushed] c++: Add -fimplicit-constexpr

2021-11-15 Thread Jason Merrill via Gcc-patches
With each successive C++ standard the restrictions on the use of the constexpr keyword for functions get weaker and weaker; it recently occurred to me that it is heading toward the same fate as the C register keyword, which was once useful for optimization but became obsolete. Similarly, it seems

Re: [PATCH 4/5] vect: Make reduction code handle calls

2021-11-15 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 1:48 PM Richard Sandiford via Gcc-patches wrote: > > This patch extends the reduction code to handle calls. So far > it's a structural change only; a later patch adds support for > specific function reductions. > > Most of the patch consists of using code_helper and gimple

Re: [PATCH 5/5] vect: Add support for fmax and fmin reductions

2021-11-15 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 1:49 PM Richard Sandiford via Gcc-patches wrote: > > This patch adds support for reductions involving calls to fmax*() > and fmin*(), without the -ffast-math flags that allow them to be > converted to MAX_EXPR and MIN_EXPR. > > Tested on aarch64-linux-gnu and x86_64-linux-g

Re: [PATCH] PR target/103069: Relax cmpxchg loop for x86 target

2021-11-15 Thread Uros Bizjak via Gcc-patches
On Sat, Nov 13, 2021 at 3:34 AM Hongyu Wang wrote: > > Hi, > > From the CPU's point of view, getting a cache line for writing is more > expensive than reading. See Appendix A.2 Spinlock in: > > https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/ > xeon-lock-scaling-analysis

[PATCH] configure: define TARGET_LIBC_GNUSTACK on musl

2021-11-15 Thread Ilya Lipnitskiy via Gcc-patches
musl only uses PT_GNU_STACK to set default thread stack size and has no executable stack support[0], so there is no reason not to emit the .note.GNU-stack section on musl builds. [0]: https://lore.kernel.org/all/20190423192534.gn23...@brightrain.aerifal.cx/T/#u gcc/ChangeLog: * configur

Re: [PATCH] x86: Require TARGET_HIMODE_MATH for HImode atomic bit expanders

2021-11-15 Thread Uros Bizjak via Gcc-patches
On Mon, Nov 15, 2021 at 9:01 AM Jakub Jelinek wrote: > > On Fri, Nov 12, 2021 at 04:34:27PM +0100, Jakub Jelinek via Gcc-patches wrote: > > Why? When one uses 16-bit atomics, no matter what he does there will be > > some HImode math (at least the atomic instruction). And the rest can be > > deal

Re: [PATCH 11/11] libstdc++: Fix ODR issues with different -m flags

2021-11-15 Thread Matthias Kretz
ping. OK to push? On Tuesday, 8 June 2021 14:12:23 CET Matthias Kretz wrote: > From: Matthias Kretz > > Explicitly support use of the stdx::simd implementation in situations > where the user links TUs that were compiled with different -m flags. In > general, this is always a (quasi) ODR violatio

Re: [PATCH] C, C++, OpenMP: Add 'has_device_addr' clause to 'target' construct

2021-11-15 Thread Marcel Vollweiler
Hi Jakub, Am 20.10.2021 um 14:38 schrieb Jakub Jelinek: On Mon, Oct 18, 2021 at 06:17:20PM +0200, Marcel Vollweiler wrote: @@ -14255,6 +14257,16 @@ c_parser_omp_clause_use_device_addr (c_parser *parser, tree list) list); } +/* OpenMP 5.1: + has_device_a

Re: [PATCH] testsuite: i386: Require dfp in gcc.target/i386/pr101346.c

2021-11-15 Thread Rainer Orth
Rainer Orth writes: > gcc.target/i386/pr101346.c currently FAILs on Solaris/x86: > > FAIL: gcc.target/i386/pr101346.c (test for excess errors) > > Excess errors: > /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.target/i386/pr101346.c:6:1: > error: decimal floating-point not supported for this tar

Re: [PATCH] Enhance unordered container merge

2021-11-15 Thread Jonathan Wakely via Gcc-patches
On Mon, 15 Nov 2021 at 06:00, François Dumont wrote: > > On 15/11/21 12:25 am, Jonathan Wakely wrote: > > On Sun, 14 Nov 2021 at 13:31, François Dumont via Libstdc++ > > wrote: > >> libstdc++: Unordered containers merge re-use hash code. > >> > >> When merging between 2 unordered conta

[PATCH] libffi: Use #define instead of .macro in src/x86/win64.S [PR102874]

2021-11-15 Thread Rainer Orth
The libffi 3.4.2 import badly broke Solaris/x86 bootstrap with the native assembler: Assembler: "/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 88 : Illegal mnemonic Near line: ".macro epilogue" "/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 88 : Sy

Re: [PATCH] libffi: Use #define instead of .macro in src/x86/win64.S [PR102874]

2021-11-15 Thread Richard Biener via Gcc-patches
On Mon, Nov 15, 2021 at 10:16 AM Rainer Orth wrote: > > The libffi 3.4.2 import badly broke Solaris/x86 bootstrap with the native > assembler: > > Assembler: > "/vol/gcc/src/hg/master/local/libffi/src/x86/win64.S", line 88 : > Illegal mnemonic > Near line: ".macro epilogue" >

[PATCH] tree-optimization/103219 - avoid ICE in unroll-and-jam

2021-11-15 Thread Richard Biener via Gcc-patches
For no particularly good reason unroll-and-jam uses single_dom_exit to determine the exit for the region it wants to run VN on. That happens to ICE because of the dominance restriction. Use single_exit instead. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-11-15 Richard Bie

Re: [PATCH 3/3] gimple-fold: Use ranges to simplify strncat and snprintf

2021-11-15 Thread Siddhesh Poyarekar
On 11/12/21 01:11, Siddhesh Poyarekar wrote: Remove the warnings for strncat since it is already handled (and even the error messages look identical) in gimple-ssa-warn-access. Instead, use len range to determine if it is within bounds of source and destination and simplify it to strcat if it's

RE: [PATCH 2/5]AArch64 sve: combine nested if predicates

2021-11-15 Thread Tamar Christina via Gcc-patches
Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-linux-gnu and no issues. gcc/ChangeLog: * tree-vect-stmts.c (prepare_load_store_mask): Rename to... (prepare_vec_mask): ...This and record operations that have already been masked. (vectorizable_call): Use i

Re: [PATCH] PR target/103069: Relax cmpxchg loop for x86 target

2021-11-15 Thread Hongyu Wang via Gcc-patches
Thanks for your review, this is the patch I'm going to check-in. Uros Bizjak via Gcc-patches 于2021年11月15日周一 下午4:25写道: > > On Sat, Nov 13, 2021 at 3:34 AM Hongyu Wang wrote: > > > > Hi, > > > > From the CPU's point of view, getting a cache line for writing is more > > expensive than reading. See

[PATCH] middle-end/103193 - avoid canonicalizing <= and >= to == for floats

2021-11-15 Thread Richard Biener via Gcc-patches
This avoids doing aforementioned canoncalization when -ftrapping-math is in effect and we honor NaNs. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK? Thanks, Richard. 2021-11-15 Richard Biener PR middle-end/103193 * match.pd: Avoid canonicalizing (le/ge @0 @0) to (e

[PATCH 0/4] OpenMP: Parsing of lvalues for "map" clauses for C andjC++

2021-11-15 Thread Julian Brown
This patch series builds on top of the previously-posted series: "Topological sort for OpenMP 5.0 base pointers" https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577211.html and: "OpenMP: Deep struct dereferences" https://gcc.gnu.org/pipermail/gcc-patches/2021-October/580721.html To add su

[PATCH 1/4] Add debug_omp_expr

2021-11-15 Thread Julian Brown
The C and C++ front-ends use a TREE_LIST as a 3-tuple representing an OpenMP array section, which tends to crash debug_generic_expr if one wants to print such an expression in the debugger. This little helper function works around that. We might want to adjust the representation of array sections

[PATCH 2/4] OpenMP: Add inspector class to unify mapped address analysis

2021-11-15 Thread Julian Brown
Several places in the C and C++ front-ends dig through OpenMP addresses from "map" clauses (etc.) in order to determine whether they are component accesses that need "attach" operations, check duplicate mapping clauses, and so on. When we're extending support for more kinds of lvalues in map claus

[PATCH 3/4] OpenMP: lvalue parsing for map clauses (C++)

2021-11-15 Thread Julian Brown
This patch changes parsing for OpenMP map clauses in C++ to use the generic expression parser, hence adds support for parsing general lvalues (as required by OpenMP 5.0+). So far only a few new types of expression are actually supported throughout compilation (including everything in the testsuite

[PATCH 4/4] OpenMP: lvalue parsing for map clauses (C)

2021-11-15 Thread Julian Brown
This patch adds support for parsing general lvalues for OpenMP "map" clauses to the C front-end, similar to the previous patch for C++. OK? Thanks, Julian 2021-11-15 Julian Brown gcc/c/ * c-parser.c (c_parser_postfix_expression_after_primary): Add support for OpenMP array se

[patch] Fortran/OpenMP: Support most of 5.1 atomic extensions

2021-11-15 Thread Tobias Burnus
The basic support was lying around here already for too long. TODO at some point: Update the trans-openmp.c part to handle compare + extend the testcases even more, especially when compare works. OK? Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201

[PATCH] libstdc++: Define header for C++23

2021-11-15 Thread Jonathan Wakely via Gcc-patches
Add the header and a new libstdc++_libbacktrace.a library that provides the implementation. For now, the new library is only built if --enable-libstdcxx-backtrace=yes is used. As with the Filesystem TS, the new library is only provided as a static archive. This should be improved during stage 3.

GCC 12.0.0 Status Report (2021-11-15), Stage 3 in effect NOW

2021-11-15 Thread Richard Biener via Gcc-patches
Status == The GCC development branch now is open for general bugfixing (Stage 3). Take the quality data below with a big grain of salt - most of the new P3 classified bugs will become P1 or P2 (generally every regression against GCC 11 is to be considered P1 if it concerns primary or second

[PATCH] openmp: Add support for thread_limit clause on target

2021-11-15 Thread Jakub Jelinek via Gcc-patches
Hi! OpenMP 5.1 says that thread_limit clause can also appear on target, and similarly to teams should affect the thread-limit-var ICV. On combined target teams, the clause goes to both. We actually passed thread_limit internally on target already before, but only used it for gcn/ptx offloading to

[PATCH] tree-optimization/103237 - avoid vectorizing unhandled double reductions

2021-11-15 Thread Richard Biener via Gcc-patches
Double reductions which have multiple LC PHIs in the inner loop are not handled correctly during transformation since those PHIs are not properly classified as reduction. The following disables vectorizing them. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-11-15 Richard Bie

[COMMITTED] Fix PHI ordering problems in the path solver.

2021-11-15 Thread Aldy Hernandez via Gcc-patches
After auditing the PHI range calculations, I'm not convinced we've caught all the corner cases. They haven't shown up in the wild (yet), but better safe than sorry. We shouldn't write anything to the cache or trigger additional lookups while calculating a PHI, as this may cause ordering problems.

[COMMITTED] path solver: Default to global range if nothing found.

2021-11-15 Thread Aldy Hernandez via Gcc-patches
This has been a long time coming, but we weren't able to make the change because of some unrelated regressions. Tested on x86-64 & ppc64le Linux. gcc/ChangeLog: * gimple-range-path.cc (path_range_query::internal_range_of_expr): Default to global range if nothing found. gcc/tests

Re: [PATCH 3/5] vect: Support gather loads with SLP

2021-11-15 Thread Richard Biener via Gcc-patches
On Fri, Nov 12, 2021 at 7:01 PM Richard Sandiford via Gcc-patches wrote: > > This patch adds SLP support for IFN_GATHER_LOAD. Like the SLP > support for IFN_MASK_LOAD, it works by treating only some of the > arguments as child nodes. Unlike IFN_MASK_LOAD, it requires the > other arguments (base,

Re: [PATCH 4/5] if-conv: Apply VN to hoisted conversions

2021-11-15 Thread Richard Biener via Gcc-patches
On Fri, Nov 12, 2021 at 7:05 PM Richard Sandiford via Gcc-patches wrote: > > This patch is a prerequisite for a later one. At the moment, > if-conversion converts predicated POINTER_PLUS_EXPRs into > non-wrapping forms, which for: > > … = base + offset > > becomes: > > tmp = (unsigned lon

[PATCH] libffi: Update LOCAL_PATCHES

2021-11-15 Thread H.J. Lu via Gcc-patches
Add commit a91f844ef449d0dd1cf2e0e47b0ade0d8a6304e1 Author: Rainer Orth Date: Mon Nov 15 10:24:27 2021 +0100 libffi: Use #define instead of .macro in src/x86/win64.S [PR102874] to LOCAL_PATCHES. * LOCAL_PATCHES: Add commit a91f844ef44. --- libffi/LOCAL_PATCHES | 1 + 1 file cha

Re: [PATCH] openmp: Add support for thread_limit clause on target

2021-11-15 Thread Tobias Burnus
Hi, On 15.11.21 13:05, Jakub Jelinek wrote: OpenMP 5.1 says that thread_limit clause can also appear on target, and similarly to teams should affect the thread-limit-var ICV. On combined target teams, the clause goes to both. This patch does this also for Fortran. OK, once the post-bootstap t

Re: [PATCH] openmp: Add support for thread_limit clause on target

2021-11-15 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 15, 2021 at 02:00:42PM +0100, Tobias Burnus wrote: > Hi, > > On 15.11.21 13:05, Jakub Jelinek wrote: > > OpenMP 5.1 says that thread_limit clause can also appear on target, > > and similarly to teams should affect the thread-limit-var ICV. > > On combined target teams, the clause goes

[PATCH] ivopts: Improve code generated for very simple loops.

2021-11-15 Thread Roger Sayle
This patch tidies up the code that GCC generates for simple loops, by selecting/generating a simpler loop bound expression in ivopts. The original motivation came from looking at the following loop (from gcc.target/i386/pr90178.c) int *find_ptr (int* mem, int sz, int val) { for (int i = 0; i <

Re: GCC 12.0.0 Status Report (2021-11-15), Stage 3 in effect NOW

2021-11-15 Thread H.J. Lu via Gcc-patches
On Mon, Nov 15, 2021 at 4:05 AM Richard Biener via Gcc-patches wrote: > > > Status > == > > The GCC development branch now is open for general bugfixing (Stage 3). > > Take the quality data below with a big grain of salt - most of the > new P3 classified bugs will become P1 or P2 (generally ev

[PATCH] Check optab before transforming atomic bit test and operations

2021-11-15 Thread H.J. Lu via Gcc-patches
Check optab before transforming equivalent, but slighly different cases of atomic bit test and operations to their canonical forms. gcc/ PR middle-end/103184 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Check optab before transforming equivalent, but slighly different

[PATCH] x86: Add gcc.target/i386/pr103205-2.c

2021-11-15 Thread H.J. Lu via Gcc-patches
PR target/103205 * gcc.target/i386/pr103205-2.c: New test. --- gcc/testsuite/gcc.target/i386/pr103205-2.c | 46 ++ 1 file changed, 46 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr103205-2.c diff --git a/gcc/testsuite/gcc.target/i386/pr10320

Re: [PATCH][GCC] aarch64: Add LS64 extension and intrinsics

2021-11-15 Thread Richard Sandiford via Gcc-patches
Przemyslaw Wirkus writes: > Hi, > > This patch is adding support for LS64 (Armv8.7-A Load/Store 64 Byte extension) > which is part of Armv8.7-A architecture. Changes include missing plumbing for > TARGET_LS64, LS64 data structure and intrinsics defined in ACLE [0]. Machine > description of intrins

[committed] testsuite: Add testcase for already fixed PR [PR100469]

2021-11-15 Thread Jakub Jelinek via Gcc-patches
Hi! This bug introduced in r11-7448-gff92ede8d269375f800e1b347a48f4698874b4a3 has been fixed already by r12-1354-g2d2ed777b23ab6503027039e0adbfe1162f52b2f aka PR100852 fix. Regtested on x86_64-linux -m32/-m64, committed to trunk (so far) as obvious. 2021-11-15 Jakub Jelinek PR debug/

Re: [PATCH] x86: Add gcc.target/i386/pr103205-2.c

2021-11-15 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 15, 2021 at 05:40:01AM -0800, H.J. Lu via Gcc-patches wrote: > PR target/103205 > * gcc.target/i386/pr103205-2.c: New test. Ok, thanks. Jakub

[PATCH] x86_64: Avoid rorx rotation instructions with -Os

2021-11-15 Thread Roger Sayle
This patch teaches the i386 backend to avoid using BMI2's rorx instructions when optimizing for size. The benefits are shown with the following example: unsigned int ror1(unsigned int x) { return (x >> 1) | (x << 31); } unsigned int ror2(unsigned int x) { return (x >> 2) | (x << 30); } unsigned

Re: [PATCH 4/5] if-conv: Apply VN to hoisted conversions

2021-11-15 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Fri, Nov 12, 2021 at 7:05 PM Richard Sandiford via Gcc-patches > wrote: >> >> This patch is a prerequisite for a later one. At the moment, >> if-conversion converts predicated POINTER_PLUS_EXPRs into >> non-wrapping forms, which for: >> >> … = base

Re: [PATCH 4/5] if-conv: Apply VN to hoisted conversions

2021-11-15 Thread Richard Biener via Gcc-patches
On Mon, Nov 15, 2021 at 3:00 PM Richard Sandiford wrote: > > Richard Biener via Gcc-patches writes: > > On Fri, Nov 12, 2021 at 7:05 PM Richard Sandiford via Gcc-patches > > wrote: > >> > >> This patch is a prerequisite for a later one. At the moment, > >> if-conversion converts predicated POIN

Re: [PATCH] rs6000: Fix a handful of 32-bit built-in function problems in the new support

2021-11-15 Thread Bill Schmidt via Gcc-patches
Hi Segher, On 11/14/21 9:29 AM, Segher Boessenkool wrote: > Hi! > > On Sun, Nov 14, 2021 at 08:17:41AM -0600, Bill Schmidt wrote: >> On 11/11/21 10:50 AM, Bill Schmidt wrote: >>> On 11/11/21 7:11 AM, Segher Boessenkool wrote: void f(long x) { __builtin_set_texasr(x); } built with -m

Re: [PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-15 Thread Peter Zijlstra
On Mon, Nov 15, 2021 at 12:33:16PM +0530, Prathamesh Kulkarni wrote: > On Sun, 14 Nov 2021 at 02:07, David Malcolm via Gcc-patches > > +/* Handle "returns_zero_on_failure" and "returns_zero_on_success" > > attributes; > > + arguments as in struct attribute_spec.handler. */ > > + > > +static tr

Re: [ping^4] Make sure that we get unique test names if several DejaGnu directives refer to the same line [PR102735]

2021-11-15 Thread Thomas Schwinge
Hi! ..., and here is another ping. Grüße Thomas On 2021-11-08T11:45:12+0100, I wrote: > Hi! > > Ping, once more. > > > Grüße > Thomas > > > On 2021-10-14T12:12:41+0200, I wrote: >> Hi! >> >> Ping, again. >> >> Commit log updated for >> "privatization-1-compute.

[PATCH] tree-optimization/102880 - make PHI-OPT recognize more CFGs

2021-11-15 Thread Richard Biener via Gcc-patches
This allows extra edges into the middle BB for the PHI-OPT transforms using replace_phi_edge_with_variable that do not end up moving stmts from that middle BB. This avoids regressing gcc.dg/tree-ssa/ssa-hoist-4.c with the actual fix for PR102880 where CFG cleanup has the choice to remove two forwa

[ping] Use 'location_hash' for 'gcc/diagnostic-spec.h:nowarn_map'

2021-11-15 Thread Thomas Schwinge
Hi! Ping. Grüße Thomas On 2021-11-09T15:18:44+0100, I wrote: > Hi! > > On 2021-09-03T21:16:46+0200, I wrote: >> On 2021-09-01T18:14:46-0600, Martin Sebor wrote: >>> On 9/1/21 1:35 PM, Thomas Schwinge wrote: On 2021-06-23T13:47:08-0600, Martin Sebor via Gcc-patches wrote: > --

Re: Enable more type attributes for signature changes

2021-11-15 Thread Martin Sebor via Gcc-patches
On 11/13/21 7:44 AM, Jan Hubicka wrote: Hi, this patch whitelists attributes that are safe for attribute changes and also makes access attribute dropped if function sigunature is changed. We could do better by updating the attribute, but doing so seems to be bit snowballing since with LTO the war

Re: Enable ipa-sra for functions with fnspec attribute

2021-11-15 Thread Martin Jambor
Hi, On Sat, Nov 13 2021, Jan Hubicka via Gcc-patches wrote: > Hi, > this patch enables some ipa-sra on fortran by allowing signature changes on > functions > with "fn spec" attribute when ipa-modref is enabled. This is possible since > ipa-modref > knows how to preserve things we trace in fnspe

[COMMITTED] Drop tree overflow in irange setter.

2021-11-15 Thread Aldy Hernandez via Gcc-patches
Drop meaningless overflow that may creep into the IL. Tested on x86-64 Linux. gcc/ChangeLog: PR tree-optimization/103207 * value-range.cc (irange::set): Drop overflow. gcc/testsuite/ChangeLog: * gcc.dg/pr103207.c: New test. --- gcc/testsuite/gcc.dg/pr103207.c | 15

Ping: [PATCH 1/5] Add XXSPLTI* and LXVKQ instructions (new data structure and function)

2021-11-15 Thread Michael Meissner via Gcc-patches
Ping patch. | Date: Fri, 5 Nov 2021 00:04:40 -0400 | Subject: [PATCH 1/5] Add XXSPLTI* and LXVKQ instructions (new data structure and function) | Message-ID: -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com

Ping: [PATCH 2/5] Add Power10 XXSPLTI* and LXVKQ instructions (LXVKQ)

2021-11-15 Thread Michael Meissner via Gcc-patches
Ping patch: | Date: Fri, 5 Nov 2021 00:07:05 -0400 | Subject: [PATCH 2/5] Add Power10 XXSPLTI* and LXVKQ instructions (LXVKQ) | Message-ID: -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com

Ping: [PATCH 3/5] Add Power10 XXSPLTIW

2021-11-15 Thread Michael Meissner via Gcc-patches
Ping patch. | Date: Fri, 5 Nov 2021 00:09:07 -0400 | Subject: [PATCH 3/5] Add Power10 XXSPLTIW | Message-ID: -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com

Ping: [PATCH 4/5] Add Power10 XXSPLTIDP for vector constants

2021-11-15 Thread Michael Meissner via Gcc-patches
Ping patch. | Date: Fri, 5 Nov 2021 00:10:18 -0400 | Subject: [PATCH 4/5] Add Power10 XXSPLTIDP for vector constants | Message-ID: -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com

Ping: [PATCH 5/5] Add Power10 XXSPLTIDP for SFmode/DFmode constants.

2021-11-15 Thread Michael Meissner via Gcc-patches
Ping patch. | Date: Fri, 5 Nov 2021 00:11:20 -0400 | Subject: [PATCH 5/5] Add Power10 XXSPLTIDP for SFmode/DFmode constants. | Message-ID: -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com

Re: [ping] Use 'location_hash' for 'gcc/diagnostic-spec.h:nowarn_map'

2021-11-15 Thread Martin Sebor via Gcc-patches
On 11/15/21 8:01 AM, Thomas Schwinge wrote: Hi! Ping. This change looks good to me. Martin Grüße Thomas On 2021-11-09T15:18:44+0100, I wrote: Hi! On 2021-09-03T21:16:46+0200, I wrote: On 2021-09-01T18:14:46-0600, Martin Sebor wrote: On 9/1/21 1:35 PM, Thomas Schwinge wrote: On 20

PING 2 [PATCH 0/2] provide simple detection of indeterminate pointers

2021-11-15 Thread Martin Sebor via Gcc-patches
Pinging the two patches below: -Wuse-after-free: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583044.html and -Wdangling-pointer: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583045.html On 11/8/21 3:41 PM, Martin Sebor wrote: Ping for the two patches below: -Wuse-after-

PING [PATCH] fix up compute_objsize (including PR 103143)

2021-11-15 Thread Martin Sebor via Gcc-patches
Ping for the following cleanup patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583735.html On 11/8/21 7:34 PM, Martin Sebor wrote: The pointer-query code that implements compute_objsize() that's in turn used by most middle end access warnings now has a few warts in it and (at leas

PING 2 [PATCH] restore ancient -Waddress for weak symbols [PR33925]

2021-11-15 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582415.html On 11/7/21 4:31 PM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582415.html On 10/23/21 5:06 PM, Martin Sebor wrote: On 10/4/21 3:37 PM, Jason Merrill wrote: On 10/4/21 14:42, Martin

[PATCH 0/2] Make use of the diagnose_as attribute to improve libstdc++ diagnostics

2021-11-15 Thread Matthias Kretz
After my two C++ patches for template diagnostics and the diagnose_as attribute are in, I'd like to make use of the attribute for std::*string and std::pmr::*string as well as for std::experimental::simd diagnostics. Matthias Kretz (2): libstdc++: Use diagnose_as attribute to improve string di

[PATCH 1/2] libstdc++: Use diagnose_as attribute to improve string diagnostics

2021-11-15 Thread Matthias Kretz
This hides the basic_string template in all diagnostics, reducing the signal-to-noise ratio significantly. It also hides the std::__cxx11 namespace from users by presenting it as std. Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: PR c++/89370 * include/bits/c++config:

[PATCH 2/2] libstdc++: Use diagnose_as attribute to improve simd diagnostics

2021-11-15 Thread Matthias Kretz
Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h: Diagnose 'std::experimental::parallelism_v2::simd_abi' as 'simd_abi'. On x86, diagnose _VecBuiltin<16>, _VecBuiltin<32>, and _VecBltnBtmsk<64> as 'simd_abi::[SSE]', 'simd_a

RE: [Patch 1/8, Arm, AArch64, GCC] Refactor mbranch-protection option parsing and make it common to AArch32 and AArch64 backends. [Was RE: [Patch 2/7, Arm, GCC] Add option -mbranch-protection.]

2021-11-15 Thread Tejas Belagod via Gcc-patches
Ping for this series. Thanks, Tejas. > -Original Message- > From: Gcc-patches bounces+belagod=gcc.gnu@gcc.gnu.org> On Behalf Of Tejas Belagod via > Gcc-patches > Sent: Thursday, October 28, 2021 12:41 PM > To: Richard Earnshaw ; gcc- > patc...@gcc.gnu.org > Subject: [Patch 1/8, Arm,

Re: [PATCH] c++: __builtin_bit_cast To C array target type [PR103140]

2021-11-15 Thread will wray via Gcc-patches
Ping. One motivation for allowing builtin bit_cast to builtin array is that it enables direct bitwise constexpr comparisons via memcmp: template constexpr int bit_equal(A const& a, B const& b) { static_assert( sizeof a == sizeof b, "bit_equal(a,b) requires same sizeof"

Re: [PATCH] c++: __builtin_bit_cast To C array target type [PR103140]

2021-11-15 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 15, 2021 at 12:12:22PM -0500, will wray via Gcc-patches wrote: > One motivation for allowing builtin bit_cast to builtin array is that > it enables direct bitwise constexpr comparisons via memcmp: > > template > constexpr int bit_equal(A const& a, B const& b) > { > st

RE: [PATCH v2] tree-optimization/101186 - extend FRE with "equivalence map" for condition prediction

2021-11-15 Thread Di Zhao OS via Gcc-patches
Attached is the updated patch. Fixed some errors in testcases. > -Original Message- > From: Richard Biener > Sent: Wednesday, November 10, 2021 5:44 PM > To: Di Zhao OS > Cc: gcc-patches@gcc.gnu.org; Andrew MacLeod > Subject: Re: [PATCH v2] tree-optimization/101186 - extend FRE with > "

[PATCH] libcpp: Implement -Wbidi-chars for CVE-2021-42574 [PR103026]

2021-11-15 Thread Marek Polacek via Gcc-patches
On Mon, Nov 08, 2021 at 04:33:43PM -0500, Marek Polacek wrote: > Ping, can we conclude on the name? IMHO, -Wbidirectional is just fine, > but changing the name is a trivial operation. Here's a patch with a better name (suggested by Jonathan W.). Otherwise no changes. Bootstrapped/regtested on

[PATCH v2 0/3] gimple-fold improvements

2021-11-15 Thread Siddhesh Poyarekar
This patchset improves folding in cases where input lengths and/or destination sizes may not be constant but are range bound. Tested on x86_64 with a full bootstrap build and verified that there are no regressions resulting from this patchset. I double-checked that the run was current and I wasn'

[PATCH v2 1/3] gimple-fold: Transform stp*cpy_chk to str*cpy directly

2021-11-15 Thread Siddhesh Poyarekar
Avoid going through another folding cycle and use the ignore flag to directly transform BUILT_IN_STPCPY_CHK to BUILT_IN_STRCPY when set, likewise for BUILT_IN_STPNCPY_CHK to BUILT_IN_STPNCPY. Dump the transformation in dump_file so that we can verify in tests that the direct transformation actuall

[PATCH v2 2/3] gimple-fold: Use ranges to simplify _chk calls

2021-11-15 Thread Siddhesh Poyarekar
Instead of comparing LEN and SIZE only if they are constants, use their ranges to decide if LEN will always be lower than or same as SIZE. This change ends up putting the stringop-overflow warning line number against the strcpy implementation, so adjust the warning check to be line number agnostic

[PATCH v2 3/3] gimple-fold: Use ranges to simplify strncat and snprintf

2021-11-15 Thread Siddhesh Poyarekar
Use ranges for lengths and object sizes in strncat and snprintf to determine if they can be transformed into simpler operations. gcc/ChangeLog: * gimple-fold.c (gimple_fold_builtin_strncat): Use ranges to determine if it is safe to transform to strcat. (gimple_fold_builtin

[PATCH v5 0/1] implement TLS register based stack canary for ARM

2021-11-15 Thread Ard Biesheuvel via Gcc-patches
Bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102352 In the Linux kernel, user processes calling into the kernel are essentially threads running in the same address space, of a program that never terminates. This means that using a global variable for the stack protector canary value is p

[PATCH v5 1/1] [ARM] Add support for TLS register based stack protector canary access

2021-11-15 Thread Ard Biesheuvel via Gcc-patches
Add support for accessing the stack canary value via the TLS register, so that multiple threads running in the same address space can use distinct canary values. This is intended for the Linux kernel running in SMP mode, where processes entering the kernel are essentially threads running the same p

PING: [PATCH] c++: designated init of char array by string constant [PR55227]

2021-11-15 Thread will wray via Gcc-patches
The fixes test out, as does the FIXME that's fixed based on the fixes... Note that the bug causes bogus rejection of any designated initialization of char array from a string literal, except for the singular case where the string literal initializer size exactly matches the target char array size

Re: Basic kill analysis for modref

2021-11-15 Thread H.J. Lu via Gcc-patches
On Sun, Nov 14, 2021 at 10:53 AM Jan Hubicka via Gcc-patches wrote: > > > > > > > I think you want get_addr_base_and_unit_offset here. All > > > variable indexed addresses are in separate stmts. That also means > > > you can eventually work with just byte sizes/offsets? > > > > Will do. The acc

Re: [PATCH] Check optab before transforming atomic bit test and operations

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 6:39 AM, H.J. Lu via Gcc-patches wrote: Check optab before transforming equivalent, but slighly different cases of atomic bit test and operations to their canonical forms. gcc/ PR middle-end/103184 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Check optab

Re: Basic kill analysis for modref

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 11:51 AM, H.J. Lu via Gcc-patches wrote: On Sun, Nov 14, 2021 at 10:53 AM Jan Hubicka via Gcc-patches wrote: I think you want get_addr_base_and_unit_offset here. All variable indexed addresses are in separate stmts. That also means you can eventually work with just byte sizes

Re: [PATCH] Check optab before transforming atomic bit test and operations

2021-11-15 Thread H.J. Lu via Gcc-patches
On Mon, Nov 15, 2021 at 10:59 AM Jeff Law wrote: > > > > On 11/15/2021 6:39 AM, H.J. Lu via Gcc-patches wrote: > > Check optab before transforming equivalent, but slighly different cases > > of atomic bit test and operations to their canonical forms. > > > > gcc/ > > > > PR middle-end/103184

Re: [PATCH] Check optab before transforming atomic bit test and operations

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 12:05 PM, H.J. Lu wrote: On Mon, Nov 15, 2021 at 10:59 AM Jeff Law wrote: On 11/15/2021 6:39 AM, H.J. Lu via Gcc-patches wrote: Check optab before transforming equivalent, but slighly different cases of atomic bit test and operations to their canonical forms. gcc/ P

Re: [PATCH v2 1/3] gimple-fold: Transform stp*cpy_chk to str*cpy directly

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 10:33 AM, Siddhesh Poyarekar wrote: Avoid going through another folding cycle and use the ignore flag to directly transform BUILT_IN_STPCPY_CHK to BUILT_IN_STRCPY when set, likewise for BUILT_IN_STPNCPY_CHK to BUILT_IN_STPNCPY. Dump the transformation in dump_file so that we can

Re: [PATCH 1/3] nptl: Extract from pthread_cond_common.c

2021-11-15 Thread Adhemerval Zanella via Gcc-patches
On 03/11/2021 13:27, Florian Weimer via Libc-alpha wrote: > And make it an installed header. This addresses a few aliasing > violations (which do not seem to result in miscompilation due to > the use of atomics), and also enables use of wide counters in other > parts of the library. > > The de

Re: [PATCH 2/3] elf: Introduce GLRO (dl_libc_freeres), called from __libc_freeres

2021-11-15 Thread Adhemerval Zanella via Gcc-patches
Maybe add a comment why this is will be used. Reviewed-by: Adhemerval Zanella On 03/11/2021 13:27, Florian Weimer via Gcc-patches wrote: > --- > elf/Makefile | 2 +- > elf/dl-libc_freeres.c | 24 > elf/rtld.c | 1 + > malloc/set-fre

Re: [PATCH] Add TSVC tests.

2021-11-15 Thread Iain Sandoe
Hi folks, > On 6 Nov 2021, at 08:05, Martin Liška wrote: > Sorry for issue related to portability. > > On 11/6/21 03:45, David Edelsohn wrote: >> I just noticed that Iain adjusted the tsvc.h for Darwin in the same >> way that I need to adjust it for AIX. Are we trying to keep the >> testcase d

Re: [PATCH v2 3/3] gimple-fold: Use ranges to simplify strncat and snprintf

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 10:33 AM, Siddhesh Poyarekar wrote: Use ranges for lengths and object sizes in strncat and snprintf to determine if they can be transformed into simpler operations. gcc/ChangeLog: * gimple-fold.c (gimple_fold_builtin_strncat): Use ranges to determine if it is sa

[pushed] configure, Darwin: Check ld64 support for -platform-version.

2021-11-15 Thread Iain Sandoe via Gcc-patches
Newer versions of ld64 allow specifiying the OS target (e.g. macos or ios) the version and the SDK version all in a single command. This checks the availability of the command for the current toolchain. tested on *-darwin*, x86_64-linux-gnu, pushed to master, thanks Iain Signed-off-by: Iain Sand

Re: [PATCH v2 2/3] gimple-fold: Use ranges to simplify _chk calls

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 10:33 AM, Siddhesh Poyarekar wrote: Instead of comparing LEN and SIZE only if they are constants, use their ranges to decide if LEN will always be lower than or same as SIZE. This change ends up putting the stringop-overflow warning line number against the strcpy implementation,

[PATCH] Avoid pathological function redeclarations when checking access sizes [PR102759]

2021-11-15 Thread Martin Sebor via Gcc-patches
Declaring a function with a prototype at block scope and then redeclaring it without a prototype at file scope results in losing the prototype but not the attribute access that was implicitly added to the function decl based on the prototype. The middle end code that checks function calls for out-

Re: Basic kill analysis for modref

2021-11-15 Thread Jan Hubicka via Gcc-patches
> > > + if (always_executed > > > + && callee_summary->kills.length () > > > + && (!cfun->can_throw_non_call_exceptions > > > + || !stmt_could_throw_p (cfun, stmt))) > > > +{ > > > + /* Watch for self recursive updates. */ > > > + auto_vec saved_kills; > > > + > >

[PATCH v2] Check optab before transforming atomic bit test and operations

2021-11-15 Thread H.J. Lu via Gcc-patches
On Mon, Nov 15, 2021 at 11:14 AM Jeff Law wrote: > > > > On 11/15/2021 12:05 PM, H.J. Lu wrote: > > On Mon, Nov 15, 2021 at 10:59 AM Jeff Law wrote: > >> > >> > >> On 11/15/2021 6:39 AM, H.J. Lu via Gcc-patches wrote: > >>> Check optab before transforming equivalent, but slighly different cases >

[PATCH] PR fortran/99061 - [10/11/12 Regression] ICE in gfc_conv_intrinsic_atan2d, at fortran/trans-intrinsic.c:4728

2021-11-15 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, the attached patch fixes the handling of the DEC trigonometric intrinsics for different argument kinds. It is based on the original patch by Steve, which fixes the lookup for the needed intrinsics. Regtested on x86_64-pc-linux-gnu. OK for affected branches? Thanks, Harald Fr

[PATCH] simplify get_range_strlen interface

2021-11-15 Thread Martin Sebor via Gcc-patches
The deeply nested PHI handling in get_range_strlen_dynamic makes the code bigger and harder to follow than it would be if done in its own function. The attached patch does that. In addition, the get_range_strlen family of functions use a bitmap to avoid infinite recursion. Rather than dynamical

Re: [PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-15 Thread David Malcolm via Gcc-patches
On Mon, 2021-11-15 at 12:33 +0530, Prathamesh Kulkarni wrote: > On Sun, 14 Nov 2021 at 02:07, David Malcolm via Gcc-patches > wrote: > > > > This patch adds two new attributes.  The followup patch makes use of > > the attributes in -fanalyzer. [...snip...] > > +/* Handle "returns_zero_on_failur

Re: [PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-15 Thread David Malcolm via Gcc-patches
On Mon, 2021-11-15 at 15:45 +0100, Peter Zijlstra wrote: > On Mon, Nov 15, 2021 at 12:33:16PM +0530, Prathamesh Kulkarni wrote: > > On Sun, 14 Nov 2021 at 02:07, David Malcolm via Gcc-patches > > > > +/* Handle "returns_zero_on_failure" and "returns_zero_on_success" > > > attributes; > > > +   arg

Re: [PATCH] simplify get_range_strlen interface

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 3:05 PM, Martin Sebor via Gcc-patches wrote: The deeply nested PHI handling in get_range_strlen_dynamic makes the code bigger and harder to follow than it would be if done in its own function.  The attached patch does that. In addition, the get_range_strlen family of functions u

[GCC-11 PATCH] aarch64: enable Ampere-1 CPU (backport to GCC11)

2021-11-15 Thread Philipp Tomsich
This adds support and a basic turning model for the Ampere Computing "Ampere-1" CPU. The Ampere-1 implements the ARMv8.6 architecture in A64 mode and is modelled as a 4-wide issue (as with all modern micro-architectures, the chosen issue rate is a compromise between the maximum dispatch rate and t

Re: [PATCH] configure: define TARGET_LIBC_GNUSTACK on musl

2021-11-15 Thread Jeff Law via Gcc-patches
On 11/15/2021 1:25 AM, Ilya Lipnitskiy via Gcc-patches wrote: musl only uses PT_GNU_STACK to set default thread stack size and has no executable stack support[0], so there is no reason not to emit the .note.GNU-stack section on musl builds. [0]: https://lore.kernel.org/all/20190423192534.gn2

  1   2   >