Re: [PATCH] Register --sysroot in the driver switches table

2022-01-04 Thread Martin Liška
On 12/20/21 22:28, Olivier Hainque via Gcc-patches wrote: Hello, This change adjusts the processing of --sysroot to save the option in the internal "switches" array, which lets self-specs test for it and provide a default value possibly dependent on environment variables, as in --with-specs=

[PATCH v3] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]

2022-01-04 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to fix the inconsistent behaviors for non-LTO mode and LTO mode. As Martin pointed out, currently the function rs6000_can_inline_p simply makes it inlinable if callee_tree is NULL, but it's unexpected, we should use the command line options from target_option_default_node as def

[PATCH] match.pd: Simplify 1 / X for integer X [PR95424]

2022-01-04 Thread Zhao Wei Liew via Gcc-patches
match.pd/95424: Simplify 1 / X for integer X This patch implements an optimization for the following C++ code: int f(int x) { return 1 / x; } int f(unsigned int x) { return 1 / x; } Before this patch, x86-64 gcc -std=c++20 -O3 produces the following assembly: f(int): xor edx, edx

[PATCH] [RTL/fwprop] Allow propagations from inner loop to outer loop.

2022-01-04 Thread liuhongt via Gcc-patches
Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk. gcc/ChangeLog: PR rtl/103750 * cfgloop.h (loop_contains_p): New function. * fwprop.c (forward_propagate_into): Allow propagations from inner loop to outer loop. gcc/testsuite/ChangeLog:

[PATCH] Fortran: Fix ICE caused by missing error for untyped symbol [PR103258]

2022-01-04 Thread Sandra Loosemore
This patch fixes an ICE that appeared after I checked in my patch for PR101337 back in November, which made the resolve phase try harder to check all operands/arguments for errors instead of giving up after the first one, but it's actually a bug that existed before that and was only revealed by

Go patch committed: Remove duplication of Named_object traversal

2022-01-04 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend removes duplication of Named_object traversal code. Adding type parameters was about to add a partial third version. Remove the duplication to avoid that. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 5ef7d6c289350eb94ff6dd62

Re: [PATCH][hooks-bin] Port email_to.py to Python3.

2022-01-04 Thread Joseph Myers
On Mon, 3 Jan 2022, Martin Liška wrote: > The patch ports the script to Python3. > > Tested with: > > $ echo "libstdc++-v3/xx" | ./email_to.py > gcc-...@gcc.gnu.org > libstdc++-...@gcc.gnu.org > > May I install it? OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] Libquadmath: add nansq() function

2022-01-04 Thread Joseph Myers
On Sat, 1 Jan 2022, FX via Gcc-patches wrote: > This patch adds nansq() to libquadmath, a function that returns a > signalling NaN. It is a need for full libgfortran support of signalling > NaNs, because not all targets that have _Float128 define a > __builtin_nanq() function. All targets with

Re: [power-ieee128] fortran, libgfortran: Assorted -mabi=ieeelongdouble I/O fixes

2022-01-04 Thread Thomas Koenig via Gcc-patches
Hi Jakub, This test FAILs because f951: Error: '-mabi=ieeelongdouble' requires full ISA 2.06 support compiler exited with status 1 FAIL: gfortran.dg/pr47614.f -O0 (test for excess errors) As powerpc64le* only supports -mcpu=power8 and newer, I think we shouldn't be testing with that option.

Re: [power-ieee128] fortran, libgfortran: Add remaining missing *_r17 symbols

2022-01-04 Thread Thomas Koenig via Gcc-patches
Hi Jakub, Following patch adds remaining missing *_r17 entrypoints, so that we have 91 *_r16 and 91 *_r17 entrypoints (and 24 *_c16 and 24 *_c17). This fixes: FAIL: gfortran.dg/dec_math.f90 -O0 execution test FAIL: gfortran.dg/dec_math.f90 -O1 execution test FAIL: gfortran.dg/dec_math.f90

Re: [PATCH] libgomp, openmp: pinned memory

2022-01-04 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 04, 2022 at 07:28:29PM +0100, Jakub Jelinek via Gcc-patches wrote: > > > Other issues in the patch are that it doesn't munlock on deallocation and > > > that because of that deallocation we need to figure out what to do on page > > > boundaries. As documented, mlock can be passed addre

