Re: [PATCH] c: Add diagnostic when operator= is used as truth cond [PR25689]

2022-02-11 Thread Zhao Wei Liew via Gcc-patches
On Fri, 11 Feb 2022 at 20:47, Jason Merrill wrote: > > > > On the other hand, for empty classes, it seems that a COMPOUND_EXPR > > is built in build_over_call under the is_really_empty_class guard (line > > 9791). > > I don't understand the tree structure that I should identify though. > > Could

Re: [PATCH] x86: Update PR 35513 tests

2022-02-11 Thread Hongtao Liu via Gcc-patches
On Thu, Feb 10, 2022 at 9:58 PM H.J. Lu via Gcc-patches wrote: > > 1. Require linker with GNU_PROPERTY_1_NEEDED support for PR 35513 > run-time tests. > 2. Compile pr35513-8.c to scan assembly code. > > PR testsuite/104481 > * g++.target/i386/pr35513-1.C: Require property_1_needed

Re: [PATCH] [PATCH,v4,1/1,AARCH64][PR102768] aarch64: Add compiler support for Shadow Call Stack

2022-02-11 Thread Dan Li via Gcc-patches
On 2/11/22 07:35, Richard Sandiford wrote: Dan Li writes: On 2/11/22 01:53, Richard Sandiford wrote: Dan Li writes: On 2/10/22 01:55, Richard Sandiford wrote: And I think maybe we could handle this through three patches: 1.Keep current patch (a V5) unchanged for scs. 2.Add shrink-warpp

Re: [PATCH v2] MIPS: IPL is 8bit in Cause register if TARGET_MCU

2022-02-11 Thread Jeff Law via Gcc-patches
On 2/8/2022 8:18 PM, YunQiang Su wrote: If MIPS MCU extension is enable, the IPL section in Cause register has been expand to 8bit instead of 6bit. gcc/ChangeLog: * config/mips/mips.cc (mips_expand_prologue): IPL is 8bit for MCU ASE. OK jeff

[PATCH v7 12/12] LoongArch Port: Add doc.

2022-02-11 Thread xuchenghua
From: chenglulu 2022-02-12 Chenghua Xu Lulu Cheng * contrib/config-list.mk: Add LoongArch triplet. * gcc/doc/install.texi: Add LoongArch options section. * gcc/doc/invoke.texi: Add LoongArch options section. * gcc/doc/md.texi: Add LoongArch option

[PATCH v7 09/12] LoongArch Port: Regenerate libgcc/configure.

2022-02-11 Thread xuchenghua
From: chenglulu 2022-02-12 Chenghua Xu Lulu Cheng * libgcc/configure: Regenerate. --- libgcc/configure | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgcc/configure b/libgcc/configure index 4919a56f518..ce04c4f529f 100755 --- a/libgcc/configure ++

[PATCH v7 11/12] LoongArch Port: gcc/testsuite

2022-02-11 Thread xuchenghua
From: chenglulu 2022-02-12 Chenghua Xu Lulu Cheng gcc/testsuite/ * g++.dg/cpp0x/constexpr-rom.C: Add build options for LoongArch. * g++.old-deja/g++.abi/ptrmem.C: Add LoongArch support. * g++.old-deja/g++.pt/ptrmem6.C: xfail for LoongArch. * gcc.

[PATCH v7 08/12] LoongArch Port: libgcc

2022-02-11 Thread xuchenghua
From: chenglulu 2022-02-12 Chenghua Xu Lulu Cheng libgcc/ * config/loongarch/crtfastmath.c: New file. * config/loongarch/crti.S: Like wise. * config/loongarch/crtn.S: Like wise. * config/loongarch/linux-unwind.h: Like wise. * config/loong

[PATCH v7 10/12] LoongArch Port: libgomp

2022-02-11 Thread xuchenghua
From: chenglulu 2022-02-12 Chenghua Xu Lulu Cheng libgomp/ * configure.tgt: Add LoongArch triplet. --- libgomp/configure.tgt | 4 1 file changed, 4 insertions(+) diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt index d4f1e741b5a..2cd7272fcd8 100644 ---

