Re: [x86-64] RFC: Add nosse abi attribute

2023-07-11 Thread Michael Matz via Gcc-patches
Hello, On Mon, 10 Jul 2023, Alexander Monakov wrote: > I think the main question is why you're going with this (weak) form > instead of the (strong) form "may only clobber the low XMM regs": I want to provide both. One of them allows more arbitrary function definitions, the other allows more r

Re: [PATCH 1/3] testsuite: Add check for vectors of 128 bits being supported

2023-07-11 Thread Maciej W. Rozycki
On Fri, 7 Jul 2023, Richard Biener wrote: > > Similarly to checks for vectors of 32 bits and 64 bits being supported > > add one for vectors of 128 bits. > > OK Thanks for the review, however this is only needed for 2/3 at this point, so I'll only push it if 2/3 gets a go-ahead (and still need

Re: [PATCH 2/3] testsuite: Require 128-bit vectors for bb-slp-pr95839.c

2023-07-11 Thread Maciej W. Rozycki
On Fri, 7 Jul 2023, Richard Biener wrote: > > The bb-slp-pr95839.c test assumes quad-single float vector support, but > > some targets only support pairs of floats, causing this test to fail > > with such targets. Limit this test to targets that support at least > > 128-bit vectors then, and add

Re: [PATCH 3/3] testsuite: Require vectors of doubles for pr97428.c

2023-07-11 Thread Maciej W. Rozycki
On Fri, 7 Jul 2023, Richard Biener wrote: > > The pr97428.c test assumes support for vectors of doubles, but some > > targets only support vectors of floats, causing this test to fail with > > such targets. Limit this test to targets that support vectors of > > doubles then. > > OK. Applied, t

Re: [PATCH] aarch64: Fix warnings during libgcc build

2023-07-11 Thread Richard Earnshaw (lists) via Gcc-patches
On 11/07/2023 15:54, Richard Earnshaw (lists) via Gcc-patches wrote: On 11/07/2023 10:37, Florian Weimer via Gcc-patches wrote: libgcc/ * config/aarch64/aarch64-unwind.h (aarch64_cie_signed_with_b_key): Add missing const qualifier.  Cast from const unsigned char * to const char *. 

Re: [x86-64] RFC: Add nosse abi attribute

2023-07-11 Thread Alexander Monakov via Gcc-patches
On Tue, 11 Jul 2023, Michael Matz wrote: > > > To that end I introduce actually two related attributes (for naming > > > see below): > > > * nosseclobber: claims (and ensures) that xmm8-15 aren't clobbered > > > > This is the weak/active form; I'd suggest "preserve_high_sse". > > But it preser

Re: [PATCH] aarch64: Fix warnings during libgcc build

2023-07-11 Thread Florian Weimer via Gcc-patches
* Richard Earnshaw: > On 11/07/2023 10:37, Florian Weimer via Gcc-patches wrote: >> libgcc/ >> * config/aarch64/aarch64-unwind.h >> (aarch64_cie_signed_with_b_key): >> Add missing const qualifier. Cast from const unsigned char * >> to const char *. Use __builtin_strchr to avoid an

Re: [x86-64] RFC: Add nosse abi attribute

2023-07-11 Thread Michael Matz via Gcc-patches
Hey, On Tue, 11 Jul 2023, Alexander Monakov via Gcc-patches wrote: > > > > * nosseclobber: claims (and ensures) that xmm8-15 aren't clobbered > > > > > > This is the weak/active form; I'd suggest "preserve_high_sse". > > > > But it preserves only the low parts :-) You swapped the two in your

[PATCH 1/1] riscv: thead: Fix ICE when enable XTheadMemPair ISA extension.

2023-07-11 Thread Xianmiao Qu via Gcc-patches
The frame related load/store instructions should not been scheduled bewteen echo other, and the REG_FRAME_RELATED_EXPR expression note should should be added to those instructions to prevent this. This bug cause ICE during GCC bootstap, and it will also ICE in the simplified case mempair-4.c, compi

Re: [PATCH 1/1] riscv: thead: Fix ICE when enable XTheadMemPair ISA extension.

