Re: [PATCH] Add scalar_storage_order support to C++

2023-06-20 Thread Andrew Pinski via Gcc-patches
On Thu, May 25, 2023 at 2:32 AM naveenh--- via Gcc-patches wrote: > > From: Naveen H S > > This patch adds support scalar_storage_order attribute to C++ front-end. > It treats the opposite order fields similar as the packed fields are > treated such that they will not bind to references. > For

Re: [V1][PATCH 1/3] Provide element_count attribute to flexible array member field (PR108896)

2023-06-20 Thread Qing Zhao via Gcc-patches
> On Jun 16, 2023, at 5:35 PM, Joseph Myers wrote: > > On Fri, 16 Jun 2023, Qing Zhao via Gcc-patches wrote: > >>> So for >>> >>> struct foo { int c; int buf[(struct { int d; }){ .d = .c }]; }; >>> >>> one knows during parsing that the .d is a designator >>> and that .c is not. >> >>

Re: [PATCH] tree-ssa-math-opts: Small uaddc/usubc pattern matching improvement [PR79173]

2023-06-20 Thread Richard Biener via Gcc-patches
> Am 20.06.2023 um 18:46 schrieb Jakub Jelinek via Gcc-patches > : > > Hi! > > In the following testcase we fail to pattern recognize the least significant > .UADDC call. The reason is that arg3 in that case is > _3 = .ADD_OVERFLOW (...); > _2 = __imag__ _3; > _1 = _2 != 0; > arg3 =

Re: [Patch, fortran] PR108961 - Segfault when associating to pointer from C_F_POINTER

2023-06-20 Thread Mikael Morin
Le 20/06/2023 à 18:30, Tobias Burnus a écrit : On 20.06.23 18:19, Paul Richard Thomas via Fortran wrote: Is there a better way to detect a type(c_ptr) formal argument? u.derived->intmod_sym_id == ISOCBINDING_PTR ? && u.derived->from_intmod == INTMOD_ISO_C_BINDING ?

Re: libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Andreas Schwab
On Jun 20 2023, Ian Lance Taylor via Gcc-patches wrote: > This libgo patches changes the runtime pacakge to use a C function to call > mmap. > > The final argument to mmap, of type off_t, varies. In > https://go.dev/cl/445375 > (https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604158.html)

Re: [PATCH v5 3/5] p1689r5: initial support

2023-06-20 Thread Ben Boeckel via Gcc-patches
On Tue, Feb 14, 2023 at 16:50:27 -0500, Jason Merrill wrote: > On 1/25/23 13:06, Ben Boeckel wrote: > > - header-unit information fields > > > > Header units (including the standard library headers) are 100% > > unsupported right now because the `-E` mechanism wants to import their > > BMIs. A

[pushed] aarch64: Robustify stack tie handling

