[Bug target/55212] [SH] Switch to LRA

2025-01-28 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #438 from Oleg Endo --- Could be relevant https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673346.html https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672694.html https://gcc.gnu.org/pipermail/gcc-patches/2025-Janua

[Bug target/55212] [SH] Switch to LRA

2025-01-16 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #437 from Oleg Endo --- Could be relevant https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118067 https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673817.html

[Bug middle-end/60919] [arm] gcc fails to tail call __builtin_ffsll

2025-01-12 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60919 Oleg Endo changed: What|Removed |Added Target|arm |arm sh*-*-* --- Comment #5 from Oleg Endo -

[Bug target/55212] [SH] Switch to LRA

2025-01-09 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #435 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #434) > Any suggestion on how to proceed here? Oleg, do you maybe want to rebase > your tree against master? I can re-run all tests and verify whether the > p

[Bug target/55212] [SH] Switch to LRA

2025-01-09 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #436 from Oleg Endo --- Could be relevant https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118017 https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673130.html

[Bug target/111814] [SH] __builtin_nan* returns signalling NaNs instead of quiet NaNs and vice versa

2024-12-30 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111814 --- Comment #7 from Oleg Endo --- (In reply to Jiaxun Yang from comment #6) > (In reply to Andrew Pinski from comment #4) > > Note it might need to be under the check of -mieee too > > I'm preparing patch for this issue Thanks! > and IM

[Bug target/111814] on sh4, __builtin_nan* returns signalling NaNs instead of quiet NaNs and vice versa

2024-12-29 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111814 Oleg Endo changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug target/55212] [SH] Switch to LRA

2024-12-06 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 Oleg Endo changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug target/55212] [SH] Switch to LRA

2024-12-06 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 Oleg Endo changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug libgcc/78804] [RX] -m64bit-doubles does not work

2024-12-04 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78804 Oleg Endo changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug target/113948] Switch rx to LRA

2024-12-04 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113948 --- Comment #2 from Oleg Endo --- -mlra option has been around on RX for a while. I've using GCC 8 as production compiler on a larger firmware. Adding -mlra to the build will make the thing get stuck during linking (using LTO) somewhere, looks

[Bug target/117908] [RX] Add support for v2 ISA

2024-12-04 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117908 Oleg Endo changed: What|Removed |Added Last reconfirmed||2024-12-04 Ever confirmed|0

[Bug target/117908] New: [RX] Add support for v2 ISA

2024-12-04 Thread olegendo at gcc dot gnu.org via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target Milestone: --- Support for RXv2 and RXv3 ISAs has been added to bintuilts long time ago but the compiler still lacks any support. A patch to add RXv2 to the compiler has been posted quite a while ago

[Bug target/55212] [SH] Switch to LRA

2024-12-01 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #431 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #430) > > If you could merge 59432 and 59550 into your tree and rebase, I can test now > that a fix for PR 117770 has landed. I don't think there is anythin

[Bug target/55212] [SH] Switch to LRA

2024-11-30 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #429 from Oleg Endo --- Could be related https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117770

[Bug target/107704] [13/14/15 Regression] Testsuite regression after recent DCE changes

2024-11-19 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107704 --- Comment #10 from Oleg Endo --- (In reply to Richard Sandiford from comment #9) > I think the .md pattern either has to treat both appearances of the T > register as operands or hard-code both of them. Do you mean to make it a multi-set pat

[Bug target/117591] [SH] support for BitInt

2024-11-14 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117591 Oleg Endo changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug target/55212] [SH] Switch to LRA

2024-11-08 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #427 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #426) > Oleg, could you merge the patches 59432 and 59550 into your tree, please? Yes, I will do it when I have time.

[Bug target/55212] [SH] Switch to LRA

2024-11-06 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #424 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #423) > > If I may ask one last question, could you give advise on this glibc bug that > affects SH? > > > https://sourceware.org/bugzilla/show_bug.cgi?id=2

[Bug target/55212] [SH] Switch to LRA

2024-11-02 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #418 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #417) > I haven't been able to find any regressions. Thus, my suggestion would be to > clean the patches up now and get them merged if that's okay. > > This

[Bug target/55212] [SH] Switch to LRA