[PATCH] i386: Introduce V2QImode vectorized logic [PR103861]

2022-01-04 Thread Uros Bizjak via Gcc-patches
Add V2QImode logic operations with SSE and GP registers and split them to V4QImode SSE instructions or SImode GP instructions. The patch also fixes PR target/103900. 2022-01-04 Uroš Bizjak gcc/ChangeLog: PR target/103861 * config/i386/mmx.md (one_cmplv2qi3): New insn pattern. (on

Re: [PATCH] libgomp, openmp: pinned memory

2022-01-04 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 04, 2022 at 04:58:19PM +, Andrew Stubbs wrote: > > I think perror is the wrong thing to do, omp_alloc etc. has a well defined > > interface what to do in such cases - the allocation should just fail (not be > > allocated) and depending on user's choice that can be fatal, or return N

Re: [power-ieee128] fortran, libgfortran: Assorted -mabi=ieeelongdouble I/O fixes

2022-01-04 Thread Jakub Jelinek via Gcc-patches
Hi! This test FAILs because f951: Error: '-mabi=ieeelongdouble' requires full ISA 2.06 support compiler exited with status 1 FAIL: gfortran.dg/pr47614.f -O0 (test for excess errors) As powerpc64le* only supports -mcpu=power8 and newer, I think we shouldn't be testing with that option. Ok for p

PING 3 [PATCH v2 2/2] add -Wdangling-pointer [PR #63272]

2022-01-04 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585819.html On 12/13/21 9:50 AM, Martin Sebor wrote: Ping.  This patch, originally submitted on Nov. 1, has not been reviewed yet. https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585819.html On 12/6/21 5:51 PM, Martin Sebor

PING 3 [PATCH v2 1/2] add -Wuse-after-free

2022-01-04 Thread Martin Sebor via Gcc-patches
Ping. (CC'ing Jason as requested.) https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585816.html On 12/13/21 9:48 AM, Martin Sebor wrote: Ping. Jeff, I addressed your comments in the updated patch.  If there are no other changes is the last revision okay to commit? https://gcc.gnu.org/

[PATCH] c++: "more constrained" vs staticness of memfn [PR103783]

2022-01-04 Thread Patrick Palka via Gcc-patches
Here we're rejecting the calls to g1 and g2 as ambiguous even though one overload is more constrained than the other (and otherwise equivalent), because the implicit 'this' parameter of the non-static overload causes cand_parms_match to think the function parameter lists aren't equivalent. This pa

[power-ieee128] fortran, libgfortran: Add remaining missing *_r17 symbols

2022-01-04 Thread Jakub Jelinek via Gcc-patches
Hi! Following patch adds remaining missing *_r17 entrypoints, so that we have 91 *_r16 and 91 *_r17 entrypoints (and 24 *_c16 and 24 *_c17). This fixes: FAIL: gfortran.dg/dec_math.f90 -O0 execution test FAIL: gfortran.dg/dec_math.f90 -O1 execution test FAIL: gfortran.dg/dec_math.f90 -O2

Re: [PATCH] Use enclosing object size if it's smaller than member [PR 101475]

2022-01-04 Thread Martin Sebor via Gcc-patches
On 12/20/21 12:29 PM, Jeff Law wrote: On 12/16/2021 12:56 PM, Martin Sebor via Gcc-patches wrote: Enabling vectorization at -O2 caused quite a few tests for warnings to start failing in GCC 12.  These tests were xfailed and bugs were opened to track the problems until they can be fully analyze

Re: [PATCH] libgomp, openmp: pinned memory

2022-01-04 Thread Andrew Stubbs
On 04/01/2022 15:55, Jakub Jelinek wrote: The usual libgomp way of doing this wouldn't be to use #ifdef __linux__, but instead add libgomp/config/linux/allocator.c that includes some headers, defines some macros and then includes the generic allocator.c. OK, good point, I can do that. I think

[PATCH] c++: constexpr base-to-derived conversion with offset 0 [PR103879]

2022-01-04 Thread Patrick Palka via Gcc-patches
r12-136 made us canonicalize an object/offset pair with negative offset into one with a nonnegative offset, by iteratively absorbing the innermost component into the offset and stopping as soon as the offset becomes nonnegative. This patch strengthens this transformation to make it keep absorbing

Patch Ping : [Patch][V2]Enable -Wuninitialized + -ftrivial-auto-var-init for address taken variables

2022-01-04 Thread Qing Zhao via Gcc-patches
Hi, I’d like to ping the patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-December/587014.html Please take a look and let me know whether it’s okay for committing? Thanks. Qing > On Dec 16, 2021, at 9:59 AM, Qing Zhao via Gcc-patches > wrote: > > Hi, > > This is the 2nd version of th

Re: [PATCH] libgomp, openmp: pinned memory

2022-01-04 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 04, 2022 at 03:32:17PM +, Andrew Stubbs wrote: > This patch implements the OpenMP pinned memory trait for Linux hosts. On > other hosts and on devices the trait becomes a no-op (instead of being > rejected). > > The memory is locked via the mlock syscall, which is both the "correct

[PATCH] tree-optimization/103800 - sanity check more PHI vectorization

2022-01-04 Thread Richard Biener via Gcc-patches
Bool pattern detection doesn't really handle PHIs well so we have to be prepared for mismatched vector types in more cases than originally thought. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-01-04 Richard Biener PR tree-optimization/103800 * tree-vect-lo

[PATCH] libgomp, openmp: pinned memory

2022-01-04 Thread Andrew Stubbs
This patch implements the OpenMP pinned memory trait for Linux hosts. On other hosts and on devices the trait becomes a no-op (instead of being rejected). The memory is locked via the mlock syscall, which is both the "correct" way to do it on Linux, and a problem because the default ulimit for

[PING^2][PATCH,v2,1/1,AARCH64][PR102768] aarch64: Add compiler support for Shadow Call Stack

2022-01-04 Thread Dan Li via Gcc-patches
Gentile ping for this again :), thanks. Link: https://gcc.gnu.org/pipermail/gcc-patches/2021-December/586204.html Shadow Call Stack can be used to protect the return address of a function at runtime, and clang already supports this feature[1]. To enable SCS in user mode, in addition to compiler

Re: [power-ieee128] fortran, libgfortran: Assorted -mabi=ieeelongdouble I/O fixes

2022-01-04 Thread Thomas Koenig via Gcc-patches
On 04.01.22 15:23, Jakub Jelinek via Fortran wrote: Ok for power-ieee128? Also OK. Best regards Thomas

Re: [power-ieee128] libgfortran: -mabi=ieeelongdouble I/O fix

2022-01-04 Thread Thomas Koenig via Gcc-patches
On 04.01.22 14:41, Jakub Jelinek via Fortran wrote: Ok for power-ieee128? OK.

[power-ieee128] fortran, libgfortran: Assorted -mabi=ieeelongdouble I/O fixes

2022-01-04 Thread Jakub Jelinek via Gcc-patches
Hi! Another patch, this fixes: FAIL: gfortran.dg/intrinsic_spread_2.f90 -O0 execution test FAIL: gfortran.dg/intrinsic_spread_2.f90 -O1 execution test FAIL: gfortran.dg/intrinsic_spread_2.f90 -O2 execution test FAIL: gfortran.dg/intrinsic_spread_2.f90 -O3 -fomit-frame-pointer -funroll-

[committed] libgomp/testsuite: Improve omp_get_device_num() tests (was: Re: [PATCH, OpenMP, libgomp, committed] Fix GOMP_DEVICE_NUM_VAR stringification error)

2022-01-04 Thread Tobias Burnus
On 04.01.22 10:28, Chung-Lin Tang wrote: In the patch that implemented omp_get_device_num(), there was an error where the stringification of GOMP_DEVICE_NUM_VAR, ... ... which caused that omp_get_device() == 0 (always) on nvptx/gcn. That's fine if there is only a single non-host device (as of

Re: [2/2] PR96463 -- changes to type checking vec_perm_expr in middle end

2022-01-04 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Tue, 4 Jan 2022, Richard Sandiford wrote: > >> Richard Biener writes: >> > On Fri, 17 Dec 2021, Richard Sandiford wrote: >> > >> >> Prathamesh Kulkarni writes: >> >> > Hi, >> >> > The attached patch rearranges order of type-check for vec_perm_expr >> >> > and relaxes

[power-ieee128] libgfortran: -mabi=ieeelongdouble I/O fix

2022-01-04 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch fixes: FAIL: gfortran.dg/fmt_en.f90 -O0 output pattern test FAIL: gfortran.dg/fmt_en.f90 -O1 output pattern test FAIL: gfortran.dg/fmt_en.f90 -O2 output pattern test FAIL: gfortran.dg/fmt_en.f90 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finl

Patch ping

2022-01-04 Thread Jakub Jelinek via Gcc-patches
Hi! I'd like to ping the https://gcc.gnu.org/pipermail/libstdc++/2021-December/053680.html time_get patch. Thanks Jakub

Re: [2/2] PR96463 -- changes to type checking vec_perm_expr in middle end

2022-01-04 Thread Richard Biener via Gcc-patches
On Tue, 4 Jan 2022, Richard Sandiford wrote: > Richard Biener writes: > > On Fri, 17 Dec 2021, Richard Sandiford wrote: > > > >> Prathamesh Kulkarni writes: > >> > Hi, > >> > The attached patch rearranges order of type-check for vec_perm_expr > >> > and relaxes type checking for > >> > lhs = vec

[PATCH] tree-optimization/103690 - not up-to-date SSA and PRE DCE

2022-01-04 Thread Richard Biener via Gcc-patches
This avoids running simple_dce_from_worklist on partially not up-to-date SSA form (in unreachable code regions) by scheduling CFG cleanup manually as is done anyway when tail-merging runs. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-01-04 Richard Biener PR tree-o

Re: [2/2] PR96463 -- changes to type checking vec_perm_expr in middle end

2022-01-04 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Fri, 17 Dec 2021, Richard Sandiford wrote: > >> Prathamesh Kulkarni writes: >> > Hi, >> > The attached patch rearranges order of type-check for vec_perm_expr >> > and relaxes type checking for >> > lhs = vec_perm_expr >> > >> > when: >> > rhs1 == rhs2, >> > lhs is vari

Re: [PATCH] Transition nvptx backend to STORE_FLAG_VALUE = 1

2022-01-04 Thread Tom de Vries via Gcc-patches
On 10/5/21 19:48, Roger Sayle wrote: This patch to the nvptx backend changes the backend's STORE_FLAG_VALUE from -1 to 1, by using BImode predicates and selp instructions, instead of set instructions (almost always followed by integer negation). Historically, it was reasonable (through rare) fo

[power-ieee128] RFH: LTO broken

2022-01-04 Thread Jakub Jelinek via Gcc-patches
On Mon, Jan 03, 2022 at 11:43:57PM +0100, Thomas Koenig wrote: > > clearly there is still work to fix (but seems e.g. most of the lto tests > > are related to the gnu attributes stuff:( ). > > This is looking better than what I expected. Apart from LTO, I expect I've just verified that LTO is b

[PATCH] c-family: Fix up -W*conversion on bitwise &/|/^ [PR101537]

2022-01-04 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcases emit a bogus -Wconversion warning. This is because conversion_warning function doesn't handle BIT_*_EXPR (only unsafe_conversion_p that is called during the default: case, and that one doesn't handle SAVE_EXPRs added because the unsigned char & or | operands promoted t

[PATCH, OpenMP, libgomp, committed] Fix GOMP_DEVICE_NUM_VAR stringification error

2022-01-04 Thread Chung-Lin Tang
In the patch that implemented omp_get_device_num(), there was an error where the stringification of GOMP_DEVICE_NUM_VAR, which is the macro expanding to the actual symbol used, was erroneously using the STRINGX() macro in the libgomp offload image symbol search, and expansion of the variable name

[PATCH] tree-optimization/103864 - SLP reduction of reductions with conversions

2022-01-04 Thread Richard Biener via Gcc-patches
This generalizes the fix for PR103544 to also cover reductions that are not reduction chains and does not consider reductions wrapped in sign conversions for SLP reduction handling. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-01-04 Richard Biener PR tree-optimiza

Re: [PATCH] x86: Update model value for Alderlake and Rocketlake

2022-01-04 Thread Uros Bizjak via Gcc-patches
On Tue, Jan 4, 2022 at 6:20 AM Cui,Lili wrote: > > Hi Uros, > > This patch is to update model value for Alderlake and Rocketlake. > > Bootstrap is ok, and no regressions for i386/x86-64 testsuite. > > OK for master? > > gcc/ChangeLog > > * common/config/i386/cpuinfo.h (get_intel_cpu): Add