2023-06-20 Thread Richard Sandiford via Gcc-patches
The SVE handling of stack clash protection copied the stack pointer to X11 before the probe and set up X11 as the CFA for unwind purposes: /* This is done to provide unwinding information for the stack adjustments we're about to do, however to prevent the optimizers from

Re: [PATCH] RISC-V: Implement autovec copysign.

2023-06-20 Thread 钟居哲
You should remove all "unspec" related of "n" ncopysign including riscv-vector-builtins-bases.cc vector.md/ vector-iterators.md juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-06-20 20:47 To: gcc-patches; palmer; Kito Cheng; juzhe.zh...@rivai.ai; jeffreyalaw CC: rdapp.gcc Subject: [PATCH]

Re: [PATCH, V6] Fix power10 fusion and -fstack-protector, PR target/105325

2023-06-20 Thread Segher Boessenkool
Hi! The patch looks great now, thanks you! But the commit message needs some work: First off, the subject, which is a short (50 character max!) summary of what the patch is about. Fix power10 fusion and -fstack-protector, PR target/105325 There is absolutely nothing to do with stack protector,

Re: libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Andreas Schwab
On Jun 20 2023, Ian Lance Taylor wrote: > OK, but I think that it does have something to do with big-endian. > The bug was that on some 32-bit systems it was passing a 64-bit value > to a function that expected a 32-bit value. The problem didn't show > up on 32-bit x86 because it is

Re: [PATCH][gensupport] drop suppport for define_cond_exec from compact syntac

2023-06-20 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > Hi All, > > define_cond_exec does not support the special @@ syntax > and so can't support {@. As such just remove support > for it. > > Bootstrapped and no issues. > > Ok for master? > > Thanks, > Tamar > > gcc/ChangeLog: > > PR bootstrap/110324 > *

Re: [COMMITTED] ada: Add CHERI intrinsic bindings and helper functions.

2023-06-20 Thread Alex Coplan via Gcc-patches
Hi Marc, On 20/06/2023 15:47, Marc Poulhiès wrote: > Hi, > > >> The package Interfaces.CHERI provides intrinsic bindings and > >> helper functions to allow software to query, create, and > >> manipulate CHERI capabilities. > > > > I'm curious what the motivation for these intrinsic wrappers is,

Re: [committed] amdgcn: minimal V64TImode vector support

2023-06-20 Thread Thomas Schwinge
Hi! On 2023-06-19T12:37:52+0100, Andrew Stubbs wrote: > This patch adds just enough TImode vector support to use them for moving > data about. Andrew tells me this need not be worried about, but -- for my future self searching email archives for FAILs/ICEs -- I'd like to at least document here

Re: [PATCH] tree-optimization/110243 - kill off IVOPTs split_offset

2023-06-20 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Mon, 19 Jun 2023, Richard Sandiford wrote: > >> Jeff Law writes: >> > On 6/16/23 06:34, Richard Biener via Gcc-patches wrote: >> >> IVOPTs has strip_offset which suffers from the same issues regarding >> >> integer overflow that split_constant_offset did but the

Re: [Patch, fortran] PR107900 Select type with intrinsic type inside associate causes ICE / Segmenation fault

2023-06-20 Thread Harald Anlauf via Gcc-patches
Hi Paul, On 6/20/23 12:54, Paul Richard Thomas via Gcc-patches wrote: Hi Harald, Fixing the original testcase in this PR turned out to be slightly more involved than I expected. However, it resulted in an open door to fix some other PRs and the attached much larger patch. This time, I did

[committed] calls: Change return type of predicate function from int to bool

2023-06-20 Thread Uros Bizjak via Gcc-patches
Also change some internal variables and some function arguments to bool. gcc/ChangeLog: * calls.h (setjmp_call_p): Change return type from int to bool. * calls.cc (struct arg_data): Change "pass_on_stack" to bool. (store_one_arg): Change return type from int to bool and adjust

Re: libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jun 20, 2023 at 11:35 AM Andreas Schwab wrote: > > On Jun 20 2023, Ian Lance Taylor via Gcc-patches wrote: > > > This libgo patches changes the runtime pacakge to use a C function to call > > mmap. > > > > The final argument to mmap, of type off_t, varies. In > > https://go.dev/cl/445375

[pushed] aarch64: Fix gcc.target/aarch64/sve/pcs failures

2023-06-20 Thread Richard Sandiford via Gcc-patches
Several gcc.target/aarch64/sve/pcs tests started failing after 6a2e8dcbbd4, because the tests weren't robust against whether an indirect argument register or the stack pointer was used as the base for stores. The patch allows either base register when there is only one indirect argument. It

Re: [pushed] aarch64: Robustify stack tie handling

2023-06-20 Thread Jeff Law via Gcc-patches
On 6/20/23 14:49, Richard Sandiford via Gcc-patches wrote: The SVE handling of stack clash protection copied the stack pointer to X11 before the probe and set up X11 as the CFA for unwind purposes: /* This is done to provide unwinding information for the stack adjustments we're

[PATCH] Refine maskloadmn pattern with UNSPEC_MASKLOAD.

2023-06-20 Thread liuhongt via Gcc-patches
If mem_addr points to a memory region with less than whole vector size bytes of accessible memory and k is a mask that would prevent reading the inaccessible bytes from mem_addr, add UNSPEC_MASKLOAD to prevent it to be transformed to vpblendd. Bootstrapped and regtested on

[PATCH] Update array address space in c_build_qualified_type

2023-06-20 Thread SenthilKumar.Selvaraj--- via Gcc-patches
Hi, When c-typeck.cc:c_build_qualified_type builds an array type from its element type, it does not copy the address space of the element type to the array type itself. This is unlike tree.cc:build_array_type_1, which explicitly does TYPE_ADDR_SPACE (t) = TYPE_ADDR_SPACE (elt_type);

Re: [gofrontend-dev] Re: libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Cherry Mui via Gcc-patches
On Tue, Jun 20, 2023 at 3:37 PM Ian Lance Taylor wrote: > On Tue, Jun 20, 2023 at 11:35 AM Andreas Schwab > wrote: > > > > On Jun 20 2023, Ian Lance Taylor via Gcc-patches wrote: > > > > > This libgo patches changes the runtime pacakge to use a C function to > call mmap. > > > > > > The final

Re: [PATCH] VECT: Apply LEN_MASK_{LOAD,STORE} into vectorizer

2023-06-20 Thread juzhe.zh...@rivai.ai
Bootstrap && Regression on X86 no surprise difference. juzhe.zh...@rivai.ai From: juzhe.zhong Date: 2023-06-20 00:17 To: gcc-patches CC: rguenther; richard.sandiford; Ju-Zhe Zhong Subject: [PATCH] VECT: Apply LEN_MASK_{LOAD,STORE} into vectorizer From: Ju-Zhe Zhong This patch is apply

[PATCH v2] RISC-V: Set the natural size of constant vector mask modes to one RVV data vector.

2023-06-20 Thread Li Xu
If reinterpret vnx2bi as vnx16qi, vnx16qi must occupy no more of the underlying registers than vnx2bi. Consider this following case: void test_vreinterpret_v_b64_i8m1 (uint8_t *in, int8_t *out) { vbool64_t vmask = __riscv_vlm_v_b64 (in, 2); vint8m1_t vout = __riscv_vreinterpret_v_b64_i8m1

Re: [PATCH v2] RISC-V: Set the natural size of constant vector mask modes to one RVV data vector.

2023-06-20 Thread juzhe.zh...@rivai.ai
LGTM. Thanks! juzhe.zh...@rivai.ai From: Li Xu Date: 2023-06-20 14:46 To: gcc-patches CC: kito.cheng; palmer; juzhe.zhong; Li Xu Subject: [PATCH v2] RISC-V: Set the natural size of constant vector mask modes to one RVV data vector. If reinterpret vnx2bi as vnx16qi, vnx16qi must occupy no

[PATCH] Improve DSE to handle stores before __builtin_unreachable ()

2023-06-20 Thread Richard Biener via Gcc-patches
DSE isn't good at identifying program points that end lifetime of variables that are not associated with virtual operands. But at least for those that end basic-blocks we can handle the simple case where this ending is in the same basic-block as the definition we want to elide. That should catch

[COMMITTED] ada: Fix bug in predicate checks with address clauses

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff This patch fixes a compiler bug triggered by having a type with some defaulted components, and a predicate, and an object of that type with an address clause. In this case, the compiler was crashing. gcc/ada/ * sem_ch3.adb (Analyze_Object_Declaration): Remove

[COMMITTED] ada: Fix -fdiagnostics-format=json not printing all messages

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Ghjuvan Lacambre The previous version of this code stopped printing messages as soon as it encountered a deleted or continuation message. This was wrong, continuation and deleted messages can be followed by live messages that do need to be printed. gcc/ada/ * errout.adb

Re: [PATCH] RISC-V: Fix out of range memory access of machine mode table

2023-06-20 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 20, 2023 at 07:50:00AM +, Li, Pan2 wrote: > Hi Jakub, > > Thanks for reviewing but I am not quite sure if I fully understand how to fix > this issue. Could you please help to enlighten me more about this ? > > Currently for RISC-V, the memset has touched out of range memory

Re: [PATCH] RISC-V: Optimize codegen of VLA SLP

2023-06-20 Thread Robin Dapp via Gcc-patches
> This is a nice improvement. Even though we're in the SLP realm I would > still add an assert that documents that we're indeed operating with > pow2_p (NPATTERNS) and some comment as to why we can use AND. > Sure we're doing exact_log2 et al later anyway, just to make things > clearer. Actually

[PATCH v3] x86: make VPTERNLOG* usable on less than 512-bit operands with just AVX512F

2023-06-20 Thread Jan Beulich via Gcc-patches
There's no reason to constrain this to AVX512VL, unless instructed so by -mprefer-vector-width=, as the wider operation is unusable for more narrow operands only when the possible memory source is a non-broadcast one. This way even the scalar copysign3 can benefit from the operation being a

Re: [libstdc++] Improve M_check_len

2023-06-20 Thread Jan Hubicka via Gcc-patches
> > > > size_type > > _M_check_len(size_type __n, const char* __s) const > > { > > const size_type __size = size(); > > const size_type __max_size = max_size(); > > > > if (__is_same(allocator_type, allocator<_Tp>) > > && __size > __max_size

Re: [libstdc++] Improve M_check_len

2023-06-20 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 20, 2023 at 09:50:25AM +0200, Jan Hubicka wrote: > > > > > > size_type > > > _M_check_len(size_type __n, const char* __s) const > > > { > > > const size_type __size = size(); > > > const size_type __max_size = max_size(); > > > > > > if

Re: [libstdc++] Improve M_check_len

2023-06-20 Thread Andreas Schwab via Gcc-patches
On Jun 20 2023, Jakub Jelinek via Gcc-patches wrote: > Is it safe even on 64bit targets? I mean, doesn't say PowerPC already allow > full 64-bit virtual address space? The assumption that one can't have > more than half of virtual address space allocations is true right now at > least on

Re: [PATCHv3, rs6000] Add two peephole2 patterns for mr. insn

2023-06-20 Thread Kewen.Lin via Gcc-patches
Hi Haochen, on 2023/6/13 16:49, HAO CHEN GUI wrote: > Hi, > This patch adds two peephole2 patterns which help convert certain insn > sequences to "mr." instruction. These insn sequences can't be combined in > combine pass. > > Compared to last version, it changes the new mode iterator name

Re: [PATCH] debug/110295 - mixed up early/late debug for member DIEs

2023-06-20 Thread Richard Biener via Gcc-patches
On Mon, 19 Jun 2023, Jason Merrill wrote: > On 6/19/23 06:15, Richard Biener wrote: > > When we process a scope typedef during early debug creation and > > we have already created a DIE for the type when the decl is > > TYPE_DECL_IS_STUB and this DIE is still in limbo we end up > > just

[COMMITTED] ada: Add CHERI intrinsic bindings and helper functions.

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Daniel King The package Interfaces.CHERI provides intrinsic bindings and helper functions to allow software to query, create, and manipulate CHERI capabilities. gcc/ada/ * libgnat/i-cheri.ads: Add CHERI intrinsics and helper functions. * libgnat/i-cheri.adb: Likewise

[COMMITTED] ada: Fix edge case in Ada.Calendar.Formatting.Time_Of

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques Before this patch, Ada.Calendar.Formatting.Time_Of executed extra code when passed a number of seconds equal to the number of seconds in a day. This caused the result to be off, perhaps because a statement resetting the number of seconds to zero was missing. Instead of

[COMMITTED] ada: Spurious error on package instantiation

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Javier Miranda The compiler reports spurious errors processing the instantation of a generic package when the instantation is performed in the the body of a package that has a private type T, a dispatching primitive of T has the same name as a component of T, and an extension of T is used

[COMMITTED] ada: Fix internal error on aggregate within container aggregate

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This just applies the same fix to Expand_Array_Aggregate as the one that was recently applied to Convert_To_Assignments. gcc/ada/ * exp_aggr.adb (Convert_To_Assignments): Tweak comment. (Expand_Array_Aggregate): Do not delay the expansion if the parent

[COMMITTED] ada: Fix couple of issues in documentation of overflow checking

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou There is still a mention of the defunct CHECKED mode and the Default Settings paragraph is confusing with regard to the -gnato switch. gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst (Overflows in GNAT) : Remove obsolete paragraph about -gnato.

Re: [PATCH] RISC-V: Optimize codegen of VLA SLP

2023-06-20 Thread Robin Dapp via Gcc-patches
Hi Juzhe, > Case 1: > void > f (uint8_t *restrict a, uint8_t *restrict b) > { > for (int i = 0; i < 100; ++i) > { > a[i * 8] = b[i * 8 + 37] + 1; > a[i * 8 + 1] = b[i * 8 + 37] + 2; > a[i * 8 + 2] = b[i * 8 + 37] + 3; > a[i * 8 + 3] = b[i * 8 + 37] + 4; > a[i *

[PATCH] RISC-V: Set the natural size of constant vector mask modes to one RVV data vector.

2023-06-20 Thread Li Xu
If reinterpret vnx2bi as vnx16bi, vnx16bi must occupy no more of the underlying registers than vnx2bi. Consider this following case: void test_vreinterpret_v_b64_i8m1 (uint8_t *in, int8_t *out) { vbool64_t vmask = __riscv_vlm_v_b64 (in, 2); vint8m1_t vout = __riscv_vreinterpret_v_b64_i8m1

Re: [PATCH] RISC-V: Set the natural size of constant vector mask modes to one RVV data vector.

2023-06-20 Thread juzhe.zh...@rivai.ai
Good catch ! Thanks for fixing this. Some nit coments: Could you add some comments above. like: /* RVV mask modes always consume a single register. */ if (GET_MODE_CLASS (mode) == MODE_VECTOR_BOOL) return BYTES_PER_RISCV_VECTOR; If reinterpret vnx2bi as vnx16bi, vnx16bi must occupy no