2024-10-26 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #414 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #410) > Created attachment 59432 [details] > a trial patch for c#404 > > It's difficult to see what is going on, because the test case is too huge. > Looking at the p

[Bug target/55212] [SH] Switch to LRA

2024-10-26 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #413 from Oleg Endo --- Created attachment 59442 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59442&action=edit Reduced test case for comment #405 (In reply to John Paul Adrian Glaubitz from comment #405) > File too large to

[Bug target/55212] [SH] Switch to LRA

2024-10-24 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #411 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #409) > (In reply to Oleg Endo from comment #407) > > (In reply to John Paul Adrian Glaubitz from comment #406) > > > (In reply to John Paul Adrian Glaubitz f

[Bug target/55212] [SH] Switch to LRA

2024-10-22 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #408 from Oleg Endo --- Maybe it would be good to override TARGET_DIFFERENT_ADDR_DISPLACEMENT_P on SH, too? https://gcc.gnu.org/pipermail/gcc-patches/2024-October/666155.html

[Bug target/55212] [SH] Switch to LRA

2024-10-22 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #407 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #406) > (In reply to John Paul Adrian Glaubitz from comment #405) > > File too large to be attached, so uploading it here: > > > > https://people.debian.org/

[Bug target/55212] [SH] Switch to LRA

2024-10-17 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #403 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #402) > I've opened PR 117182 for a wrong fldi0/1 issue. Looks target + RA issue. > > FYI, with the patches in PR 116932, PR 117111 and PR 117182 on top of > devel/sh

[Bug target/117182] [SH] fldi0/1 generated in the wrong fp mode

2024-10-17 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117182 --- Comment #6 from Oleg Endo --- Thanks! I've added the patch to the stash https://github.com/olegendo/gcc/tree/devel/sh-lra

[Bug target/117182] [SH] fldi0/1 generated in the wrong fp mode

2024-10-16 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117182 Oleg Endo changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug target/117182] [SH] fldi0/1 generated in the wrong fp mode

2024-10-16 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117182 --- Comment #1 from Oleg Endo --- Maybe related PR 115948 ??

[Bug target/55212] [SH] Switch to LRA

2024-10-15 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #401 from Oleg Endo --- It seems there is a silent wrong-code bug somewhere when building some Dreamcast projects with LRA and LTO enabled. It results in wrong graphics being output. So far could not isolate the wrong-code though.

[Bug target/117111] [SH] delay slot is filled with wrong instruction

2024-10-14 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117111 --- Comment #6 from Oleg Endo --- (In reply to Jeffrey A. Law from comment #5) > reorg splits insns because doing so gives more opportunities to fill delay > slot, particularly when the asm-output step would generate multiple > instructions for

[Bug target/55212] [SH] Switch to LRA

2024-10-14 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #400 from Oleg Endo --- There was a latent issue that popped up as PR 113533 -- the cost estimation of sh_rtx_costs for mem loads/stores were a bit distorted. I've rebased the LRA devel branch https://github.com/olegendo/gcc/tree/de

[Bug rtl-optimization/113533] Code generation regression after change for pr111267

2024-10-14 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113533 --- Comment #21 from Oleg Endo --- The core issue should be fixed now, but I'd like to keep this one open, as there were some things mentioned which I wanted to look into later (insn cost target hook etc).

[Bug target/64036] [SH] Evaluate re-enabling scheduling before RA

2024-10-13 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64036 Oleg Endo changed: What|Removed |Added Last reconfirmed||2024-10-14 Status|UNCONFIRMED

[Bug target/55212] [SH] Switch to LRA

2024-10-13 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #399 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #398) > > Just to confirm: Oleg's tree currently bootstraps fine for me for all tested > languages (didn't test D and Rust). Thanks for checking. > > I ha

[Bug target/117111] [SH] delay slot is filled with wrong instruction

2024-10-13 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117111 --- Comment #4 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #3) > Created attachment 59330 [details] > a trial patch > > This patch disables the above splitter after machine reorg pass so to hide > it from dbr_schedule. I thoug

[Bug target/117111] [SH] delay slot is filled with wrong instruction

