[PATCH v2] LoongArch: Fix inconsistent description in *sge_

2024-03-05 Thread Guo Jie
The constraint of op[1] is inconsistent with the output template. gcc/ChangeLog: * config/loongarch/loongarch.md (define_insn "*sge_"): Fix inconsistency error. --- Update in v2: Remove useless support for op[1] is const_imm12_operand. ---

Re: [PATCH] LoongArch: Fix inconsistent description in *sge_

2024-03-04 Thread Guo Jie
Thanks for the feedback. The comparison between a const_imm12_operand and (const_int 1) does indeed perform a universal process of constant folding before any tree based optimization. I will fix it in patch v2. 在 2024/3/4 下午5:18, Xi Ruoyao 写道: On Mon, 2024-03-04 at 11:03 +0800, Guo Jie

[PATCH] LoongArch: Fix inconsistent description in *sge_

2024-03-03 Thread Guo Jie
The constraint of op[1] is inconsistent with the output template. gcc/ChangeLog: * config/loongarch/loongarch.md (define_insn "*sge_"): Fix inconsistency error. --- gcc/config/loongarch/loongarch.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] LoongArch: Fix runtime error in a gcc build with --with-build-config=bootstrap-ubsan

2023-11-22 Thread Guo Jie
gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_split_plus_constant): avoid left shift of negative value -0x8000. --- gcc/config/loongarch/loongarch.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/loongarch/loongarch.cc

[PATCH v2] LoongArch: Optimize the loading of immediate numbers with the same high and low 32-bit values

2023-11-22 Thread Guo Jie
For the following immediate load operation in gcc/testsuite/gcc.target/loongarch/imm-load1.c: long long r = 0x0101010101010101; Before this patch: lu12i.w $r15,16842752>>12 ori $r15,$r15,257 lu32i.d $r15,0x10101>>32 lu52i.d

Re: [PATCH] LoongArch: Optimize the loading of immediate numbers with the same high and low 32-bit values

2023-11-20 Thread Guo Jie
Thanks for your advice! I will fix it in patch v2. 在 2023/11/18 下午5:09, Xi Ruoyao 写道: On Sat, 2023-11-18 at 14:59 +0800, Guo Jie wrote: For the following immediate load operation in gcc/testsuite/gcc.target/loongarch/imm-load1.c: long long r = 0x0101010101010101; Before this patch

[PATCH] LoongArch: Optimize the loading of immediate numbers with the same high and low 32-bit values

2023-11-17 Thread Guo Jie
For the following immediate load operation in gcc/testsuite/gcc.target/loongarch/imm-load1.c: long long r = 0x0101010101010101; Before this patch: lu12i.w $r15,16842752>>12 ori $r15,$r15,257 lu32i.d $r15,0x10101>>32 lu52i.d

[PATCH] LoongArch: Optimizations of vector construction.

2023-09-20 Thread Guo Jie
gcc/ChangeLog: * config/loongarch/lasx.md (lasx_vecinit_merge_): New pattern for vector construction. (vec_set_internal): Ditto. (lasx_xvinsgr2vr__internal): Ditto. (lasx_xvilvl__internal): Ditto. * config/loongarch/loongarch.cc

[PATCH] LoongArch: Optimizations of vector construction.

2023-09-20 Thread Guo Jie
Change-Id: I327f68ab482b94073974e672c71d25c98b35a080 gcc/ChangeLog: * config/loongarch/lasx.md (lasx_vecinit_merge_): New pattern for vector construction. (vec_set_internal): Ditto. (lasx_xvinsgr2vr__internal): Ditto. (lasx_xvilvl__internal): Ditto.

Re: [PATCH] LoongArch: Enable -fsched-pressure by default at -O1 and higher.

2023-09-08 Thread Guo Jie
Hi, What I wanna change is "gcc/common/config/loongarch/loongarch-common.cc", and the patch is automatically generated by "git gcc-commit-mklog". Is it necessary to  to remove "common/" ? Thanks for the review. 在 2023/9/8 下午4:06, Xi Ruoyao 写道: On Fri, 2023

[PATCH] LoongArch: Enable -fsched-pressure by default at -O1 and higher.

2023-09-07 Thread Guo Jie
gcc/ChangeLog: * common/config/loongarch/loongarch-common.cc: (default_options loongarch_option_optimization_table): Default to -fsched-pressure. --- gcc/common/config/loongarch/loongarch-common.cc | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v2] LoongArch: Support storing floating-point zero into MEM[base + index].

2023-09-02 Thread Guo Jie
v2: Modify commit message. gcc/ChangeLog: * config/loongarch/loongarch.md: Support 'G' -> 'k' in movsf_hardfloat and movdf_hardfloat. gcc/testsuite/ChangeLog: * gcc.target/loongarch/const-double-zero-stx.c: New test. --- gcc/config/loongarch/loongarch.md

[PATCH] LoongArch: Support loading floating-point zero into MEM[base + index].

2023-09-01 Thread Guo Jie
gcc/ChangeLog: * config/loongarch/loongarch.md: Support 'G' -> 'k' in movsf_hardfloat and movdf_hardfloat. gcc/testsuite/ChangeLog: * gcc.target/loongarch/const-double-zero-stx.c: New test. --- gcc/config/loongarch/loongarch.md | 12 ++--

[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

[PATCH] LoongArch: Fix the missing include file when using gcc plugins.

2023-07-12 Thread Guo Jie
From: Sun Haiyong gcc/ChangeLog: * config.gcc: Add some include file in tm_file. --- gcc/config.gcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 51ca5311fa4..b901aa8e5dc 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@

Re: [PATCH] LoongArch: Enable shrink wrapping

2023-04-25 Thread Guo Jie
/* snip */   diff --git a/gcc/testsuite/gcc.target/loongarch/shrink-wrap.c b/gcc/testsuite/gcc.target/loongarch/shrink-wrap.c new file mode 100644 index 000..f2c867a2769 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/shrink-wrap.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* {