[COMMITTED] ada: Remove references to Might_Not_Return and Always_Return

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Claire Dross The Might_Not_Return and Always_Return annotations for GNATprove should now be replaced by the two more precise aspects Exceptional_Cases and Always_Terminates. They allow to specify whether a subprogram is allowed to raise exceptions or fail to complete. gcc/ada/ *

[COMMITTED] ada: Update annotations in runtime for proof

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Yannick Moy With bump of stable SPARK used for proof of the runtime, some annotations need to change. gcc/ada/ * libgnat/s-aridou.adb (Scaled_Divide): Add assertions. * libgnat/s-valuti.adb: Add Loop_Variant. * libgnat/s-valuti.ads: Add Exceptional_Cases on

[COMMITTED] ada: Fix fallout of fix to handling of private views in instances

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou Check_Actual_Type incorrectly switches the view of a private type declared in the enclosing scope of a generic unit but that has a private ancestor. gcc/ada/ * einfo.ads (Has_Private_Ancestor): Fix inaccuracy in description. * sem_ch12.adb

[COMMITTED] ada: Small fixes to handling of private views in instances

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou The main change is the removal of the special bypass for private views in Resolve_Implicit_Dereference, which in exchange requires additional work in Check_Generic_Actuals and a couple more calls to Set_Global_Type in Save_References_In_Identifier. This also removes an