2024-10-12 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117111 Oleg Endo changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug target/70989] [SH] Further improve utilization of zero-displacement conditional branches

2024-10-10 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70989 Oleg Endo changed: What|Removed |Added Last reconfirmed||2024-10-11 Status|UNCONFIRMED

[Bug target/116932] [SH] GBR not used for some atomic imask/tcb insns

2024-10-10 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116932 Oleg Endo changed: What|Removed |Added Last reconfirmed||2024-10-11 Status|UNCONFIRMED

[Bug target/55212] [SH] Switch to LRA

2024-10-10 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #395 from Oleg Endo --- There was a recent commit in PR 116650, which looks related. I've updated (rebased) https://github.com/olegendo/gcc/tree/devel/sh-lra Maybe these commits can be somehow modified/reduced "SH: Try to workaround

[Bug target/55212] [SH] Switch to LRA

2024-10-10 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #394 from Oleg Endo --- The patch https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665033.html for PR 116550 might be relevant here, too.

[Bug target/55212] [SH] Switch to LRA

2024-10-10 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #393 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #392) > Created attachment 59309 [details] > a patch to fix pr55212-c384.C on devel/sh-lra Thanks so much for looking into it. Yes, insn matching order is important,

[Bug target/117036] New: [SH] add __builtin_sh_fsca, __builtin_sh_fsrra

2024-10-08 Thread olegendo at gcc dot gnu.org via Gcc-bugs
: target Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target Milestone: --- Currently the compiler will convert std::sin, std::cos, 1/std::sqrt into fsca and fsrra instruction when e.g. --fast-math is enabled. However, there are cases where

[Bug target/55212] [SH] Switch to LRA

2024-10-08 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #387 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #386) > (In reply to Kazumoto Kojima from comment #374) > > Created attachment 59286 [details] > > a patch for c#367 > > > > We use movsf_ie as a fall-back f

[Bug target/55212] [SH] Switch to LRA

2024-10-07 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #385 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #383) > (In reply to Oleg Endo from comment #382) > > Instead of ... > > > > && REG_P (operands[1]) && REGNO (operands[1]) == R0_REG" > > > > ... could we also write

[Bug target/55212] [SH] Switch to LRA

2024-10-06 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #382 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #381) > (In reply to John Paul Adrian Glaubitz from comment #378) > > I just tried a full bootstrap using that tree with all languages but Rust > > and Go enabled and i

[Bug target/55212] [SH] Switch to LRA

2024-10-06 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #379 from Oleg Endo --- (In reply to Oleg Endo from comment #375) > > I've updated my branch https://github.com/olegendo/gcc/commits/devel/sh-lra/ > > Testsuite results pending. Comparing latest commit 90d5d797 (LRA enabled) vs. "S

[Bug target/55212] [SH] Switch to LRA

2024-10-05 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #376 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #374) > Created attachment 59286 [details] > a patch for c#367 > > We use movsf_ie as a fall-back for for moving fp-reg from/to multiword > subreg in 59190. Looks thi

[Bug target/55212] [SH] Switch to LRA

2024-10-05 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #375 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #374) > Created attachment 59286 [details] > a patch for c#367 > > We use movsf_ie as a fall-back for for moving fp-reg from/to multiword > subreg in 59190. Looks thi

[Bug target/55212] [SH] Switch to LRA

2024-10-03 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #371 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #370) > I can also confirm that Kaz' sh-lra-take3 branch fixes the build of Python > 3.13 which fails to build with the usual register starving problem from >

[Bug target/55212] [SH] Switch to LRA

2024-10-03 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #369 from Oleg Endo --- (In reply to Oleg Endo from comment #346) > > ... I've noticed that this is the same as the existing > MAYBE_BASE_REGISTER_RTX_P. > > I've inserted a patch into the stash to tighten all the existing memory >

[Bug target/55212] [SH] Switch to LRA

2024-10-01 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 Oleg Endo changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug target/116932] New: [SH] GBR not used for some atomic imask/tcb insns

2024-10-01 Thread olegendo at gcc dot gnu.org via Gcc-bugs
Component: target Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target Milestone: --- While working on PR 55212, I've noticed that some of the atomic insns from the pr64661 tests do not use GBR addressing, while some do use it. __Z9test_36_1v:

[Bug target/55212] [SH] Switch to LRA

2024-10-01 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #364 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #345) > (In reply to Oleg Endo from comment #341) > > Do you have any idea how that might work? The only thing I can think of > > right now is to remove R0 from list o

[Bug target/55212] [SH] Switch to LRA

2024-09-30 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #361 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #360) > > I think that it's an issue for call insns not for normal insns. As reported > in c#276, LRA handles call insns specially, and it seems to be an argument > a

[Bug target/55212] [SH] Switch to LRA

2024-09-30 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #354 from Oleg Endo --- Kaz, I just spotted one LRA related thing on the ML https://gcc.gnu.org/pipermail/gcc-regression/2024-August/080509.html https://github.com/gcc-mirror/gcc/commit/3c67a0fa1dd39a3378deb854a7fef0ff7fe38004 Could

[Bug target/55212] [SH] Switch to LRA

2024-09-29 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #349 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #345) > (In reply to Oleg Endo from comment #341) > > Do you have any idea how that might work? The only thing I can think of > > right now is to remove R0 from list o

[Bug target/116894] [SH] c++ std::cout sh-sim bus error (unaligned access)

2024-09-29 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116894 Oleg Endo changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug target/116894] New: [SH] c++ std::cout sh-sim bus error (unaligned access)

2024-09-29 Thread olegendo at gcc dot gnu.org via Gcc-bugs
Component: target Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target Milestone: --- The following simple C++ program: - #include int main (void) { std::cout << test moon c++" << std::endl; re

[Bug target/55212] [SH] Switch to LRA

2024-09-29 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #348 from Oleg Endo --- (In reply to Oleg Endo from comment #346) > > Anyway, it seems after tightening the memory predicates and constraints, > some of the previously added things become redundant. See follow up patch > > https://

[Bug target/55212] [SH] Switch to LRA

2024-09-29 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #346 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #343) > > Yes. The wrong instruction > > mov.b @(5,fpul),r0! 517 [c=2 l=2] *movqi/8 > > is generated with *movqi insn which is defined by > > (define

[Bug target/55212] [SH] Switch to LRA

2024-09-28 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #342 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #339) > /home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/build-soup3/ > JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-36.cpp > (

[Bug target/55212] [SH] Switch to LRA

2024-09-28 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #341 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #338) > (In reply to Oleg Endo from comment #337) > > (In reply to Kazumoto Kojima from comment #334) > > > Created attachment 59216 [details] > > > a patch to fix ICE

[Bug target/55212] [SH] Switch to LRA

2024-09-28 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #337 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #334) > Created attachment 59216 [details] > a patch to fix ICE in c#331 > > The patch preallocates R0 for those Sid memory patterns so as to shorten the > live range

[Bug target/55212] [SH] Switch to LRA

2024-09-28 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #336 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #335) > FWIW, the backend has improved quite a lot over the past weeks. The > Dreamcast people reported good results as well! As for the Dreamcast people, t

[Bug rtl-optimization/116713] [SH] __builtin_prefetch can't be used for store queues

2024-09-26 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116713 --- Comment #9 from Oleg Endo --- (In reply to Andrew Pinski from comment #8) > See > https://gcc.gnu.org/legacy-ml/gcc-patches/2009-05/msg01233.html > and > https://gcc.gnu.org/legacy-ml/gcc-patches/2009-09/msg00130.html Nice find! Yeah, same

[Bug target/116713] [SH] __builtin_prefetch can't be used for store queues

2024-09-26 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116713 --- Comment #6 from Oleg Endo --- (In reply to pietro from comment #5) > Created attachment 59210 [details] > Add a blockage instruction before the prefetch > > I did a few tests on sh4-elf and adding a blockage before the prefetch keeps > the

[Bug target/56592] [SH] Add vector ABI

2024-09-26 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56592 --- Comment #5 from Oleg Endo --- (In reply to Oleg Endo from comment #0) > In order to > minimize mode switches the function signature can be taken into account when > deciding the default FPU precision for a particular function. E.g. when a >

[Bug target/116713] [SH] __builtin_prefetch can't be used for store queues