2023-07-11 Thread Christoph Müllner
Hi Cooper, I addressed this in April this year. It even got an "ok", but nobody pushed it: https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616972.html BR Christoph On Tue, Jul 11, 2023 at 5:39 PM Xianmiao Qu wrote: > > The frame related load/store instructions should not been > scheduled

Re: [PATCH 1/1] riscv: thead: Fix ICE when enable XTheadMemPair ISA extension.

2023-07-11 Thread Kito Cheng via Gcc-patches
Hi Christoph: Ooops, I thought Philipp will push those patches, does here any other patches got approved but not committed? I can help to push those patches tomorrow. On Tue, Jul 11, 2023 at 11:42 PM Christoph Müllner wrote: > > Hi Cooper, > > I addressed this in April this year. > It even got a

Re: [PATCH 1/1] riscv: thead: Fix ICE when enable XTheadMemPair ISA extension.

2023-07-11 Thread Christoph Müllner
Hi Kito, I take some of the blame because I have sent a series that consisted of fixes followed by new features. You have ack'ed patches 1-9 from the series. The last two patches (for XTheadMemIdx and XTheadFMemIdx) were later reviewed by Jeff and need a bit rework and more testing. If it helps,

Re: [PATCH] genopinit: Allow more than 256 modes.

2023-07-11 Thread Richard Sandiford via Gcc-patches
Robin Dapp writes: > Ok so the consensus seems to rather stay with 32 bits and only > change the shift to 10/20? Yeah. The check would then be: if (NUM_OPTABS > 0xfff || NUM_MACHINE_MODES > 0x3ff) fatal ("genopinit range assumptions invalid"); > As MACHINE_MODE_BITSIZE is already > 16 we

Re: [Patch, Fortran] Allow ref'ing PDT's len() in parameter-initializer [PR102003]

2023-07-11 Thread Andre Vehreschild via Gcc-patches
Hi Harald, attached is a new version of the patch. This now also respects inquiry-LEN. Btw, there is a potential memory leak in the simplify for inquiry functions. I have added a note into the code. I tried to use a pdt within a derived type as a component. Is that not allowed by the standard? I

[committed] cfg+gcse: Change return type of predicate functions from int to bool

2023-07-11 Thread Uros Bizjak via Gcc-patches
Also change some internal variables from int to bool. gcc/ChangeLog: * cfghooks.cc (verify_flow_info): Change "err" variable to bool. * cfghooks.h (struct cfg_hooks): Change return type of verify_flow_info from integer to bool. * cfgrtl.cc (can_delete_note_p): Change return type f

Re: [x86-64] RFC: Add nosse abi attribute

2023-07-11 Thread Alexander Monakov via Gcc-patches
On Tue, 11 Jul 2023, Michael Matz wrote: > Hey, > > On Tue, 11 Jul 2023, Alexander Monakov via Gcc-patches wrote: > > > > > > * nosseclobber: claims (and ensures) that xmm8-15 aren't clobbered > > > > > > > > This is the weak/active form; I'd suggest "preserve_high_sse". > > > > > > But it

Re: [PATCH ver3] rs6000, Add return value to __builtin_set_fpscr_rn

2023-07-11 Thread Carl Love via Gcc-patches
On Tue, 2023-07-11 at 13:54 +0800, Kewen.Lin wrote: > Hi Carl, > > Excepting for Peter's review comments, some nits are inline below. > > on 2023/7/11 03:18, Carl Love wrote: > > GCC maintainers: > > > > > > > > - > > rs6000, Add return value

[PATCH ver4] rs6000, Add return value to __builtin_set_fpscr_rn

2023-07-11 Thread Carl Love via Gcc-patches
GCC maintainers: Ver 4, Removed extra space in subject line. Added comment to commit log comments about new __SET_FPSCR_RN_RETURNS_FPSCR__ define. Changed Added to Add and Renamed to Rename in ChangeLog. Updated define_expand "rs6000_set_fpscr_rn" per Peter's comments to use new temporary regis

[x86 PATCH] PR target/110598: Fix rega = 0; rega ^= rega regression.

2023-07-11 Thread Roger Sayle
This patch fixes the regression PR target/110598 caused by my recent addition of a peephole2. The intention of that optimization was to simplify zeroing a register, followed by an IOR, XOR or PLUS operation on it into a move, or as described in the comment: ;; Peephole2 rega = 0; rega op= regb in