[COMMITTED] ada: Pass Error_Node to calls to Error_Msg in lib-load.adb

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Ghjuvan Lacambre When not passing Error_Node, Error_Msg will treat Current_Node as the node attached to the message. When this happens in lib-load.adb due to a file that cannot be loaded, Current_Node might reference a node that doesn't actually exist. This is a problem when using -gnatdJ

[COMMITTED] ada: Fix type derivation of subtype of derived type

2023-06-20 Thread Marc Poulhiès via Gcc-patches
Deriving from a subtype of a derived type of a private type, whose full view is itself a derived type of a discriminated record with a known discriminatant was failing with the error message: invalid constraint: type has no discriminant The compiler needs to use the full view to be able to

Re: Re: [PATCH] RISC-V: Optimize codegen of VLA SLP

2023-06-20 Thread juzhe.zh...@rivai.ai
Hi, Robin. >> Actually no assert necessary, just a comment like: >> /* As NPATTERNS is always a power of two, we can ..." */ Ok. >> My immediate idea would have been to fall back to the first >> approach, i.e. create the "0x00030002..." constant >>and then >> vid.v v4 vand.vi v4, v4, -4

Re: [committed] libstdc++: Optimize std::to_array for trivial types [PR110167]

2023-06-20 Thread Jonathan Wakely via Gcc-patches
On Tue, 20 Jun 2023 at 01:54, Patrick Palka wrote: > On Fri, 9 Jun 2023, Jonathan Wakely via Libstdc++ wrote: > > > Tested powerpc64le-linux. Pushed to trunk. > > > > This makes sense to backport after some soak time on trunk. > > > > -- >8 -- > > > > As reported in PR libstdc++/110167,

