[PATCH] RISC-V: Enable basic VLS auto-vectorization

2023-07-29 Thread Juzhe-Zhong
Consider this following case: void foo (int8_t *in, int8_t *out, int8_t x) { for (int i = 0; i < 16; i++) in[i] = x; } Compile option: --param=riscv-autovec-preference=scalable -fno-builtin Before this patch: foo: li a5,16 csrra4,vlenb vsetvli a3,zero,e8,m1

[PATCHv2] tree-optimization: [PR100864] `(a&!b) | b` is not opimized to `a | b` for comparisons

2023-07-29 Thread Andrew Pinski via Gcc-patches
This is a new version of the patch. Instead of doing the matching of inversion comparison directly inside match, creating a new function (bitwise_not_equal_p) to do it. It is very similar to bitwise_equal_p that was added in r14-2751-g2a3556376c69a1fb but instead it says `expr1 == ~expr2`. A follo

[Committed] Use QImode for offsets in zero_extract/sign_extract in i386.md (take #2)

2023-07-29 Thread Roger Sayle
This patch reattempts to change the ZERO_EXTRACTs and SIGN_EXTRACTs in i386.md to consistently use QImode for bit offsets (i.e. third and fourth operands), matching the use of QImode for bit counts in shifts and rotates. This iteration corrects the "ne:QI" vs "eq:QI" mistake in the previous versi

Re: [PATCH v3 0/4] diagnostics: libcpp: Overhaul locations for _Pragma tokens

2023-07-29 Thread David Malcolm via Gcc-patches
On Sat, 2023-07-29 at 10:27 -0400, Lewis Hyatt wrote: > On Fri, Jul 28, 2023 at 6:22 PM David Malcolm > wrote: > > > > On Fri, 2023-07-21 at 19:08 -0400, Lewis Hyatt wrote: > > > Hello- > > > > > > This is an update to the v2 patch series last sent in January: > > > https://gcc.gnu.org/pipermail

New Swedish PO file for 'gcc' (version 13.2.0)

2023-07-29 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Swedish team of translators. The file is available at: https://translationproject.org/latest/gcc/sv.po (This file, 'gcc-13.2.0.sv.po', has ju

Re: [PATCH v3 0/4] diagnostics: libcpp: Overhaul locations for _Pragma tokens

2023-07-29 Thread Lewis Hyatt via Gcc-patches
On Fri, Jul 28, 2023 at 6:22 PM David Malcolm wrote: > > On Fri, 2023-07-21 at 19:08 -0400, Lewis Hyatt wrote: > > Hello- > > > > This is an update to the v2 patch series last sent in January: > > https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609473.html > > > > While I did not receive an

Re: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies

2023-07-29 Thread Ben Boeckel via Gcc-patches
On Thu, Jul 27, 2023 at 18:13:48 -0700, Jason Merrill wrote: > On 7/23/23 20:26, Ben Boeckel wrote: > > Sure, *CMake* knows them, but the *build tool* needs to be told > > (typically `make` or `ninja`) because it is what is actually executing > > the build graph. The way this is communicated is via

RE: [PATCH] Change fma_reassoc_width tuning for ampere1

2023-07-29 Thread Di Zhao OS via Gcc-patches
Cherry-picked this to gcc-13. Thanks, Di Zhao > -Original Message- > From: Richard Sandiford > Sent: Monday, June 26, 2023 10:28 PM > To: Philipp Tomsich > Cc: Di Zhao OS via Gcc-patches ; Di Zhao OS > > Subject: Re: [PATCH] Change fma_reassoc_width tuning for ampere1 > > Philipp Toms

Re: [patch] libgomp: cuda.h and omp_target_memcpy_rect cleanup (was: [patch] OpenMP: Call cuMemcpy2D/cuMemcpy3D for nvptx for omp_target_memcpy_rect)

2023-07-29 Thread Tobias Burnus
Now committed as r14-2865-g8b9e559fe7ca5715c74115322af99dbf9137a399 Tobias On 28.07.23 13:51, Tobias Burnus wrote: thanks for proof reading and the suggestions! – Do have comments to the attached patch? * * * Crossref: For further optimizations, see also https://gcc.gnu.org/PR101581 — [OpenM

Re: Re: [PATCH 0/5] Recognize Zicond extension

2023-07-29 Thread Xiao Zeng
On Fri, Jul 28, 2023 at 11:03:00 PM  Jeff Law wrote: > > > >On 7/28/23 00:34, Xiao Zeng wrote: > Does that work for you? >>> I'm going to look at 3/5 today pretty closely.  Exposing zicond to >>> movcc is something we had implemented inside Ventana and I want to >>> compare/contrast your

Re: Re: [PATCH 3/5] [RISC-V] Generate Zicond instruction for select pattern with condition eq or neq to 0

2023-07-29 Thread Xiao Zeng
On Fri, Jul 28, 2023 at 11:09:00 PM  Jeff Law wrote: > > > >On 7/25/23 11:55, Andreas Schwab wrote: >> On Jul 19 2023, Xiao Zeng wrote: >> >>> diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc >>> index 38d8eb2fcf5..7e6b24bd232 100644 >>> --- a/gcc/config/riscv/riscv.cc >>> +++ b/

Re: Re: [PATCH 3/5] [RISC-V] Generate Zicond instruction for select pattern with condition eq or neq to 0

2023-07-29 Thread Xiao Zeng
On Sat, Jul 29, 2023 at 04:59:00 AM  Jeff Law wrote: > > > >On 7/19/23 04:11, Xiao Zeng wrote: > >> +  else if (TARGET_ZICOND >> +   && (code == EQ || code == NE) >> +   && GET_MODE_CLASS (mode) == MODE_INT) >> +    { >> +  need_eq_ne_p = true; >> +  /* 0 + imm  */ >> +

[PATCH V2] [PATCH 3/5] [RISC-V] Generate Zicond instruction for select pattern with condition eq or neq to 0

2023-07-29 Thread Xiao Zeng
This patch recognizes Zicond patterns when the select pattern with condition eq or neq to 0 (using eq as an example), namely: 1 rd = (rs2 == 0) ? non-imm : 0 2 rd = (rs2 == 0) ? non-imm : non-imm 3 rd = (rs2 == 0) ? reg : non-imm 4 rd = (rs2 == 0) ? reg : reg gcc/ChangeLog: * config/risc