Re: [PATCHv4, rs6000] Generate mfvsrwz for all subtargets and remove redundant zero extend [PR106769]

2023-08-15 Thread HAO CHEN GUI via Gcc-patches
Committed after fixing the comments. https://gcc.gnu.org/g:a79cf858b39e01c80537bc5d47a5e9004418c267 Thanks Gui Haochen 在 2023/8/14 15:47, Kewen.Lin 写道: > Hi Haochen, > > on 2023/8/14 10:18, HAO CHEN GUI wrote: >> Hi, >> This patch modifies vsx extract expand and generates mfvsrwz/stxsiwx >> f

Re: [PATCH, rs6000] Skip redundant vector extract if the element is first element of dword0 [PR110429]

2023-08-15 Thread HAO CHEN GUI via Gcc-patches
Committed after tweaking and testing. https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=d471bdb0453de7b738f49148b66d57cb5871937d Thanks Gui Haochen 在 2023/7/28 17:32, Kewen.Lin 写道: > Hi Haochen, > > on 2023/7/5 11:22, HAO CHEN GUI wrote: >> Hi, >> This patch skips redundant vector extract insn to

[PATCH v2] RISC-V: Support RVV VFCVT.F.X.V and VFCVT.F.XU.V rounding mode intrinsic API

2023-08-15 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to support the rounding mode API for the VFCVT.F.X.V and VFCVT.F.XU.V as the below samples. * __riscv_vfcvt_f_x_v_f32m1_rm * __riscv_vfcvt_f_x_v_f32m1_rm_m * __riscv_vfcvt_f_xu_v_f32m1_rm * __riscv_vfcvt_f_xu_v_f32m1_rm_m Signed-off-by: Pan Li gcc/ChangeLog:

Re: [PATCH] IFN: Fix vector extraction into promoted subreg.

2023-08-15 Thread Richard Sandiford via Gcc-patches
"juzhe.zh...@rivai.ai" writes: > Hi, Robin, Richard and Richi. > > I am wondering whether we can just simply replace the VEC_EXTRACT expander > with binary? > > Like this :? > > DEF_INTERNAL_OPTAB_FN (VEC_EXTRACT, ECF_CONST | ECF_NOTHROW, > - vec_extract, vec_extract) > + vec_ex

Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-15 Thread juzhe.zh...@rivai.ai
LGTM juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-08-15 23:49 To: gcc-patches; palmer; Kito Cheng; jeffreyalaw; juzhe.zh...@rivai.ai CC: rdapp.gcc Subject: [PATCH] RISC-V: Fix reduc_strict_run-1 test case. Hi, this patch changes the equality check for the reduc_strict_run-1 testcase from

[PATCH v2] RISC-V: Support RVV VFCVT.XU.F.V rounding mode intrinsic API

2023-08-15 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to support the rounding mode API for the VFCVT.XU.F.V as the below samples. * __riscv_vfcvt_xu_f_v_u32m1_rm * __riscv_vfcvt_xu_f_v_u32m1_rm_m Signed-off-by: Pan Li gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc (BASE): New decl

RE: Re: [PATCH] RISC-V: Support MASK_LEN_{LOAD_LANES,STORE_LANES}

