[Bug rtl-optimization/109035] meaningless memory store on RISC-V and LoongArch

2023-11-03 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109035 Xi Ruoyao changed: What|Removed |Added Target Milestone|--- |14.0

[Bug rtl-optimization/109035] meaningless memory store on RISC-V and LoongArch

2023-11-03 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109035 Xi Ruoyao changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug rtl-optimization/109035] meaningless memory store on RISC-V and LoongArch

2023-11-02 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109035 --- Comment #8 from Jeffrey A. Law --- No spills on rv64 either.

[Bug rtl-optimization/109035] meaningless memory store on RISC-V and LoongArch

2023-11-02 Thread vmakarov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109035 --- Comment #7 from Vladimir Makarov --- For last 2 weeks I pushed several patches for better dealing with equivalences in RA. It seems the patches solves the current PR. I checked the test code generation for loongarch and aarch64 and did

[Bug rtl-optimization/109035] meaningless memory store on RISC-V and LoongArch

2023-03-10 Thread chenglulu at loongson dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109035 --- Comment #6 from chenglulu --- I tried changing the code, diff --git a/gcc/lra-eliminations.cc b/gcc/lra-eliminations.cc index 4220639..efaea6922b5 100644 --- a/gcc/lra-eliminations.cc +++ b/gcc/lra-eliminations.cc @@ -914,6 +914,11 @@

[Bug rtl-optimization/109035] meaningless memory store on RISC-V and LoongArch

2023-03-10 Thread chenglulu at loongson dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109035 --- Comment #5 from chenglulu --- On AARCH64: $cat t.c int test(int x) { char buf[128 << 10]; return buf[x]; } $cat t-1.c int test(int x) { char buf[0xfff]; return buf[x]; } The generated assemblies are as

[Bug rtl-optimization/109035] meaningless memory store on RISC-V and LoongArch

2023-03-07 Thread chenglulu at loongson dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109035 --- Comment #4 from chenglulu --- (In reply to Xi Ruoyao from comment #3) > I don't really understand why we should prefer the memory if there is a > REG_EQUIV note, nor why this does not happen with -fPIE. I didn't understand the optimization

[Bug rtl-optimization/109035] meaningless memory store on RISC-V and LoongArch

2023-03-07 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109035 --- Comment #3 from Xi Ruoyao --- (In reply to chenglulu from comment #2) > I think this is most likely caused by the implementation of the public code. Agree, so I filled the component as rtl-optimization. I tracked a (non root) cause to the

[Bug rtl-optimization/109035] meaningless memory store on RISC-V and LoongArch

2023-03-07 Thread chenglulu at loongson dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109035 chenglulu changed: What|Removed |Added CC||chenglulu at loongson dot cn --- Comment

[Bug rtl-optimization/109035] meaningless memory store on RISC-V and LoongArch

2023-03-06 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109035 --- Comment #1 from Xi Ruoyao --- Forgot to mention: a very strange aspect of this issue is adding "-fPIE" covers it up.

[Bug rtl-optimization/109035] meaningless memory store on RISC-V and LoongArch

2023-03-05 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109035 Xi Ruoyao changed: What|Removed |Added Ever confirmed|0 |1 Target|