[COMMITTED] ada: Introduce -gnateH switch to force reverse Bit_Order threshold to 64

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This can be helpful for legacy code that still makes use of an original reverse Bit_Order clause, i.e. without a Scalar_Storage_Order clause. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Compiler Switches): Document -gnateH. *

RE: [PATCH] RISC-V: Fix out of range memory access of machine mode table

2023-06-20 Thread Li, Pan2 via Gcc-patches
Hi Jakub, Thanks for reviewing but I am not quite sure if I fully understand how to fix this issue. Could you please help to enlighten me more about this ? Currently for RISC-V, the memset has touched out of range memory already due to MAX_MACHINE_MODE > 256. And we may have below parts

[COMMITTED] ada: Fix for quantified expressions in Exceptional_Cases

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek When detecting illegal uses of formal parameters of the current subprogram in contract of its Exceptional_Cases, we relied on the Current_Scope. However, quantified expressions introduce an implicit scope, which we need to take into account. gcc/ada/ * sem_res.adb

Re: Re: [PATCH] RISC-V: Optimize codegen of VLA SLP

2023-06-20 Thread juzhe.zh...@rivai.ai
Hi, Robin. Can you give me more details of the comments: What about: /* As NPATTERNS is always a power of two, we can optimize codegen of VLA const vector according to this feature. */ Is this comment Ok ? You know I am always struggle with adding an English comment or description.

Re: [PATCH] RISC-V: Add tuple vector mode psABI checking and simplify code

2023-06-20 Thread Robin Dapp via Gcc-patches
> Committed, thanks Jeff. The vec_set/vec_extract tests FAIL since this commit. I'm going to commit the attached as obvious. Lehua, would they not show up in your test runs? You fixed several other tests but these somehow not? Regards Robin Subject: [PATCH] RISC-V: testsuite: Add -Wno-psabi

Re: [PATCH] VECT: Apply LEN_MASK_{LOAD,STORE} into vectorizer

2023-06-20 Thread Richard Biener via Gcc-patches
On Tue, 20 Jun 2023, juzhe.zh...@rivai.ai wrote: > From: Ju-Zhe Zhong > > This patch is apply LEN_MASK_{LOAD,STORE} into vectorizer. > I refactor gimple IR build to make codes look cleaner. > > gcc/ChangeLog: > > * internal-fn.cc (expand_partial_store_optab_fn): Add >

Re: [PATCH][RFC] c-family: Implement __has_feature and __has_extension [PR60512]

2023-06-20 Thread Alex Coplan via Gcc-patches
Hi Iain, On 14/05/2023 17:05, Iain Sandoe wrote: > Hi Alex, > > thanks for working on this. > > I’ve applied this patch and evaluated on a few Darwin versions (which is the > target currently most affected, I believe): > > > On 9 May 2023, at 13:07, Alex Coplan wrote: > > > This patch

Re: [PATCH] RISC-V: Fix vmul test expectation.

2023-06-20 Thread Robin Dapp via Gcc-patches
I just noticed there is also a -ffast-math missing in vadd-run.c as well as one redundant in vrem-rv32gcv.c and added it to the patch. Going to commit the attached as obvious. Regards Robin Subject: [PATCH] RISC-V: testsuite: Fix vmul test expectation and fix -ffast-math. I forgot to check

Re: [PATCH] RISC-V: Add tuple vector mode psABI checking and simplify code

2023-06-20 Thread Robin Dapp via Gcc-patches
> Oh, I should know why. These cases of yours were added yesterday, > while I submitted the patch the day before, and then yesterday by Pan > to help me merge in after your cases. Sorry for introducing this issue, > I'll submit a new fix patch. Actually they are already in for a bit :)

Re: [COMMITTED] ada: Add CHERI intrinsic bindings and helper functions.

2023-06-20 Thread Alex Coplan via Gcc-patches
Hi, On 20/06/2023 09:47, Marc Poulhiès via Gcc-patches wrote: > From: Daniel King > > The package Interfaces.CHERI provides intrinsic bindings and > helper functions to allow software to query, create, and > manipulate CHERI capabilities. I'm curious what the motivation for these intrinsic