2023-08-15 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of juzhe.zh...@rivai.ai Sent: Wednesday, August 16, 2023 9:23 AM To: jeffreyalaw ; gcc-patches Cc: kito.cheng ; Kito.cheng ; Robin Dapp Subject: Re: Re: [PATCH] RISC-V: Support MASK_LEN_{LOAD_LANES,STORE_LANES

RE: [PATCH V2] VECT: Apply MASK_LEN_{LOAD_LANES, STORE_LANES} into vectorizer

2023-08-15 Thread Li, Pan2 via Gcc-patches
Committed, thanks Richard. Pan -Original Message- From: Gcc-patches On Behalf Of Richard Biener via Gcc-patches Sent: Tuesday, August 15, 2023 8:35 PM To: Juzhe-Zhong Cc: gcc-patches@gcc.gnu.org; richard.sandif...@arm.com Subject: Re: [PATCH V2] VECT: Apply MASK_LEN_{LOAD_LANES, STORE_

RE: [PATCH v2] RISC-V: Support RVV VFCVT.X.F.V rounding mode intrinsic API

2023-08-15 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito. Pan From: Kito Cheng Sent: Wednesday, August 16, 2023 1:57 PM To: Li, Pan2 Cc: GCC Patches ; 钟居哲 ; Wang, Yanzhang Subject: Re: [PATCH v2] RISC-V: Support RVV VFCVT.X.F.V rounding mode intrinsic API LGTM mailto:pan2...@intel.com>> 於 2023年8月16日 週三 13:17 寫道: From: Pan

Re: [PATCH v2] RISC-V: Support RVV VFCVT.X.F.V rounding mode intrinsic API

2023-08-15 Thread Kito Cheng via Gcc-patches
LGTM 於 2023年8月16日 週三 13:17 寫道: > From: Pan Li > > This patch would like to support the rounding mode API for the > VFCVT.X.F.V as the below samples. > > * __riscv_vfcvt_x_f_v_i32m1_rm > * __riscv_vfcvt_x_f_v_i32m1_rm_m > > Signed-off-by: Pan Li > > gcc/ChangeLog: > > * config/riscv/ris

Re: [PATCH] Makefile.in: Add variable TM_P_H2 for TM_P_H dependency [PR111021]

2023-08-15 Thread Kewen.Lin via Gcc-patches
on 2023/8/16 10:31, Kewen.Lin via Gcc-patches wrote: > Hi, > > As PR111021 shows, the below ${port}-protos.h include tree.h > for code_helper and tree_code: > > arm/arm-protos.h:#include "tree.h" > cris/cris-protos.h:#include "tree.h" (H-P removed this in r14-3218) > microblaze/microblaze-

[PATCH v2] RISC-V: Support RVV VFCVT.X.F.V rounding mode intrinsic API

2023-08-15 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to support the rounding mode API for the VFCVT.X.F.V as the below samples. * __riscv_vfcvt_x_f_v_i32m1_rm * __riscv_vfcvt_x_f_v_i32m1_rm_m Signed-off-by: Pan Li gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc (enum frm_op_type):

Re: [PATCH] mklog: fix bugs of --append option

2023-08-15 Thread Lehua Ding
Hi Jeff, Can you take a look at this little patch? It's a bugfix patch that only affects the --apend option that I added earlier, not anyone else. And please let me know if there is a more suitable reviewer as well. Thank you so much. Best, Lehua -- Original ---

Re: RISC-V: Added support for CRC.

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/3/23 13:37, Mariam Harutyunyan via Gcc-patches wrote: This patch adds CRC support for the RISC-V architecture. It adds internal functions and built-ins specifically designed to handle CRC computations efficiently. If the target is ZBC, the clmul instruction is used for the CRC code genera

Re: [PATCH v4] Introduce attribute sym

2023-08-15 Thread Alexandre Oliva via Gcc-patches
On Jul 22, 2023, Fangrui Song wrote: > I wonder whether this attribute can be named "alias" without arguments. Erhm... Maybe I'm missing something about your suggestion, but without arguments, how would we tell the compiler the symbol name of the additional alias we want for the definition? Ma

Re: RISC-V: Added support for CRC.

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/9/23 07:02, Paul Koning wrote: On Aug 9, 2023, at 2:32 AM, Alexander Monakov wrote: On Tue, 8 Aug 2023, Jeff Law wrote: If the compiler can identify a CRC and collapse it down to a table or clmul, that's a major win and such code does exist in the real world. That was the whole po

Re: RISC-V: Added support for CRC.

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/9/23 00:32, Alexander Monakov wrote: On Tue, 8 Aug 2023, Jeff Law wrote: If the compiler can identify a CRC and collapse it down to a table or clmul, that's a major win and such code does exist in the real world. That was the whole point behind the Fedora experiment -- to determine if

RE: [PATCH v1] RISC-V: Support RVV VFCVT.X.F.V rounding mode intrinsic API

2023-08-15 Thread Li, Pan2 via Gcc-patches
Got it, thanks! Will start with CVT and rest frm instructions first, and then refactor. Pan -Original Message- From: Kito Cheng Sent: Wednesday, August 16, 2023 11:44 AM To: Li, Pan2 Cc: juzhe.zh...@rivai.ai; gcc-patches ; Wang, Yanzhang Subject: Re: [PATCH v1] RISC-V: Support RVV V

Re: [PATCH v1] RISC-V: Support RVV VFCVT.X.F.V rounding mode intrinsic API

2023-08-15 Thread Kito Cheng via Gcc-patches
I would prefer to introduce an enum template argument and refactor existing code later :) On Wed, Aug 16, 2023 at 11:40 AM Li, Pan2 via Gcc-patches wrote: > > That should work as well, but may require some changes to existing codes like > declaration, etc. > I am OK for both the enum or inherit,

RE: [PATCH v1] RISC-V: Support RVV VFCVT.X.F.V rounding mode intrinsic API

2023-08-15 Thread Li, Pan2 via Gcc-patches
That should work as well, but may require some changes to existing codes like declaration, etc. I am OK for both the enum or inherit, and will start with the CVT parts, then refactor the existing frm class. Do you have any suggestion for the decision making? Pan -Original Message- From

Re: [PATCH v1] RISC-V: Support RVV VFCVT.X.F.V rounding mode intrinsic API

2023-08-15 Thread Kito Cheng via Gcc-patches
Or using an enum value rather than bool? I am thinking we could also simplify/remove most other frm classes, some practical example: diff --git a/gcc/config/riscv/riscv-vector-builtins-bases.cc b/gcc/config/riscv/riscv-vector-builtins-bases.cc index 2074dac0f16..ace63e963a5 100644 --- a/gcc/conf

Re: [PATCH v4 0/6] Add Loongson SX/ASX instruction support to LoongArch target.

2023-08-15 Thread Xi Ruoyao via Gcc-patches
The implementation fails to handle this test case properly: typedef double __attribute__((vector_size(32))) v4df; void use1(double); __attribute__((noipa)) double use(double) { register double x asm("f24") = 114.514; __asm__("" : "+f" (x)); return x; } void test(void) {

RE: [PATCH v1] RISC-V: Support RVV VFCVT.X.F.V rounding mode intrinsic API

2023-08-15 Thread Li, Pan2 via Gcc-patches
Thanks Kito for comments. How about leverage inherit instead of template? AFAIK, the bool argument isn't recommended up to a point. For example, as below to reuse the expand part. class vfcvt_x : public function_base { public: + virtual bool has_rounding_mode_operand_p () const { return false

[r14-2946 Regression] FAIL: gcc.target/i386/pr87007-5.c scan-assembler-times vxorps[^\n\r]*xmm[0-9] 0 on Linux/x86_64

2023-08-15 Thread Jiang, Haochen via Gcc-patches
From: haochen.jiang Sent: Tuesday, August 15, 2023 5:26 PM To: rguent...@suse.de; gcc-regress...@gcc.gnu.org; gcc-patches@gcc.gnu.org; Jiang, Haochen Subject: [r14-2946 Regression] FAIL: gcc.target/i386/pr87007-5.c scan-assembler-times vxorps[^\n\r]*xmm[0-9] 0 on Linux/x86_64 On Linux/x86_64,

[r14-3148 Regression] FAIL: gcc.dg/vect/bb-slp-subgroups-2.c scan-tree-dump-times slp2 "optimized: basic block" 2 on Linux/x86_64

2023-08-15 Thread Jiang, Haochen via Gcc-patches
From: haochen.jiang Sent: Tuesday, August 15, 2023 5:26 PM To: rguent...@suse.de; gcc-regress...@gcc.gnu.org; gcc-patches@gcc.gnu.org; Jiang, Haochen Subject: [r14-3148 Regression] FAIL: gcc.dg/vect/bb-slp-subgroups-2.c scan-tree-dump-times slp2 "optimized: basic block" 2 on Linux/x86_64 On L

[PATCH] Makefile.in: Add variable TM_P_H2 for TM_P_H dependency [PR111021]

2023-08-15 Thread Kewen.Lin via Gcc-patches
Hi, As PR111021 shows, the below ${port}-protos.h include tree.h for code_helper and tree_code: arm/arm-protos.h:#include "tree.h" cris/cris-protos.h:#include "tree.h" (H-P removed this in r14-3218) microblaze/microblaze-protos.h:#include "tree.h" rl78/rl78-protos.h:#include "tree.h" s

Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/15/23 19:21, juzhe.zh...@rivai.ai wrote: For float/double, the in-order fold-left reduction produced the same result as scalar codes. But for _Float16 is not, I think the issue is not the reduction issue, is float 16 precision issue. But if it's a float16 precision issue then I would h

Re: [PATCH] vect: Move VMAT_GATHER_SCATTER handlings from final loop nest

2023-08-15 Thread Kewen.Lin via Gcc-patches
on 2023/8/15 17:13, Richard Sandiford wrote: > Richard Biener writes: >>> OK, fair enough. So the idea is: see where we end up and then try to >>> improve/factor the APIs in a less peephole way? >> >> Yeah, I think that's the only good way forward. > > OK, no objection from me. Sorry for holdin

Re: [PATCH 6/6] Support AVX10.1 for AVX512DQ+AVX512VL intrins

2023-08-15 Thread Hongtao Liu via Gcc-patches
On Tue, Aug 8, 2023 at 3:23 PM Haochen Jiang via Gcc-patches wrote: > > gcc/testsuite/ChangeLog: > > * gcc.target/i386/avx10_1-vextractf64x2-1.c: New test. > * gcc.target/i386/avx10_1-vextracti64x2-1.c: Ditto. > * gcc.target/i386/avx10_1-vfpclasspd-1.c: Ditto. > * g

Re: [PATCH 3/3] Emit a warning when AVX10 options conflict in vector width

2023-08-15 Thread Hongtao Liu via Gcc-patches
On Tue, Aug 8, 2023 at 3:13 PM Haochen Jiang via Gcc-patches wrote: > > gcc/ChangeLog: > > * config/i386/driver-i386.cc (host_detect_local_cpu): > Do not append -mno-avx10-max-512bit for -march=native. > * common/config/i386/i386-common.cc > (ix86_check_avx10_vector

Re: [PATCH 2/3] Emit a warning when disabling AVX512 with AVX10 enabled or disabling AVX10 with AVX512 enabled

2023-08-15 Thread Hongtao Liu via Gcc-patches
On Tue, Aug 8, 2023 at 3:15 PM Haochen Jiang via Gcc-patches wrote: > > gcc/ChangeLog: > > * config/i386/driver-i386.cc (host_detect_local_cpu): > Do not append -mno-avx10.1 for -march=native. > * config/i386/i386-options.cc > (ix86_check_avx10): New function to che

Re: [PATCH 1/3] Initial support for AVX10.1

2023-08-15 Thread Hongtao Liu via Gcc-patches
On Tue, Aug 8, 2023 at 3:16 PM Haochen Jiang via Gcc-patches wrote: > > gcc/ChangeLog: > > * common/config/i386/cpuinfo.h (get_available_features): > Add avx10_set and version and detect avx10.1. > (cpu_indicator_init): Handle avx10.1-512. > * common/config/i386/i38

[PATCH] Loongarch: Fix plugin header missing install.

2023-08-15 Thread Guo Jie
gcc/ChangeLog: * config/loongarch/t-loongarch: Add loongarch-driver.h into TM_H. Add loongarch-def.h and loongarch-tune.h into OPTIONS_H_EXTRA. Co-authored-by: Lulu Cheng --- gcc/config/loongarch/t-loongarch | 4 1 file changed, 4 insertions(+) diff --git a/gcc/con

[PATCH V2] RISC-V: Support MASK_LEN_{LOAD_LANES,STORE_LANES}

2023-08-15 Thread Juzhe-Zhong
This patch allow us auto-vectorize this following case: #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ void __attribute__ ((noinline, noclone)) \ NAME##_8 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \

[PATCH] IFN: Fix vector extraction into promoted subreg.

2023-08-15 Thread juzhe.zh...@rivai.ai
Hi, Robin, Richard and Richi. I am wondering whether we can just simply replace the VEC_EXTRACT expander with binary? Like this :? DEF_INTERNAL_OPTAB_FN (VEC_EXTRACT, ECF_CONST | ECF_NOTHROW, - vec_extract, vec_extract) + vec_extract, binary) to fix the sign extend issue. An

Re: [RFC PATCH v2 1/2] RISC-V: __builtin_riscv_pause for all environment

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/9/23 20:25, Tsukasa OI wrote: From: Tsukasa OI The "pause" RISC-V hint instruction requires the 'Zihintpause' extension (in the assembler). However, GCC emits "pause" unconditionally, making an assembler error while compiling code with __builtin_riscv_pause while the 'Zihintpause' exte

Re: Re: [PATCH] RISC-V: Support MASK_LEN_{LOAD_LANES,STORE_LANES}

2023-08-15 Thread juzhe.zh...@rivai.ai
Thanks Jeff. I realize the quad_trunc/oct_trunc change is not necessary. I will remove that. The middle-end support is approved, and testing on both X86 and ARM, soon will be committed. Will commit this patch after middle-end patch is committed. Thanks. juzhe.zh...@rivai.ai From: Jeff Law D

Re: Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-15 Thread juzhe.zh...@rivai.ai
For float/double, the in-order fold-left reduction produced the same result as scalar codes. But for _Float16 is not, I think the issue is not the reduction issue, is float 16 precision issue. Thanks. juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-08-16 09:13 To: Robin Dapp; gcc-patches; p

Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/15/23 09:49, Robin Dapp wrote: Hi, this patch changes the equality check for the reduc_strict_run-1 testcase from == to fabs () < EPS. The FAIL only occurs with _Float16 but I'd argue approximate equality is preferable for all float modes. Regards Robin gcc/testsuite/ChangeLog:

[PATCH] Remove XFAIL from gcc/testsuite/gcc.dg/unroll-7.c

2023-08-15 Thread Thiago Jung Bauermann via Gcc-patches
This test passes since commit e41103081bfa "Fix undefined behaviour in profile_count::differs_from_p", so remove the xfail annotation. Tested on aarch64-linux-gnu, armv8l-linux-gnueabihf and x86_64-linux-gnu. gcc/testsuite/ChangeLog: * gcc.dg/unroll-7.c: Remove xfail. --- gcc/testsuite/g

Re: [RFC] GCC Security policy

2023-08-15 Thread Paul Koning via Gcc-patches
> On Aug 15, 2023, at 8:37 PM, Alexander Monakov wrote: > >> ... >> At some point the system tools need to respect the programmer or operator. >> There is a difference between writing "Hello, World" and writing >> performance critical or safety critical code. That is the responsibility >> of

Re: [RFC] GCC Security policy

2023-08-15 Thread Alexander Monakov
On Tue, 15 Aug 2023, David Edelsohn wrote: > > Making users responsible for verifying that sources are "safe" is not okay > > (we cannot teach them how to do that since there's no general method). > > Making users responsible for sandboxing the compiler is fine (there's > > a range of sandboxing

Re: [RFC] GCC Security policy

2023-08-15 Thread David Edelsohn via Gcc-patches
On Tue, Aug 15, 2023 at 7:07 PM Alexander Monakov wrote: > > On Tue, 15 Aug 2023, Siddhesh Poyarekar wrote: > > > > Thanks, this is nicer (see notes below). My main concern is that we > > > shouldn't pretend there's some method of verifying that arbitrary > source > > > code is "safe" to pass to

Re: [RFC] GCC Security policy

2023-08-15 Thread David Malcolm via Gcc-patches
On Mon, 2023-08-14 at 09:26 -0400, Siddhesh Poyarekar wrote: > Hi, > > Here's the updated draft of the top part of the security policy with all > of the recommendations incorporated. > > Thanks, > Sid > > > What is a GCC security bug? > === > > A security bug is o

Re: [RFC] GCC Security policy

2023-08-15 Thread Alexander Monakov
On Tue, 15 Aug 2023, Siddhesh Poyarekar wrote: > > Thanks, this is nicer (see notes below). My main concern is that we > > shouldn't pretend there's some method of verifying that arbitrary source > > code is "safe" to pass to an unsandboxed compiler, nor should we push > > the responsibility of

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-15 Thread Bradley Lucier via Gcc-patches
First, if this is no longer the appropriate group for this discussion, please tell me where to send it. I've been working to understand all the comments here. From them, I think: 1. It's OK to have gcc report back to the user whether each particular call in tail position is optimized when -f

Re: [PATCH v4 4/8] diagnostics: Support obtaining source code lines from generated data buffers

2023-08-15 Thread Lewis Hyatt via Gcc-patches
On Tue, Aug 15, 2023 at 3:46 PM David Malcolm wrote: > > On Tue, 2023-08-15 at 14:15 -0400, Lewis Hyatt wrote: > > On Tue, Aug 15, 2023 at 12:15:15PM -0400, David Malcolm wrote: > > > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > > > This patch enhances location_get_source_line(), whic

Re: [PATCH v3] LoongArch:Implement 128-bit floating point functions in gcc.

2023-08-15 Thread Joseph Myers
On Tue, 15 Aug 2023, chenxiaolong wrote: > In the implementation process, the "q" suffix function is > Re-register and associate the "__float128" type with the > "long double" type so that the compiler can handle the > corresponding function correctly. The functions i

Re: [PATCH] config-list.mk Darwin: Use --with-gnu-as

2023-08-15 Thread Iain Sandoe
Hi Jan-Benedict, > On 15 Aug 2023, at 20:36, Jan-Benedict Glaw wrote: > config-list.mk Darwin: Use --with-gnu-as for mass-building tests > > As `config-list.mk` is probably mostly used on Linux system, where > Apple's tools aren't around. Let's use --with-gnu-as instead to have > an useable as

Re: [PATCH] config-list.mk Darwin: Use --with-gnu-as

2023-08-15 Thread Rainer Orth
Hi Jan-Benedict, > config-list.mk Darwin: Use --with-gnu-as for mass-building tests > > As `config-list.mk` is probably mostly used on Linux system, where > Apple's tools aren't around. Let's use --with-gnu-as instead to have > an useable assembler. > > contrib/ChangeLog: > > * config-list.m

Re: [PATCH v4 4/8] diagnostics: Support obtaining source code lines from generated data buffers

2023-08-15 Thread David Malcolm via Gcc-patches
On Tue, 2023-08-15 at 14:15 -0400, Lewis Hyatt wrote: > On Tue, Aug 15, 2023 at 12:15:15PM -0400, David Malcolm wrote: > > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > > This patch enhances location_get_source_line(), which is the > > > primary > > > interface provided by the diagnosti

Re: [PATCH v4 3/8] diagnostics: Refactor class file_cache_slot

2023-08-15 Thread David Malcolm via Gcc-patches
On Tue, 2023-08-15 at 13:58 -0400, Lewis Hyatt wrote: > On Tue, Aug 15, 2023 at 11:43:05AM -0400, David Malcolm wrote: > > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > > Class file_cache_slot in input.cc is used to query specific lines > > > of source > > > code from a file when needed

[PATCH] config-list.mk Darwin: Use --with-gnu-as

2023-08-15 Thread Jan-Benedict Glaw
Hi! config-list.mk Darwin: Use --with-gnu-as for mass-building tests As `config-list.mk` is probably mostly used on Linux system, where Apple's tools aren't around. Let's use --with-gnu-as instead to have an useable assembler. contrib/ChangeLog: * config-list.mk (i686-apple-darwin): Use

[PATCH] config-list.mk i686-solaris2.11: Use --with-gnu-as

2023-08-15 Thread Jan-Benedict Glaw
Hi! i686-solaris2.11: Use --with-gnu-as for mass-building tests As `config-list.mk` is probably mostly used on Linux system, where Solaris's `as` isn't available, let's use GNU `as` as the default. contrib/ChangeLog: * config-list.mk (i686-solaris2.11): Use --with-gnu-as. diff --git a/

Re: [RFC] GCC Security policy

2023-08-15 Thread Siddhesh Poyarekar
On 2023-08-15 10:07, Alexander Monakov wrote: On Tue, 15 Aug 2023, Siddhesh Poyarekar wrote: Does this as the first paragraph address your concerns: Thanks, this is nicer (see notes below). My main concern is that we shouldn't pretend there's some method of verifying that arbitrary source co

Re: [PATCH] bpf: remove useless define_insn for extendsisi2

2023-08-15 Thread Jose E. Marchesi via Gcc-patches
OK. Thanks! > This define_insn is never used, since a sign-extend to the same mode is > just a move, so delete it. > > Tested on x86_64-linux-gnu host for bpf-unknown-none target. > > gcc/ > > * config/bpf/bpf.md (extendsisi2): Delete useless define_insn. > --- > gcc/config/bpf/bpf.md | 7

Re: [PATCH] bpf: fix pseudoc w regs for small modes [PR111029]

2023-08-15 Thread Jose E. Marchesi via Gcc-patches
Hello David. Thanks for the patch. OK. > In the BPF pseudo-c assembly dialect, registers treated as 32-bits > rather than the full 64 in various instructions ought to be printed as > "wN" rather than "rN". But bpf_print_register () was only doing this > for specifically SImode registers, meani

[PATCH] bpf: remove useless define_insn for extendsisi2

2023-08-15 Thread David Faust via Gcc-patches
This define_insn is never used, since a sign-extend to the same mode is just a move, so delete it. Tested on x86_64-linux-gnu host for bpf-unknown-none target. gcc/ * config/bpf/bpf.md (extendsisi2): Delete useless define_insn. --- gcc/config/bpf/bpf.md | 7 --- 1 file changed, 7 de

[PATCH] bpf: fix pseudoc w regs for small modes [PR111029]

2023-08-15 Thread David Faust via Gcc-patches
In the BPF pseudo-c assembly dialect, registers treated as 32-bits rather than the full 64 in various instructions ought to be printed as "wN" rather than "rN". But bpf_print_register () was only doing this for specifically SImode registers, meaning smaller modes were printed incorrectly. This ca

[PATCH] testsuite: Remove unused dg-line in ce8cdf5bcf96a2db6d7b9f656fc9ba58d7942a83

2023-08-15 Thread Benjamin Priour via Gcc-patches
From: benjamin priour Yet another blunder. Succesfully regstrapped against ce8cdf5bcf96a2db6d7b9f656fc9ba58d7942a83 on x86_64-linux-gnu. OK to push on trunk ? Sorry, Benjamin. Fixup below. --- Test case g++.dg/analyzer/fanalyzer-show-events-in-system-headers.C introduced by patch ce8cdf5bcf96

[PATCH V3] riscv: generate builtin macro for compilation with strict alignment:

2023-08-15 Thread Edwin Lu
This patch is a modification of https://gcc.gnu.org/pipermail/gcc-patches/2023-January/610115.html following the discussion on https://github.com/riscv-non-isa/riscv-c-api-doc/issues/32 Distinguish between explicit -mstrict-align and cpu tune param for slow_unaligned_access=true/false. Tested f

Re: [PATCH v4 4/8] diagnostics: Support obtaining source code lines from generated data buffers

2023-08-15 Thread Lewis Hyatt via Gcc-patches
On Tue, Aug 15, 2023 at 12:15:15PM -0400, David Malcolm wrote: > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > This patch enhances location_get_source_line(), which is the primary > > interface provided by the diagnostics infrastructure to obtain the line of > > source code correspondin

Re: [PATCH v4 3/8] diagnostics: Refactor class file_cache_slot

2023-08-15 Thread Lewis Hyatt via Gcc-patches
On Tue, Aug 15, 2023 at 11:43:05AM -0400, David Malcolm wrote: > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > Class file_cache_slot in input.cc is used to query specific lines of source > > code from a file when needed by diagnostics infrastructure. This will be > > extended in a subse

Re: [PATCH v4 8/8] diagnostics: Support generated data locations in SARIF output

2023-08-15 Thread Lewis Hyatt via Gcc-patches
On Tue, Aug 15, 2023 at 01:04:04PM -0400, David Malcolm wrote: > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > The diagnostics routines for SARIF output need to read the source code back > > in, so that they can generate "snippet" and "content" records, so they need > > to > > be able

[gcc 11 backport] Support ld.mold linker.

2023-08-15 Thread Romain Geissler via Gcc-patches
Hi, Is it ok to backport small unrisky features to the old gcc 11 branch ? Here is a proposal to merge the ld.mold linker support which Martin has pushed in gcc >= 12. It's a cherry-pick of commit ad964f7eaef9c03ce68a01cfdd7fde9d56524868. Note that it doesn't backport the gcc build machinery to be

Re: [PATCH v4 8/8] diagnostics: Support generated data locations in SARIF output

2023-08-15 Thread David Malcolm via Gcc-patches
On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > The diagnostics routines for SARIF output need to read the source code back > in, so that they can generate "snippet" and "content" records, so they need to > be able to cope with generated data locations.  Add support for that in > diagnostic

Re: [PATCH v4 6/8] diagnostics: Full support for generated data locations

2023-08-15 Thread David Malcolm via Gcc-patches
On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > Previous patches in this series have laid the groundwork for supporting > source code locations in memory ("generated data") rather than ordinary > files. This patch completes the support by adding awareness of such > locations to all places t

Re: [PATCH v4 5/8] diagnostics: Support testing generated data in input.cc selftests

2023-08-15 Thread David Malcolm via Gcc-patches
On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > Add selftests for the new capabilities in input.cc related to source code > locations that are stored in memory rather than ordinary files. > > gcc/ChangeLog: > > * input.cc (temp_source_file::do_linemap_add): New function. >    

Re: [PATCH] testsuite: Adjust g++.dg/gomp/pr58567.C to new compiler message

2023-08-15 Thread Thiago Jung Bauermann via Gcc-patches
Hello, Thiago Jung Bauermann writes: > Commit 92d1425ca780 "c++: redundant targ coercion for var/alias tmpls" > changed the compiler error message in this testcase from > > : In instantiation of 'void foo() [with T = int]': > :14:11: required from here > :8:22: error: 'int' is not a class, s

Re: [PATCH v4 4/8] diagnostics: Support obtaining source code lines from generated data buffers

2023-08-15 Thread David Malcolm via Gcc-patches
On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > This patch enhances location_get_source_line(), which is the primary > interface provided by the diagnostics infrastructure to obtain the line of > source code corresponding to a given location, so that it understands > generated data location

[PATCH v2][GCC] aarch64: Add support for Cortex-A720 CPU

2023-08-15 Thread Richard Ball via Gcc-patches
v2: Add missing PROFILE feature flag. This patch adds support for the Cortex-A720 CPU to GCC. No regressions on aarch64-none-elf. Ok for master? gcc/ChangeLog: * config/aarch64/aarch64-cores.def (AARCH64_CORE): Add Cortex- A720 CPU. * config/aarch64/aarch64-tune.md: Re

[PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-15 Thread Robin Dapp via Gcc-patches
Hi, this patch changes the equality check for the reduc_strict_run-1 testcase from == to fabs () < EPS. The FAIL only occurs with _Float16 but I'd argue approximate equality is preferable for all float modes. Regards Robin gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/reduc/

Re: [PATCH v4 3/8] diagnostics: Refactor class file_cache_slot

2023-08-15 Thread David Malcolm via Gcc-patches
On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > Class file_cache_slot in input.cc is used to query specific lines of source > code from a file when needed by diagnostics infrastructure. This will be > extended in a subsequent patch to support obtaining the source code from > in-memory gener

Re: [PATCH v1] RISC-V: Support RVV VFCVT.X.F.V rounding mode intrinsic API

2023-08-15 Thread Kito Cheng via Gcc-patches
Just a random idea came to my mind, maybe we could introduce one more template argument to reduce those codes for rounding mode intrinsic stuff? example: diff --git a/gcc/config/riscv/riscv-vector-builtins-bases.cc b/gcc/config/riscv/riscv-vector-builtins-bases.cc index 2074dac0f16..9cc60842a5b 1

Re: [PATCH] Fortran: Avoid accessing gfc_charlen when not looking at BT_CHARACTER (PR 110677)

2023-08-15 Thread Martin Jambor
Hello, On Mon, Aug 14 2023, Harald Anlauf via Gcc-patches wrote: > Hi Martin, > > Am 14.08.23 um 19:39 schrieb Martin Jambor: >> Hello, >> >> this patch addresses an issue uncovered by the undefined behavior >> sanitizer. In function resolve_structure_cons in resolve.cc there is >> a test starti

[committed][GCC 12] d: Fix internal compiler error: in layout_aggregate_type, at d/types.cc:574

2023-08-15 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an ICE that is specific to the D front-end language version in GDC 12. Bootstrapped and regression tested on x86_64-linux-gnu/-m32, committed to releases/gcc-12. The pr110959.d test case has also been committed to mainline to catch the unlikely event of a regression. Regard

Re: [PATCH] Handle TYPE_OVERFLOW_UNDEFINED vectorized BB reductions

2023-08-15 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > The following changes the gate to perform vectorization of BB reductions > to use needs_fold_left_reduction_p which in turn requires handling > TYPE_OVERFLOW_UNDEFINED types in the epilogue code generation by > promoting any operations generated there to use unsigned arith

Re: [RFC] GCC Security policy

2023-08-15 Thread Paul Koning via Gcc-patches
> On Aug 15, 2023, at 10:07 AM, Alexander Monakov wrote: > > > On Tue, 15 Aug 2023, Siddhesh Poyarekar wrote: > >> Does this as the first paragraph address your concerns: > > Thanks, this is nicer (see notes below). My main concern is that we shouldn't > pretend there's some method of verif

[v3] OpenACC 2.7: default clause support for data constructs (was: [PATCH, OpenACC 2.7, v2] Implement default clause support for data constructs)

2023-08-15 Thread Thomas Schwinge
Hi! On 2023-08-01T23:35:16+0800, Chung-Lin Tang wrote: > this is v2 of the patch for implementing the OpenACC 2.7 addition of > default(none|present) support for data constructs. Thanks! > Instead of propagating an additional 'oacc_default_kind' for OpenACC, > this patch does it in a more compl

Re: [PATCH] RISC-V: Support MASK_LEN_{LOAD_LANES,STORE_LANES}

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/14/23 06:15, Juzhe-Zhong wrote: This patch is depending on middle-end support: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627305.html This patch allow us auto-vectorize this following case: #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ vo

Re: [PATCH] RISC-V: Support MASK_LEN_{LOAD_LANES,STORE_LANES}

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/14/23 06:15, Juzhe-Zhong wrote: This patch is depending on middle-end support: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627305.html This patch allow us auto-vectorize this following case: #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ vo

Re: Is this a bug for __builtin_dynamic_object_size?

2023-08-15 Thread Qing Zhao via Gcc-patches
Thanks. I just filed a PR https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111030 to record this issue and added you to the CC list. Qing > On Aug 15, 2023, at 6:57 AM, Siddhesh Poyarekar wrote: > > On 2023-08-14 19:12, Qing Zhao wrote: >> Hi, Sid, >> For the following testing case: >> #include >

Re: [RFC] GCC Security policy

2023-08-15 Thread Alexander Monakov
On Tue, 15 Aug 2023, Siddhesh Poyarekar wrote: > Does this as the first paragraph address your concerns: Thanks, this is nicer (see notes below). My main concern is that we shouldn't pretend there's some method of verifying that arbitrary source code is "safe" to pass to an unsandboxed compiler

Re: cpymem for RISCV with v extension

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/15/23 03:16, juzhe.zh...@rivai.ai wrote: The new  patch looks reasonable to me now. Thanks for fixing it. Could you append testcase after finishing test infrastructure ? I prefer this patch with testcase after infrastructure. So let's call this an ACK, but ask that Joern not commit until

Re: cpymem for RISCV with v extension

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/15/23 02:12, Joern Rennecke wrote: It lacks the strength reduction of the opaque pattern version for -O3, though. Would people also like to see that expanded into RTL? Or should I just drop in the opaque pattern for that? Or not at all, because everyone uses Superscalar Out-Of-Order e

[PATCH] IFN: Fix vector extraction into promoted subreg.

2023-08-15 Thread Robin Dapp via Gcc-patches
Hi, this patch fixes the case where vec_extract gets passed a promoted subreg (e.g. from a return value). When such a subreg is the destination of a vector extraction we create a separate pseudo register and ensure that the necessary promotion is performed afterwards. Before this patch a sign-ex

RE: [PATCH] RISC-V: Fix autovec_length_operand predicate[PR110989]

2023-08-15 Thread Li, Pan2 via Gcc-patches
Committed, thanks Robin. Pan -Original Message- From: Gcc-patches On Behalf Of Robin Dapp via Gcc-patches Sent: Tuesday, August 15, 2023 6:43 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: rdapp@gmail.com; kito.ch...@sifive.com; kito.ch...@gmail.com; jeffreya...@gmail.com Subject

Re: [RFC PATCH 0/2] RISC-V: __builtin_riscv_pause for all environment

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/13/23 13:52, Philipp Tomsich wrote: On Sat, 12 Aug 2023 at 01:31, Jeff Law via Gcc-patches wrote: On 8/9/23 16:39, Tsukasa OI wrote: On 2023/08/10 5:05, Jeff Law wrote: I'd tend to think we do not want to expose the intrinsic unless the right extensions are enabled -- even though

Re: [RFC PATCH 0/2] RISC-V: __builtin_riscv_pause for all environment

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/11/23 18:20, Tsukasa OI wrote: I'll not be able to attend that meeting due to Japanese religious events around Aug 13-16 (it may not be impossible but at least difficult) but look forward seeing that some conclusion is made. No problem. We hold that meeting weekly to work through any

Re: cpymem for RISCV with v extension

2023-08-15 Thread Jeff Law via Gcc-patches
On 8/14/23 19:46, Joern Rennecke wrote: On Fri, 4 Aug 2023 at 21:52, Jeff Law wrote: diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc index b4884a30872..e61110fa3ad 100644 --- a/gcc/config/riscv/riscv-v.cc +++ b/gcc/config/riscv/riscv-v.cc @@ -49,6 +49,7 @@ #include

[PATCH v4] c++: extend cold, hot attributes to classes

2023-08-15 Thread Javier Martinez via Gcc-patches
On Mon, Aug 14, 2023 at 8:32 PM Jason Merrill wrote: > I think you also want to check for ATTR_FLAG_TYPE_IN_PLACE. > [...] > > + propagate_class_warmth_attribute (t); > Maybe call this in check_bases_and_members instead? Yes, that is sensible. Done. Thanks, Javier Signed-off-by: Javier Martine

[PATCH] Handle TYPE_OVERFLOW_UNDEFINED vectorized BB reductions

2023-08-15 Thread Richard Biener via Gcc-patches
The following changes the gate to perform vectorization of BB reductions to use needs_fold_left_reduction_p which in turn requires handling TYPE_OVERFLOW_UNDEFINED types in the epilogue code generation by promoting any operations generated there to use unsigned arithmetic. The following does this,

[PATCH] Cleanup BB vectorization roots handling

2023-08-15 Thread Richard Biener via Gcc-patches
The following moves CONSTRUCTOR handling into the generic BB vectorization roots handling, removing a special case and finally renaming the function now consisting of more than just constructor detection. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vect-slp.cc (vec

Re: [PATCH V2] VECT: Apply MASK_LEN_{LOAD_LANES, STORE_LANES} into vectorizer

2023-08-15 Thread Richard Biener via Gcc-patches
On Tue, 15 Aug 2023, Juzhe-Zhong wrote: > Hi, Richard and Richi. > > This patch is adding MASK_LEN_{LOAD_LANES,STORE_LANES} support into > vectorizer. > > Consider this simple case: > > void __attribute__ ((noinline, noclone)) > foo (int *__restrict a, int *__restrict b, int *__restrict c, >

[PATCH V2] VECT: Apply MASK_LEN_{LOAD_LANES, STORE_LANES} into vectorizer

2023-08-15 Thread Juzhe-Zhong
Hi, Richard and Richi. This patch is adding MASK_LEN_{LOAD_LANES,STORE_LANES} support into vectorizer. Consider this simple case: void __attribute__ ((noinline, noclone)) foo (int *__restrict a, int *__restrict b, int *__restrict c, int *__restrict d, int *__restrict e, int *__restrict

Re: [PATCH] vect: Move VMAT_GATHER_SCATTER handlings from final loop nest

2023-08-15 Thread Kewen.Lin via Gcc-patches
on 2023/8/15 20:07, Richard Biener wrote: > On Tue, Aug 15, 2023 at 1:47 PM Kewen.Lin wrote: >> >> on 2023/8/15 15:53, Richard Biener wrote: >>> On Tue, Aug 15, 2023 at 4:44 AM Kewen.Lin wrote: on 2023/8/14 22:16, Richard Sandiford wrote: > "Kewen.Lin" writes: >> Hi Richard, >>

[PATCH] Support constants and externals in BB reduction vectorization

2023-08-15 Thread Richard Biener via Gcc-patches
The following supports vectorizing BB reductions involving a constant or an invariant. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vectorizer.h (_slp_instance::remain_stmts): Change to ... (_slp_instance::remain_defs): ... this. (SLP_INSTANC

Re: [PATCH] vect: Move VMAT_GATHER_SCATTER handlings from final loop nest

2023-08-15 Thread Richard Biener via Gcc-patches
On Tue, Aug 15, 2023 at 1:47 PM Kewen.Lin wrote: > > on 2023/8/15 15:53, Richard Biener wrote: > > On Tue, Aug 15, 2023 at 4:44 AM Kewen.Lin wrote: > >> > >> on 2023/8/14 22:16, Richard Sandiford wrote: > >>> "Kewen.Lin" writes: > Hi Richard, > > on 2023/8/14 20:20, Richard Sandif

Re: Re: [PATCH] VECT: Apply MASK_LEN_{LOAD_LANES,STORE_LANES} into vectorizer

2023-08-15 Thread Richard Biener via Gcc-patches
On Tue, 15 Aug 2023, juzhe.zh...@rivai.ai wrote: > Hi, Richi. > > I realize this code perform analysis for load/store > > + internal_fn lanes_ifn; >if (!get_load_store_type (vinfo, stmt_info, vectype, slp_node, mask, > vls_type, > ncopies, &memory_access_type, &

Re: [PATCH] vect: Move VMAT_GATHER_SCATTER handlings from final loop nest

2023-08-15 Thread Kewen.Lin via Gcc-patches
on 2023/8/15 15:53, Richard Biener wrote: > On Tue, Aug 15, 2023 at 4:44 AM Kewen.Lin wrote: >> >> on 2023/8/14 22:16, Richard Sandiford wrote: >>> "Kewen.Lin" writes: Hi Richard, on 2023/8/14 20:20, Richard Sandiford wrote: > Thanks for the clean-ups. But... > > "Kewe

  1   2   >