[PATCH] Fortran: formal symbol attributes for intrinsic procedures [PR110288]

2023-07-11 Thread Harald Anlauf via Gcc-patches
Dear all, for intrinsic procedures we derive the typespec of the formal symbol attributes from the actual arguments. This can have an undesired effect for character actual arguments, as the argument passing conventions differ for deferred-length (length is passed by reference) and otherwise (leng

Re: [PATCH] Fortran: formal symbol attributes for intrinsic procedures [PR110288]

2023-07-11 Thread Steve Kargl via Gcc-patches
On Tue, Jul 11, 2023 at 09:39:31PM +0200, Harald Anlauf via Fortran wrote: > Dear all, > > for intrinsic procedures we derive the typespec of the formal symbol > attributes from the actual arguments. This can have an undesired > effect for character actual arguments, as the argument passing > con

[x86 PATCH] Fix FAIL of gcc.target/i386/pr91681-1.c

2023-07-11 Thread Roger Sayle
The recent change in TImode parameter passing on x86_64 results in the FAIL of pr91681-1.c. The issue is that with the extra flexibility, the combine pass is now spoilt for choice between using either the *add3_doubleword_concat or the *add3_doubleword_zext patterns, when one operand is a *concat

Re: [Patch, Fortran] Allow ref'ing PDT's len() in parameter-initializer [PR102003]

2023-07-11 Thread Harald Anlauf via Gcc-patches
Hi Andre, this looks much better now! This looks mostly good to me, except for a typo in the testcase: + if (p% ci% len /= 42) stop 4 There is no component "ci", only "c". The testsuite would fail. Regarding the memleak: replacing // TODO: Fix leaking expr tmp, when simplify is done

[PATCH v2] genopinit: Allow more than 256 modes.

2023-07-11 Thread Robin Dapp via Gcc-patches
Attached is v2 that does not switch to uint64_t but stays within 32 bits by shifting the optab by 20 and the mode(s) by 10 bits. Regards Robin Upcoming changes for RISC-V will have us exceed 255 modes or 8 bits. This patch increases the limit to 10 bits and adjusts the hashing function for the g

RE: [x86 PATCH] Tweak ix86_expand_int_compare to use PTEST for vector equality.

2023-07-11 Thread Roger Sayle
> From: Hongtao Liu > Sent: 28 June 2023 04:23 > > From: Roger Sayle > > Sent: 27 June 2023 20:28 > > > > I've also come up with an alternate/complementary/supplementary > > fix of generating the PTEST during RTL expansion, rather than rely on > > this being caught/optimized later during STV. >

Re: [Patch, Fortran] Allow ref'ing PDT's len() in parameter-initializer [PR102003]

2023-07-11 Thread Harald Anlauf via Gcc-patches
Hi Andre, I forgot to answer your other question: Am 11.07.23 um 18:23 schrieb Andre Vehreschild via Gcc-patches: I tried to use a pdt within a derived type as a component. Is that not allowed by the standard? I know, I could hunt in the standard for it, but when someone knows out of his head,

[PATCH 0/9] Add btf_decl_tag C attribute

2023-07-11 Thread David Faust via Gcc-patches
Hello, This series adds support for a new attribute, "btf_decl_tag" in GCC. The same attribute is already supported in clang, and is used by various components of the BPF ecosystem. The purpose of the attribute is to allow to associate (to "tag") declarations with arbitrary string annotations, wh

[PATCH 2/9] include: add BTF decl tag defines

2023-07-11 Thread David Faust via Gcc-patches
Add definitions for btf_decl_tag and the DW_TAG_GNU_annotation DWARF extension. include/ * btf.h (struct btf_type): Update comment. (BTF_KIND_DECL_TAG): New define. (struct btf_decl_tag): New. * dwarf2.def (DW_TAG_GNU_annotation): New DW_TAG extension. --- include

[PATCH 5/9] ctf: add support to pass through BTF tags

2023-07-11 Thread David Faust via Gcc-patches
BTF generation currently relies on the internal CTF representation to convert debug info from DWARF dies. This patch adds a new internal header, "ctf-int.h", which defines CTF kinds to be used internally to represent BTF tags which must pass through the CTF container. It also adds a new type for re

<    1   2