Re: [PATCH] RISC-V: Add tuple vector mode psABI checking and simplify code

2023-06-20 Thread Lehua Ding
Actually they are already in for a bit :) 51795b910737 (Robin Dapp 2023-06-01 14:18:57 +0200 1) /* { dg-do compile } */ I thought something is special about them that they somehow didn't run on your machine or so. The time I just said is your commit time from this link

Re: [PATCH V3] RISC-V: Optimize codegen of VLA SLP

2023-06-20 Thread Jeff Law via Gcc-patches
On 6/20/23 03:01, Robin Dapp wrote: LGTM. Likewise -- that V2/V3 is a nice improvement over the original V1 approach. jeff

Re: [PATCH] RISC-V: Fix compiler warning of riscv_arg_has_vector

2023-06-20 Thread Lehua Ding
Lehua fills out that form. List me as the approver and the process will run from there. Takes a day or two for everything to get into place. I just followed this step to submit the form, thanks to Robin, Jeff and Juzhe. Best, Lehua

Re: [PATCH 1/2] c++: implement __remove_pointer built-in trait

2023-06-20 Thread Ken Matsui via Gcc-patches
Just a quick update, the benchmark code link has been updated and can now be accessed at https://github.com/ken-matsui/gcc-benches/blob/main/remove_pointer.cc. I have also created a report file which can be found at https://github.com/ken-matsui/gcc-benches/blob/main/remove_pointer.md. On Sat,

[COMMITTED] ada: Minor tweaks

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_entity) : Pass the NULL_TREE explicitly and test imported_p in lieu of Is_Imported. : Remove public_flag local variable and make extern_flag local variable a constant. Tested on

[COMMITTED] ada: Fix crash on inlining in GNATprove

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Yannick Moy After the recent change on detection of non-inlining, calls inside the iterator part of a quantified expression were not considered as preventing inlining anymore, leading to a crash later on inside GNATprove. Now fixed. gcc/ada/ * sem_res.adb (Resolve_Call): Fix

[COMMITTED] ada: Remove outdated comment

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques The Preelaborate pragma the removed comment was referring to was indeed present in AI 167, as well as in clause 5.3 of the rationale for Ada 2012, but it never made it into the 2012 version of the reference manual. gcc/ada/ * libgnarl/s-mudido.ads: Remove

[PATCH] RISC-V: Implement autovec copysign.

2023-06-20 Thread Robin Dapp via Gcc-patches
Hi, this adds vector copysign, ncopysign and xorsign as well as the accompanying tests. In order to easily match the ncopysign patterns I changed the builtin implementation slightly. Juzhe might want to comment on that. For now I kept the attribute's name even though it doesn't emit an "n"

Re: [PATCH] RISC-V: Fix compiler warning of riscv_arg_has_vector

2023-06-20 Thread Jeff Law via Gcc-patches
On 6/20/23 04:56, Robin Dapp wrote: Could you merge it ? By the way, could Lehua get the write access? IMHO nothing stands in the way but I'll defer to Jeff to have the "official seal" :) Once he ACKs Lehua needs to go the usual way of requesting sourceware access via

Re: [PATCH] [i386] Reject too large vectors for partial vector vectorization

2023-06-20 Thread Hongtao Liu via Gcc-patches
On Mon, Jun 19, 2023 at 8:35 PM Richard Biener via Gcc-patches wrote: > > The following works around the lack of the x86 backend making the > vectorizer compare the costs of the different possible vector > sizes the backed advertises through the vector_modes hook. When > enabling masked

Re: [PATCH] tree-optimization/110243 - kill off IVOPTs split_offset

2023-06-20 Thread Richard Biener via Gcc-patches
On Mon, 19 Jun 2023, Richard Sandiford wrote: > Jeff Law writes: > > On 6/16/23 06:34, Richard Biener via Gcc-patches wrote: > >> IVOPTs has strip_offset which suffers from the same issues regarding > >> integer overflow that split_constant_offset did but the latter was > >> fixed quite some

[COMMITTED] ada: Add the ability to add error codes to error messages

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Yannick Moy Add a new character sequence [] for error codes in error messages handled by Error_Msg procedures, to use for SPARK-related errors. Display of additional information on the error or warning based on the error code is delegated to GNATprove. gcc/ada/ * err_vars.ads

[COMMITTED] ada: Do not issue warning on postcondition in some cases

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Yannick Moy Warning on suspicious postcondition is not relevant if contract Exceptional_Cases is present, or if contract Always_Terminates is present with a non-statically True value, as in those cases the postcondition can be used to indicate constraints on those pre-state for which the

[PATCH][committed]AArch64 remove test comment from *mov_aarch64

2023-06-20 Thread Tamar Christina via Gcc-patches
Hi All, I accidentally left a test comment in the final version of the patch. This removes the comment. Regtested on aarch64-none-linux-gnu and no issues. Committed under the obvious rule. Thanks, Tamar gcc/ChangeLog: * config/aarch64/aarch64.md (*mov_aarch64): Drop test comment.