[PATCH v7 02/12] LoongArch Port: gcc build

2022-02-11 Thread xuchenghua
From: chenglulu 2022-02-12 Chenghua Xu Lulu Cheng gcc/ * common/config/loongarch/loongarch-common.cc: New file. * config/loongarch/genopts/genstr.sh: New file. * config/loongarch/genopts/loongarch-strings: New file. * config/loongarch/genopts/loo

[PATCH v7 06/12] LoongArch Port: Builtin functions.

2022-02-11 Thread xuchenghua
From: chenglulu 2022-02-12 Chenghua Xu Lulu Cheng gcc/ * config/loongarch/larchintrin.h: New file. * config/loongarch/loongarch-builtins.cc: New file. --- gcc/config/loongarch/larchintrin.h | 413 + gcc/config/loongarch/loongarch-builtin

[PATCH v7 07/12] LoongArch Port: Builtin macros.

2022-02-11 Thread xuchenghua
From: chenglulu 2022-02-12 Chenghua Xu Lulu Cheng gcc/ *config/loongarch/loongarch-c.cc --- gcc/config/loongarch/loongarch-c.cc | 109 1 file changed, 109 insertions(+) create mode 100644 gcc/config/loongarch/loongarch-c.cc diff --git a/g

[PATCH v7 03/12] LoongArch Port: Regenerate gcc/configure.

2022-02-11 Thread xuchenghua
From: chenglulu 2022-02-12 Chenghua Xu Lulu Cheng gcc/ * configure: Regenerate. --- gcc/configure | 66 ++- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/gcc/configure b/gcc/configure index 258b17a226e..fc

[PATCH v7 01/12] LoongArch Port: Regenerate configure

2022-02-11 Thread xuchenghua
From: chenglulu 2022-02-12 Chenghua Xu Lulu Cheng * config/picflag.m4: Default add build option '-fpic' for LoongArch. * configure: Add LoongArch tuples. * configure.ac: Like wise. --- config/picflag.m4 | 3 +++ configure | 10 +- config

[PATCH v7 00/12] Add LoongArch support.

2022-02-11 Thread xuchenghua
From: Chenghua Xu Hi, all: This is the v7 version of LoongArch Port. Please review. We know it is stage4, I think it is ok for a new prot. The kernel side upstream waiting for a approval by gcc side, if it is blocked by stage4, a approval for GCC13 will be appreciation. The LoongArch architec

Merge from trunk to gccgo branch

2022-02-11 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 8dc2499aa62f768c6395c9754b8cabc1ce25c494 to the gccgo branch. Ian

[pushed] LRA, rs6000, Darwin: Amend lo_sum use for forced constants [PR104117].

2022-02-11 Thread Iain Sandoe via Gcc-patches
Two issues resulted in this PR, which manifests when we force a constant into memory in LRA (in PIC code on Darwin). The presence of such forced constants is quite dependent on other RTL optimisations, and it is easy for the issue to become latent for a specific case. First, in the Darwin-specifi

[committed] preprocessor: Extract messages from cpp_*_at calls for translation

2022-02-11 Thread Joseph Myers
The logic in libcpp/Makefile.in listing diagnostic functions in a call to xgettext was missing cpp_warning_at, cpp_pedwarning_at and cpp_error_at, so resulting in some messages not being extracted for translation; add those functions to those for which messages are extracted. Tested with "make cpp

[committed] i18n: fix exgettext handling of C++ sources

2022-02-11 Thread Joseph Myers
The move of source files to .cc names broke most message extraction by exgettext because it processed .c files with --language=GCC-source but didn't process .cc files that way. Fix to process files identified as C++ that way as well. Tested with "make gcc.pot". Applied to mainline. * ex

libgo patch committed: Update to Go1.18beta2 release

2022-02-11 Thread Ian Lance Taylor via Gcc-patches
I've committed a change to update libgo to the Go1.18beta2 release. Bootstrapped and tested on x86_64-pc-linux-gnu. As usual with these release updates, the change is too large for this e-mail. Please see the git history or https://go.dev/cl/384695 for the exact changes. Ian gotools/: * Makefi