2024-09-26 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116713 --- Comment #4 from Oleg Endo --- (In reply to pietro from comment #3) > It looks like it's a more general GCC issue. The prefetch gets moved on both > x86_64 and aarch64 on GCC, but not on clang: https://godbolt.org/z/Ycjr7Tq8b > > > It looks

[Bug target/29845] sh floating point emulation is inefficient

2024-09-25 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29845 Oleg Endo changed: What|Removed |Added CC||olegendo at gcc dot gnu.org --- Comment #14

[Bug target/70989] [SH] Further improve utilization of zero-displacement conditional branches

2024-09-25 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70989 Oleg Endo changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug target/106167] Missed optimization (memory vs register read)

2024-09-25 Thread olegendo at gcc dot gnu.org via Gcc-bugs
|1 CC||olegendo at gcc dot gnu.org Last reconfirmed||2024-09-26 --- Comment #1 from Oleg Endo --- I've tried it on latest GCC-15 and can confirm the issue.

[Bug rtl-optimization/69765] [SH] Addidional reg copies when compiling with LRA

2024-09-25 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69765 --- Comment #1 from Oleg Endo --- Tried this case on GCC-15 branch https://github.com/olegendo/gcc/tree/devel/sh-lra and it seems to be not a problem anymore, regardless of LRA or no LRA usage. Should be added as a test case.

[Bug target/83464] [SH] ICE: in final_scan_insn, at final.c:3025 with -mlra

2024-09-25 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83464 Oleg Endo changed: What|Removed |Added CC||olegendo at gcc dot gnu.org --- Comment #8

[Bug target/67732] [SH] Strange LRA addsi3 usage

2024-09-25 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67732 Oleg Endo changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug target/55212] [SH] Switch to LRA

2024-09-25 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #330 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #325) > > Our movsf logic for LRA doesn't handle these well. If these reg from/to > subreg of SImode move is splitted with fpul, it will cause some very bad > code or

[Bug target/116709] [SH] fp values ferried through fpul

2024-09-25 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116709 Oleg Endo changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug rtl-optimization/116849] [SH] Redundant fp mode switch at function entry

2024-09-25 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116849 Oleg Endo changed: What|Removed |Added Target||sh*-*-* Status|UNCONFIRMED

[Bug rtl-optimization/116849] New: [SH] Redundant fp mode switch at function entry

2024-09-25 Thread olegendo at gcc dot gnu.org via Gcc-bugs
: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target Milestone: --- The following example, when compiled as C (not as C++) on sh-elf with -O2 -m4-single --- typedef _Complex float tuplef_t; static inline tuplef_t

[Bug target/55212] [SH] Switch to LRA

2024-09-25 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #329 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #326) > Created attachment 59190 [details] > a quick fix for c#318 > > This also reverts the change in c#312 and gives another fix for that issue. > Tested only with t

[Bug target/55212] [SH] Switch to LRA

2024-09-24 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #323 from Oleg Endo --- I've tried getting some code size numbers from CSiBE comparision for 'sh-elf-gcc -m4-single -O2' with the devel/sh-lra branch. The numbers are code size in bytes with -mno-lra and -mlra OpenTCP-1.0.4

[Bug target/116836] New: [SH] Unknown FPU mode switch state for inline-asm blocks

2024-09-24 Thread olegendo at gcc dot gnu.org via Gcc-bugs
Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: olegendo at gcc dot gnu.org Target Milestone: --- Currently the FPU mode-switching does not take into account inline-asm blocks. As a result it's difficult to make sure that the FPU

[Bug target/55212] [SH] Switch to LRA

2024-09-24 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #322 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #316) > (In reply to Oleg Endo from comment #314) > > Can you please add the patch to your github branch? > > I would like to ask some Dreamcast folks to try and test t

[Bug target/115949] [SH] unrecognized insn in postreload (movsi_ie gets wrong fp reg operand)

2024-09-24 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115949 --- Comment #6 from Oleg Endo --- I've tried this on the devel/sh-lra branch with sh-elf-gcc -c -O3 -m4-single -mfsrra -mfsca -ffast-math The issue still persists.

[Bug target/113193] [SH] ICE in gen_reg_rtx, at emit-rtl.cc:1177 with -mfcsa -funsafe-math-operations