[COMMITTED] ada: Fix for attribute Range in Exceptional_Cases

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Attribute Range is now handled like First and Last when occurring within the consequence of Exceptional_Cases, i.e. attribute Range is not considered to be a read of a formal parameter that would not be allowed in the contract. gcc/ada/ * sem_res.adb

[PATCH] RISC-V: Fix vmul test expectation.

2023-06-20 Thread Robin Dapp via Gcc-patches
Hi, I forgot to check for vfmul in the multiplication tests. Fix this. Regards Robin gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/binop/vmul-rv32gcv.c: Check for vfmul. * gcc.target/riscv/rvv/autovec/binop/vmul-rv64gcv.c: Dito. ---

Re: [libstdc++] Improve M_check_len

2023-06-20 Thread Jan Hubicka via Gcc-patches
> > > > > > size_type > > > _M_check_len(size_type __n, const char* __s) const > > > { > > > const size_type __size = size(); > > > const size_type __max_size = max_size(); > > > > > > if (__is_same(allocator_type, allocator<_Tp>) > > > &&

Re: [PATCH] RISC-V: Fix vmul test expectation.

2023-06-20 Thread juzhe.zh...@rivai.ai
Ok. No need to wait just commit. Thanks. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-06-20 15:58 To: gcc-patches; palmer; Kito Cheng; juzhe.zh...@rivai.ai; jeffreyalaw CC: rdapp.gcc Subject: [PATCH] RISC-V: Fix vmul test expectation. Hi, I forgot to check for vfmul in the

[COMMITTED] ada: Further fixes to handling of private views in instances

2023-06-20 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This removes more bypasses for private views in instances that are present in type predicates (Conforming_Types, Covers, Specific_Type and Wrong_Type), which in exchange requires additional work in Sem_Ch12 to restore the proper view of types during the instantiation of

[committed] Fortran: Fix parse-dump-tree for OpenMP ALLOCATE clause

2023-06-20 Thread Tobias Burnus
A rather obvious fix. The allocator(...) bit showed up with -fdump-parse-tree. Committed as Rev. r14-1988-g99e3214f582b08 Side remark: Regarding the example inside the commit log: OpenMP 5.1 permitted derived-type components. Due to global wording changes, OpenMP 5.2 disabled it for both the

Re: [PATCH] RISC-V: Add tuple vector mode psABI checking and simplify code

2023-06-20 Thread Lehua Ding
Lehua, would they not show up in your test runs? You fixed several other tests but these somehow not? Oh, I should know why. These cases of yours were added yesterday, while I submitted the patch the day before, and then yesterday by Pan to help me merge in after your cases. Sorry for

Re: [PATCH] RISC-V: Fix compiler warning of riscv_arg_has_vector

2023-06-20 Thread Robin Dapp via Gcc-patches
> Could you merge it ? Committed. Regards Robin

Re: [PATCH v7 0/6] c++, libstdc++: get std::is_object to dispatch to new built-in traits

2023-06-20 Thread Ken Matsui via Gcc-patches
Just a quick update, the benchmark code link has been updated and can now be accessed at https://github.com/ken-matsui/gcc-benches/blob/main/is_object.cc. I have also created a report file which can be found at https://github.com/ken-matsui/gcc-benches/blob/main/is_object.md. On Thu, Jun 15, 2023

Re: [PATCH] Improve DSE to handle stores before __builtin_unreachable ()

2023-06-20 Thread Jeff Law via Gcc-patches
On 6/20/23 00:59, Richard Biener via Gcc-patches wrote: DSE isn't good at identifying program points that end lifetime of variables that are not associated with virtual operands. But at least for those that end basic-blocks we can handle the simple case where this ending is in the same

Re: [PATCH v3] x86: make VPTERNLOG* usable on less than 512-bit operands with just AVX512F

2023-06-20 Thread Jan Beulich via Gcc-patches
On 20.06.2023 10:33, Hongtao Liu wrote: > On Tue, Jun 20, 2023 at 3:07 PM Jan Beulich via Gcc-patches > wrote: >> >> I guess the underlying pattern, going along the lines of what >> one_cmpl2 uses, can be applied elsewhere >> as well. > That should be guarded with !TARGET_PREFER_AVX256, let's

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-20 Thread Richard Biener via Gcc-patches
On Tue, Jun 20, 2023 at 11:02 AM Hongtao Liu wrote: > > On Tue, Jun 20, 2023 at 4:41 PM Richard Biener > wrote: > > > > On Fri, Jun 2, 2023 at 3:01 AM liuhongt via Gcc-patches > > wrote: > > > > > > We have already use intermidate type in case WIDEN, but not for NONE, > > > this patch extended

[PATCH] RISC-V: Fix compiler warning of riscv_arg_has_vector

2023-06-20 Thread Lehua Ding
Hi, This little patch fixes a compile warning issue that my previous patch introduced, sorry for introducing this issue. Best, Lehua gcc/ChangeLog: * config/riscv/riscv.cc (riscv_arg_has_vector): Add default branch. --- gcc/config/riscv/riscv.cc | 6 -- 1 file changed, 4

Re: [PATCH] RISC-V: Fix compiler warning of riscv_arg_has_vector

2023-06-20 Thread juzhe.zh...@rivai.ai
Ok. juzhe.zh...@rivai.ai From: Lehua Ding Date: 2023-06-20 17:45 To: gcc-patches CC: juzhe.zhong; rdapp.gcc; kito.cheng; palmer; jeffreyalaw; pan2.li Subject: [PATCH] RISC-V: Fix compiler warning of riscv_arg_has_vector Hi, This little patch fixes a compile warning issue that my previous

Re: Re: [PATCH] RISC-V: Fix compiler warning of riscv_arg_has_vector

2023-06-20 Thread juzhe.zh...@rivai.ai
Could you merge it ? By the way, could Lehua get the write access? Thanks. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-06-20 18:47 To: Lehua Ding; gcc-patches CC: rdapp.gcc; juzhe.zhong; kito.cheng; palmer; jeffreyalaw; pan2.li Subject: Re: [PATCH] RISC-V: Fix compiler warning of

Re: [PATCH v3] x86: make VPTERNLOG* usable on less than 512-bit operands with just AVX512F

2023-06-20 Thread Hongtao Liu via Gcc-patches
On Tue, Jun 20, 2023 at 3:07 PM Jan Beulich via Gcc-patches wrote: > > There's no reason to constrain this to AVX512VL, unless instructed so by > -mprefer-vector-width=, as the wider operation is unusable for more > narrow operands only when the possible memory source is a non-broadcast > one.

[PATCHv4, rs6000] Add two peephole2 patterns for mr. insn

2023-06-20 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch adds two peephole2 patterns which help convert certain insn sequences to "mr." instruction. These insn sequences can't be combined in combine pass. Compared to last version, the empty constraint is removed and test cases run only on powerpc Linux as AIX doesn't support

[PATCH V2] RISC-V: Optimize codegen of VLA SLP

2023-06-20 Thread Juzhe-Zhong
V2 patch adds comment for Robin: /* As NPATTERNS is always a power of two, we can AND -NPATTERNS to simplify the codegen. */ Recently, I figure out a better approach in case of codegen for VLA stepped vector. Here is the detail descriptions: Case 1: void f (uint8_t *restrict a, uint8_t

[PATCH V3] RISC-V: Optimize codegen of VLA SLP

2023-06-20 Thread Juzhe-Zhong
Add comments for Robin: We want to create a pattern where value[ix] = floor (ix / NPATTERNS). As NPATTERNS is always a power of two we can rewrite this as = ix & -NPATTERNS. ` Recently, I figure out a better approach in case of codegen for VLA stepped vector. Here is the detail descriptions:

Re: [PATCH v3] x86: make VPTERNLOG* usable on less than 512-bit operands with just AVX512F

2023-06-20 Thread Hongtao Liu via Gcc-patches
On Tue, Jun 20, 2023 at 5:03 PM Jan Beulich wrote: > > On 20.06.2023 10:33, Hongtao Liu wrote: > > On Tue, Jun 20, 2023 at 3:07 PM Jan Beulich via Gcc-patches > > wrote: > >> > >> I guess the underlying pattern, going along the lines of what > >> one_cmpl2 uses, can be applied elsewhere > >> as

[Patch] Fortran's gfc_match_char: %S to match symbol with host_assoc

2023-06-20 Thread Tobias Burnus
When just matching a symbol, one can use 'gfc_match_symbol (, host_assoc)' and has the option to match with and without host association. However, when matching something more complex via 'gfc_match' like "something ( %s ) , " the match uses host_assoc = false. While it can be combined

Re: [libstdc++] Improve M_check_len

2023-06-20 Thread Jonathan Wakely via Gcc-patches
On Tue, 20 Jun 2023 at 11:45, Jonathan Wakely wrote: > On Tue, 20 Jun 2023 at 09:21, Andreas Schwab wrote: > >> On Jun 20 2023, Jakub Jelinek via Gcc-patches wrote: >> >> > Is it safe even on 64bit targets? I mean, doesn't say PowerPC already >> allow >> > full 64-bit virtual address space?

[PATCH] Update virtual SSA form manually where easily possible in phiprop

2023-06-20 Thread Richard Biener via Gcc-patches
This keeps virtual SSA form up-to-date in phiprop when easily possible. Only when we deal with aggregate copies the work would be too heavy-handed in general. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-ssa-phiprop.cc (phiprop_insert_phi): For simple loads

Re: [Patch, fortran] PR107900 Select type with intrinsic type inside associate causes ICE / Segmenation fault

2023-06-20 Thread Paul Richard Thomas via Gcc-patches
Hi Harald, Fixing the original testcase in this PR turned out to be slightly more involved than I expected. However, it resulted in an open door to fix some other PRs and the attached much larger patch. This time, I did remember to include the testcases in the .diff :-) I believe that, between

  1   2   >