Re: [PATCH] Fix PR 101515 (ICE in pp_cxx_unqualified_id, at cp/cxx-pretty-print.c:128)

2022-02-11 Thread Qing Zhao via Gcc-patches
> On Feb 11, 2022, at 3:54 PM, Jason Merrill wrote: > > On 2/11/22 15:29, Qing Zhao wrote: >>> On Feb 11, 2022, at 1:39 PM, Jason Merrill wrote: >>> >>> On 2/11/22 13:11, Qing Zhao wrote: Hi, Jason, > On Feb 11, 2022, at 11:27 AM, Jason Merrill wrote: Sure, we mig

[committed] libstdc++: Fix FAIL: 20_util/temporary_buffer.cc for C++14

2022-02-11 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- The std::get_temporary_buffer function is deprecated since C++17, but the test was expecting a warning for C++14 as well. libstdc++-v3/ChangeLog: * testsuite/20_util/temporary_buffer.cc: Fix dg-warning target selector. --- libstdc+

[committed] libstdc++: Fix test failures at -O0

2022-02-11 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Ignore -Walloc-larger-than warning. * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Likewise. * testsuite/29_ato

Re: [PATCH] Fix PR 101515 (ICE in pp_cxx_unqualified_id, at cp/cxx-pretty-print.c:128)

2022-02-11 Thread Jason Merrill via Gcc-patches
On 2/11/22 15:29, Qing Zhao wrote: On Feb 11, 2022, at 1:39 PM, Jason Merrill wrote: On 2/11/22 13:11, Qing Zhao wrote: Hi, Jason, On Feb 11, 2022, at 11:27 AM, Jason Merrill wrote: Sure, we might as well make this code more robust. But we can do better than if we check TYPE_PTRMEMFU

Re: [PATCH], PR 104253, Fix __ibm128 conversions on IEEE 128-bit system

2022-02-11 Thread Segher Boessenkool
Hi! On Fri, Jan 28, 2022 at 10:47:06PM -0500, Michael Meissner wrote: > Use correct names for __ibm128 if long double is IEEE 128-bit. > > If you are on a PowerPC system where the default long double is IEEE > 128-bit, GCC will use the wrong names for some of the conversion functions > for the __

Re: [PATCH] Fix PR 101515 (ICE in pp_cxx_unqualified_id, at cp/cxx-pretty-print.c:128)

2022-02-11 Thread Qing Zhao via Gcc-patches
> On Feb 11, 2022, at 1:39 PM, Jason Merrill wrote: > > On 2/11/22 13:11, Qing Zhao wrote: >> Hi, Jason, >>> On Feb 11, 2022, at 11:27 AM, Jason Merrill wrote: >> >> Sure, we might as well make this code more robust. But we can do better >> than if we check TYPE_PTRMEMFUNC_P. >

Re: [PATCH] libstdc++: Make atomic notify_one and notify_all non-const

2022-02-11 Thread Jonathan Wakely via Gcc-patches
On Fri, 11 Feb 2022 at 17:40, Thomas Rodgers via Libstdc++ wrote: > > > PR102994 "atomics: std::atomic::wait is not marked const" raises the > issue that the current libstdc++ implementation marks the notify members > const, the implementation strategy used by libstdc++, as well as libc++ > and t

Re: [PATCH] libstdc++: Back out some changes in P2325R3 backport [PR103904]