2024-09-24 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113193 --- Comment #2 from Oleg Endo --- I've tried compiling this case with sh-elf-gcc -m4-single -O3 -std=c++20 -c -mfsca -funsafe-math-optimizations on devel/sh-lra branch -- the issue still persists

[Bug target/112116] SH4 ICE: in extract_constrain_insn, at recog.cc:2692 with -mlra (VMULCD)

2024-09-24 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112116 Oleg Endo changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug target/112115] SH4 ICE: in extract_constrain_insn, at recog.cc:2692 with -mlra (VMUBEEP)

2024-09-24 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112115 Oleg Endo changed: What|Removed |Added CC||olegendo at gcc dot gnu.org

[Bug target/55212] [SH] Switch to LRA

2024-09-24 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #315 from Oleg Endo --- (In reply to Alexandre Oliva from comment #277) > Created attachment 59153 [details] > [lra] take scratch as implicit unused output reloads > > > * call_pcrel patterns: match_scratch can cause ICE for the corn

[Bug target/55212] [SH] Switch to LRA

2024-09-24 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #314 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #312) > (In reply to John Paul Adrian Glaubitz from comment #298) > > Here is one ICE I have run into while building webkit2gtk with the latest > > patches on top of an

[Bug target/55212] [SH] Switch to LRA

2024-09-22 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #308 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #305) > (In reply to Oleg Endo from comment #304) > > I think this is a bit clearer, thanks! One more question > > > > (define_insn "block_lump_real" > > [(se

[Bug target/55212] [SH] Switch to LRA

2024-09-21 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #304 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #302) > > Yes, that's what I suppose. If the operands of that pattern match with > another registers, the instruction with the operands[2-4] other than r4-r6 > would

[Bug target/55295] [SH] Add support for fipr instruction

2024-09-21 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55295 --- Comment #18 from Oleg Endo --- A rather recent case and request to add a __builtin_fipr function, when trying to optimize quaternion multiplication. This one includes hand-written inline asm and register pre-allocation. https://godbolt.org/

[Bug target/55212] [SH] Switch to LRA

2024-09-21 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #300 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #297) > > > > && REG_P (operands[2]) && REGNO (operands[2]) == R4_REG > > > && REG_P (operands[3]) && REGNO (operands[3]) == R5_REG > > > && REG_P (operands[4])

[Bug target/55212] [SH] Switch to LRA

2024-09-21 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #296 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #295) > (In reply to Kazumoto Kojima from comment #285) > > (In reply to Oleg Endo from comment #284) > > > (In reply to Kazumoto Kojima from comment #283) > > ... > >

[Bug target/55212] [SH] Switch to LRA

2024-09-20 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #284 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #283) > (In reply to Kazumoto Kojima from comment #276) > > Current my assumption on the sfunc issue: LRA doesn't handle the clobber > > hard reg pattern if that hard r

[Bug target/116713] [SH] __builtin_prefetch can't be used for store queues

2024-09-19 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116713 Oleg Endo changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug target/81426] [SH]: unable to find a register to spill in class 'R0_REGS' when building webkit2gtk

2024-09-19 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426 --- Comment #17 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #16) > It does. However, I'm currently having unreleated problems with CMake which > means I cannot build the whole project at the moment. I need to debug tha

[Bug target/81426] [SH]: unable to find a register to spill in class 'R0_REGS' when building webkit2gtk

2024-09-19 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426 --- Comment #15 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #14) > This particular bug is resolved when building with an LRA-enabled gcc-15. > > See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 That's great! I

[Bug target/55212] [SH] Switch to LRA

2024-09-17 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 --- Comment #264 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #263) > Created attachment 59132 [details] > a patch rewriting movsh_ie_ra > > This patch splits movsf_ie_ra into several new patterns to remove > match_scratch. Also

[Bug target/115148] [12/13/14/15 Regression][SH]: libcanberra fails with 'unaligned opcodes detected in executable segment' since r12-5944-ga7acb6dca941db

2024-09-17 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115148 --- Comment #19 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #18) > This particular bug is resolved when building with an LRA-enabled gcc-15. > > See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212 Thanks for chec

  1   2   3   4   5   6   7   8   9   10   >