2022-02-11 Thread Jonathan Wakely via Gcc-patches
On Fri, 11 Feb 2022, 17:11 Patrick Palka via Libstdc++, < libstd...@gcc.gnu.org> wrote: > On Fri, 11 Feb 2022, Patrick Palka wrote: > > > In the P2325R3 backport r11-9555 the relaxation of the constraints on > > the partial specialization of __box (which is semantically equivalent to > > the prima

Re: [PATCH] Fix PR 101515 (ICE in pp_cxx_unqualified_id, at cp/cxx-pretty-print.c:128)

2022-02-11 Thread Jason Merrill via Gcc-patches
On 2/11/22 13:11, Qing Zhao wrote: Hi, Jason, On Feb 11, 2022, at 11:27 AM, Jason Merrill wrote: Sure, we might as well make this code more robust. But we can do better than if we check TYPE_PTRMEMFUNC_P. Okay, so what should we print to the user if it's “TYPE_PTRMEMFUNC_P”? Print nothi

[PATCH] libgomp: added OMPD support to libgomp and created libgompd

2022-02-11 Thread Mohamed Atef via Gcc-patches
This patch added OMPD support for libgomp and added some OMPD functions. One of the guys is working on the gdb-plugin and two of them are trying to get familiar with DejaGnu and some of us are working on the Graduation Book which will contain everything about the project. (we will provide it if you

Re: [PATCH] match.pd: Fix up (X & Y) CMP 0 -> X CMP2 ~Y simplifications [PR104499]

2022-02-11 Thread Richard Biener via Gcc-patches
> Am 11.02.2022 um 20:00 schrieb Jakub Jelinek via Gcc-patches > : > > Hi! > > The following testcase ICEs on x86_64-linux, because match.pd emits > there a NOP_EXPR cast from int*8 vector type with BLKmode to > unsigned*8 vector type with BLKmode and vec-lowering isn't prepared > to handle

[PATCH] match.pd: Fix up (X & Y) CMP 0 -> X CMP2 ~Y simplifications [PR104499]

2022-02-11 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs on x86_64-linux, because match.pd emits there a NOP_EXPR cast from int*8 vector type with BLKmode to unsigned*8 vector type with BLKmode and vec-lowering isn't prepared to handle such casts. Fixed by using VIEW_CONVERT_EXPR instead. Bootstrapped/regtested on power

[PATCH] c++: Reject __builtin_clear_padding on non-trivially-copyable types with one exception [PR102586]

2022-02-11 Thread Jakub Jelinek via Gcc-patches
Hi! As mentioned by Jason in the PR, non-trivially-copyable types (or non-POD for purposes of layout?) types can be base classes of derived classes in which the padding in those non-trivially-copyable types can be redused for some real data members or even the layout can change and data members ca

Re: [PATCH] Fix PR 101515 (ICE in pp_cxx_unqualified_id, at cp/cxx-pretty-print.c:128)

2022-02-11 Thread Qing Zhao via Gcc-patches
Hi, Jason, > On Feb 11, 2022, at 11:27 AM, Jason Merrill wrote: Sure, we might as well make this code more robust. But we can do better than if we check TYPE_PTRMEMFUNC_P. >>> Okay, so what should we print to the user if it's “TYPE_PTRMEMFUNC_P”? >>> Print nothing or some spec

Ping: [PATCH] PR target/102059 Fix inline of target specific functions

2022-02-11 Thread Michael Meissner via Gcc-patches
Ping patch for PR target/102059 to ignore implicit -mpower8-fusion that prevents a function targeting power9 or power10 from inlining a function that declared it needed power8 via attribute/pragma target. While we likely should revist this in GCC 13, this patch is fairly minimal in that it fixes t

Ping: [PATCH], PR 104253, Fix __ibm128 conversions on IEEE 128-bit system

2022-02-11 Thread Michael Meissner via Gcc-patches
Ping patch to fix PR target/104253. This patch fixes using the wrong names for conversions between __ibm128 and integer types if the long double default is IEEE 128-bit. | Date: Fri, 28 Jan 2022 22:47:06 -0500 | From: Michael Meissner | Subject: [PATCH], PR 104253, Fix __ibm128 conversions on IE

[PATCH] libstdc++: Make atomic notify_one and notify_all non-const

2022-02-11 Thread Thomas Rodgers via Gcc-patches
PR102994 "atomics: std::atomic::wait is not marked const" raises the issue that the current libstdc++ implementation marks the notify members const, the implementation strategy used by libstdc++, as well as libc++ and the Microsoft STL, do not require the atomic to be mutable (it is hard to concei

Re: [PATCH] middle-end/104497 - gimplification of vector indexing

2022-02-11 Thread Jason Merrill via Gcc-patches
On 2/11/22 06:26, Richard Biener wrote: The following attempts to address gimplification of ... = VIEW_CONVERT_EXPR((i & 1) != 0 ? inv : src)[i]; which is problematic since gimplifying the base object ? inv : src produces a register temporary but GIMPLE does not really support a register as

Re: [PATCH] Fix PR 101515 (ICE in pp_cxx_unqualified_id, at cp/cxx-pretty-print.c:128)

2022-02-11 Thread Jason Merrill via Gcc-patches
On 2/11/22 11:07, Qing Zhao wrote: Hi, Jason, On Feb 9, 2022, at 3:01 PM, Qing Zhao via Gcc-patches mailto:gcc-patches@gcc.gnu.org>> wrote: On Feb 9, 2022, at 12:23 PM, Jason Merrill > wrote: On 2/9/22 10:51, Qing Zhao wrote: On Feb 8, 2022, at 4:20 PM, Jason Merr

Re: [PATCH] libstdc++: Back out some changes in P2325R3 backport [PR103904]

2022-02-11 Thread Patrick Palka via Gcc-patches
On Fri, 11 Feb 2022, Patrick Palka wrote: > In the P2325R3 backport r11-9555 the relaxation of the constraints on > the partial specialization of __box (which is semantically equivalent to > the primary template, only more space efficient) means some > specializations of __box will now use the par

[PATCH] libstdc++: Back out some changes in P2325R3 backport [PR103904]

2022-02-11 Thread Patrick Palka via Gcc-patches
In the P2325R3 backport r11-9555 the relaxation of the constraints on the partial specialization of __box (which is semantically equivalent to the primary template, only more space efficient) means some specializations of __box will now use the partial specialization instead of the primary template

Re: [PATCH] Fix PR 101515 (ICE in pp_cxx_unqualified_id, at cp/cxx-pretty-print.c:128)

2022-02-11 Thread Qing Zhao via Gcc-patches
Hi, Jason, On Feb 9, 2022, at 3:01 PM, Qing Zhao via Gcc-patches mailto:gcc-patches@gcc.gnu.org>> wrote: On Feb 9, 2022, at 12:23 PM, Jason Merrill mailto:ja...@redhat.com>> wrote: On 2/9/22 10:51, Qing Zhao wrote: On Feb 8, 2022, at 4:20 PM, Jason Merrill mailto:ja...@redhat.com>> wrote:

[committed] [PR104400] LRA: Modify exclude start hard register calculation for insn alternative

2022-02-11 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104400 The patch was successfully tested and bootstrapped on x86-64 and aarch64. commit 274a4d29421e73c9b40c1641986c6ed904e20184 Author: Vladimir N. Makarov Date: Fri Feb 11 09:52:14 2022 -0500 [PR104400] LRA: Modify

Re: [PATCH] [PATCH, v4, 1/1, AARCH64][PR102768] aarch64: Add compiler support for Shadow Call Stack

2022-02-11 Thread Richard Sandiford via Gcc-patches
Dan Li writes: > On 2/11/22 01:53, Richard Sandiford wrote: >> Dan Li writes: >>> On 2/10/22 01:55, Richard Sandiford wrote: > But treating scs push and scs pop as part of the register save and restore sequences would have one advantage: it would allow the scs push and scs pop

Re: [PATCH, 11 backport] rs6000: Fix LE code gen for vec_cnt[lt]z_lsbb [PR95082]

2022-02-11 Thread Bill Schmidt via Gcc-patches
Fine.  I withdraw the patch request, and will remove my name from the bugzilla. Somebody else can deal with it. I have more important things to worry about. Bill On 2/11/22 1:31 AM, Segher Boessenkool wrote: > Hi! > > On Thu, Feb 10, 2022 at 04:28:02PM -0600, Bill Schmidt wrote: >> On 2/10/22 4

[committed] analyzer: ignore uninitialized uses of empty types [PR104274]

2022-02-11 Thread David Malcolm via Gcc-patches
PR analyzer/104274 reports a false positive from -Wanalyzer-use-of-uninitialized-value on hppa when passing an empty struct as a function parameter. pa_pass_by_reference returns true for empty structs, so the call is turned into: struct empty arg.0; arg.0 = arg called_function (arg.0); by

Re: [PATCH] [PATCH,v4,1/1,AARCH64][PR102768] aarch64: Add compiler support for Shadow Call Stack

2022-02-11 Thread Dan Li via Gcc-patches
On 2/11/22 01:53, Richard Sandiford wrote: Dan Li writes: On 2/10/22 01:55, Richard Sandiford wrote: But treating scs push and scs pop as part of the register save and restore sequences would have one advantage: it would allow the scs push and scs pop to be shrink-wrapped. Sorry for my

Re: [PATCH 3/3, 11 backport] libstdc++: invalid default init in _CachedPosition [PR101231]

2022-02-11 Thread Jonathan Wakely via Gcc-patches
On Thu, 10 Feb 2022 at 16:58, Patrick Palka via Libstdc++ wrote: > > The primary template for _CachedPosition is a dummy implementation for > non-forward ranges, the iterators for which generally can't be cached. > Because this implementation doesn't actually cache anything, _M_has_value > is defi

Re: [PATCH 2/3, 11 backport] libstdc++: Sync __cpp_lib_ranges macro defined in ranges_cmp.h

2022-02-11 Thread Jonathan Wakely via Gcc-patches
On Thu, 10 Feb 2022 at 17:01, Patrick Palka via Libstdc++ wrote: > > r12-1606 bumped the value of __cpp_lib_ranges defined in , > but this macro is also defined in , so it needs to > be updated there as well. > > PR libstdc++/103904 > > libstdc++-v3/ChangeLog: > > * include/bits/ra

Re: [PATCH 1/3, 11 backport] libstdc++: Implement P2325 changes to default-constructibility of views

2022-02-11 Thread Jonathan Wakely via Gcc-patches
On Thu, 10 Feb 2022 at 17:29, Patrick Palka via Libstdc++ wrote: > > On Thu, 10 Feb 2022, Patrick Palka wrote: > > > Tested on x86_64-pc-linux-gnu, does this look OK for the 11 branch? > > The backport to the 10 branch hasn't been started yet, I figured it'd > > be good to first get the 11 backpor

Re: [PATCH] c++: Fix up constant expression __builtin_convertvector folding [PR104472]

2022-02-11 Thread Jason Merrill via Gcc-patches
On 2/11/22 05:13, Jakub Jelinek wrote: Hi! The following testcase ICEs, because due to the -frounding-math fold_const_call fails, which is it returns NULL, and returning NULL from cxx_eval* is wrong, all the callers rely on them to either return folded value or original with *non_constant_p = tr

Re: [PATCH] c: Add diagnostic when operator= is used as truth cond [PR25689]

2022-02-11 Thread Jason Merrill via Gcc-patches
On 2/10/22 23:01, Zhao Wei Liew wrote: On Fri, 11 Feb 2022 at 00:14, Jason Merrill wrote: On 2/9/22 21:18, Zhao Wei Liew via Gcc-patches wrote: Hi! I wrote a patch for PR 25689, but I feel like it may not be the ideal fix. Furthermore, there are some standing issues with the patch for which

Re: [PATCH] [gimplefe] Add vector_mask attribute to get access to vector bools

2022-02-11 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > The following adds __attribute__((vector_mask)) to get access to > the corresponding mask type for a vector type. The implementation > simply uses truth_type_for so creating a mask type that's not > what the target would choose as canonical, say a AVX2 style one > when AV

[PATCH] [gimplefe] Add vector_mask attribute to get access to vector bools

2022-02-11 Thread Richard Biener via Gcc-patches
The following adds __attribute__((vector_mask)) to get access to the corresponding mask type for a vector type. The implementation simply uses truth_type_for so creating a mask type that's not what the target would choose as canonical, say a AVX2 style one when AVX512VL is enabled, is not possible

Re: [PATCH] [vect] Add vect_recog_cond_expr_convert_pattern.

2022-02-11 Thread Richard Biener via Gcc-patches
On Thu, Feb 10, 2022 at 7:59 AM liuhongt wrote: > > >But in principle @2 or @3 could safely differ in sign, you'd then need to > >ensure > >to insert sign conversions to @2/@3 to the signedness of @4/@5. > Changed. > >you are not testing for this anywhere? > It's tested in vect_recog_cond_expr_co

Re: [PATCH] middle-end: Small __builtin_clear_padding improvements

2022-02-11 Thread Richard Biener via Gcc-patches
On Fri, 11 Feb 2022, Jakub Jelinek wrote: > Hi! > > When looking at __builtin_clear_padding today, I've noticed that > it is quite wasteful to extend the original user one argument to 3, > 2 is enough. We need to encode the original type of the first argument > because pointer conversions are us

[PATCH] middle-end: Small __builtin_clear_padding improvements

2022-02-11 Thread Jakub Jelinek via Gcc-patches
Hi! When looking at __builtin_clear_padding today, I've noticed that it is quite wasteful to extend the original user one argument to 3, 2 is enough. We need to encode the original type of the first argument because pointer conversions are useless in GIMPLE, and we need to record a boolean whethe

[PATCH] middle-end/104497 - gimplification of vector indexing

2022-02-11 Thread Richard Biener via Gcc-patches
The following attempts to address gimplification of ... = VIEW_CONVERT_EXPR((i & 1) != 0 ? inv : src)[i]; which is problematic since gimplifying the base object ? inv : src produces a register temporary but GIMPLE does not really support a register as a base for an ARRAY_REF (even though that'

[PATCH] nvptx: Back-end portion of a fix for PR target/104489.

2022-02-11 Thread Roger Sayle
This one line fix/tweak is the back-end specific change for a fix for PR target/104489, that allows the ISA for GCC's nvptx backend to be bumped to sm_53. The machine-independent middle-end pieces were posted here: https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590139.html This

[PATCH] middle-end/104496 - fix vectorized_internal_fn_supported_p

2022-02-11 Thread Richard Biener via Gcc-patches
This fixes vectorized_internal_fn_supported_p behavior when facing vector types with an integer mode. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-02-11 Richard Biener PR middle-end/104496 * internal-fn.cc (vectorized_internal_fn_supported_p): Bail

[PATCH] c++: Fix up constant expression __builtin_convertvector folding [PR104472]

2022-02-11 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs, because due to the -frounding-math fold_const_call fails, which is it returns NULL, and returning NULL from cxx_eval* is wrong, all the callers rely on them to either return folded value or original with *non_constant_p = true. The following patch does that, and a

Re: [PATCH] [PATCH, v4, 1/1, AARCH64][PR102768] aarch64: Add compiler support for Shadow Call Stack

2022-02-11 Thread Richard Sandiford via Gcc-patches
Dan Li writes: > On 2/10/22 01:55, Richard Sandiford wrote: >>> >>> There might be a little difference: >>> >>> - Using push candidates means that a register to be ignored in pop >>> candidates will not be emitted again during the "restore" (pop_candidates >>> should always be a subset of push_can

Re: [PATCH] [PATCH,v4,1/1,AARCH64][PR102768] aarch64: Add compiler support for Shadow Call Stack

2022-02-11 Thread Dan Li via Gcc-patches
On 2/10/22 01:55, Richard Sandiford wrote: There might be a little difference: - Using push candidates means that a register to be ignored in pop candidates will not be emitted again during the "restore" (pop_candidates should always be a subset of push_candidates, since popping a register w

Re: [PATCH] df: Don't set bbs dirty because of debug insn moves [PR104459]

2022-02-11 Thread Richard Biener via Gcc-patches
On Thu, 10 Feb 2022, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, we get -fcompare-debug failure, which is caused by > cfg_layout_merge_blocks successfully merging two bbs where both bbs > contained just CODE_LABEL, NOTE_INSN_BASIC_BLOCK and in the -g case both > some debug insns at the