[Bug target/105733] riscv: Poor codegen for large stack frames

2022-06-06 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105733 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #2

[Bug target/103889] gccgo is unable to find its standard library by default on 64-Bit RISC-V due to musl not using multilib but still uses t-linux

2022-01-03 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103889 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #14

[Bug target/103302] wrong code with -fharden-compares

2021-12-08 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #11 from Jim Wilson --- FYI I have a patch to re-add the movti pattern to riscv.md which should also fix this and another bug. Kito removed the pattern in 2016 and I was hoping to get an answer from him about why he removed it.

[Bug target/103271] ICE in assign_stack_temp_for_type with -ftrivial-auto-var-init=pattern and VLAs and -mno-strict-align on riscv64

2021-12-03 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103271 Jim Wilson changed: What|Removed |Added CC||kito.cheng at gmail dot com --- Comment

[Bug target/103271] ICE in assign_stack_temp_for_type with -ftrivial-auto-var-init=pattern and VLAs and -mno-strict-align on riscv64

2021-12-02 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103271 --- Comment #16 from Jim Wilson --- I have a patch to add movti to the riscv port. I agree that we should be adding this. I just unfortunately had a kitchen accident and had take some time off before I finished it. I noticed that a comment

[Bug target/103271] ICE in assign_stack_temp_for_type with -ftrivial-auto-var-init=pattern and VLAs and -mno-strict-align on riscv64

2021-11-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103271 --- Comment #6 from Jim Wilson --- See also bug 103302 which can also be fixed by adding a movti pattern.

[Bug target/103302] wrong code with -fharden-compares

2021-11-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #4 from Jim Wilson --- See also bug 103271 which can also be fixed by adding a movti pattern.

[Bug target/103271] ICE in assign_stack_temp_for_type with -ftrivial-auto-var-init=pattern and VLAs and -mno-strict-align on riscv64

2021-11-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103271 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #5

[Bug target/103302] wrong code with -fharden-compares

2021-11-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #3 from Jim Wilson --- Maybe the register allocator should remove clobbers of pseudos, instead of turning them into clobbers of hard register pairs. That would eliminate the ambiguity after register allocation. It is also true

[Bug target/103302] wrong code with -fharden-compares

2021-11-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #2

[Bug target/102211] [12 regression] ICE introduced by r12-3277

2021-09-13 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102211 --- Comment #10 from Jim Wilson --- I attached a patch which is my proposed solution to the RISC-V backend. It adds a new f_register_operand predicate and modifies patterns that use the f constraint to use it instead of register_operand. This

[Bug target/102211] [12 regression] ICE introduced by r12-3277

2021-09-13 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102211 --- Comment #9 from Jim Wilson --- Created attachment 51456 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51456=edit proposed RISC-V backend solution

[Bug target/102250] [11/12 Regression] python is not documented as a Prerequisite for building for riscv

2021-09-09 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102250 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #3

[Bug target/102211] [12 regression] ICE introduced by r12-3277

2021-09-08 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102211 --- Comment #5 from Jim Wilson --- I have a WIP fix that lets me build newlib and glibc via riscv-gnu-toolchain. I haven't tried a bootstrap yet. I created a new predicate that uses the small bit of deleted code I need from validate_subregs,

[Bug target/102211] [12 regression] ICE introduced by r12-3277

2021-09-07 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102211 Jim Wilson changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug target/102211] [12 regression] ICE introduced by r12-3277

2021-09-07 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102211 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #4

[Bug tree-optimization/102139] New: -O3 miscompile due to slp-vectorize on strict align target

2021-08-30 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102139 Bug ID: 102139 Summary: -O3 miscompile due to slp-vectorize on strict align target Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal

[Bug middle-end/101996] libatomic: RISC-V 64: Infinite recursion in __atomic_compare_exchange_1

2021-08-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101996 --- Comment #6 from Jim Wilson --- Looking at Alpine Linux discussions, I see that it has a --enable-autolink-libatomic configure option which links in libatomic by default. This could break the libatomic autoconf tests that check to see if

[Bug middle-end/101996] libatomic: RISC-V 64: Infinite recursion in __atomic_compare_exchange_1

2021-08-23 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101996 --- Comment #5 from Jim Wilson --- A riscv-gnu-toolchain build with musl looks OK, so it looks like an Alpine Linux problem.

[Bug middle-end/101996] libatomic: RISC-V 64: Infinite recursion in __atomic_compare_exchange_1

2021-08-23 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101996 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #4

[Bug target/91602] GCC fails to build for riscv in a combined tree due to misconfigured leb128 support

2021-07-19 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91602 --- Comment #14 from Jim Wilson --- I posted a patch but didn't get a review, and then got distracted by other stuff and failed to follow up. https://gcc.gnu.org/pipermail/gcc-patches/2020-January/539461.html

[Bug c/98892] FAIL: gcc.dg/plugin/diagnostic-test-expressions-1.c

2021-06-28 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98892 --- Comment #4 from Jim Wilson --- It turns out that -fmessage-length=0 doesn't work which is odd. I suspect a latent bug in the diagnostic code. I tried -fmessage-length=128, which should work as that is longer than the error line, and does

[Bug c/98892] FAIL: gcc.dg/plugin/diagnostic-test-expressions-1.c

2021-06-26 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98892 --- Comment #3 from Jim Wilson --- On second thought, I don't think that there is anything wrong with dg-*-multiline-output. The problem is simply that the diagnostic code is left shifting the error message by m_x_offset_display, and this left

[Bug c/98892] FAIL: gcc.dg/plugin/diagnostic-test-expressions-1.c

2021-06-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98892 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #2

[Bug rtl-optimization/100264] REE does not work on PARALLEL expressions with a single register SET child

2021-06-02 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100264 Jim Wilson changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug target/86387] [RISCV][ABI] GCC fails to sign/zero-ext integers as necessary for passing/returning int+fp structs on hard-float ABIs

2021-05-05 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86387 Jim Wilson changed: What|Removed |Added Resolution|--- |WONTFIX Status|ASSIGNED

[Bug target/100348] RISC-V extra pointer adjustments for memcpy() from glibc

2021-04-30 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100348 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #1

[Bug target/100348] RISC-V extra pointer adjustments for memcpy() from glibc

2021-04-30 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100348 Jim Wilson changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug target/100316] Regression: __clear_cache() does not support NULL-pointer arguments

2021-04-28 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100316 Jim Wilson changed: What|Removed |Added CC||aoliva at gcc dot gnu.org,

[Bug c/100178] Should the “short” be promoted to “int” when use inline asm?

2021-04-21 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100178 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #1

[Bug libgcc/99964] android(bionic) cannot find crti.o and crtn.o on aarch64

2021-04-07 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99964 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #1

[Bug debug/99090] gsplit-dwarf broken on riscv64-linux

2021-02-26 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99090 --- Comment #5 from Jim Wilson --- I tested it with a riscv-gnu-toolchain build and check. The 4 -gsplit-dwarf testcases that fail without the patch work with the patch. I also tried a build and check with -gsplit-dwarf enabled by default and

[Bug debug/99090] gsplit-dwarf broken on riscv64-linux

2021-02-26 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99090 --- Comment #2 from Jim Wilson --- Yes we could have partial uleb128 support. There is only a problem if at least one label is in the code section. There is another proposed solution to add special relaxable relocations for uleb128 but the

[Bug tree-optimization/94092] Code size and performance degradations after -ftree-loop-distribute-patterns was enabled at -O[2s]+

2021-02-23 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94092 --- Comment #6 from Jim Wilson --- Trying Alex's patch, it doesn't work on this testcase. One problem is that the loop bound is unknown, so the memset size is estimated as max 0x1fffc bytes. The code calls

[Bug target/98981] gcc-10.2 for RISC-V has extraneous register moves

2021-02-18 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98981 --- Comment #5 from Jim Wilson --- Neither of the two patches I mentioned in comment 1 can fix the problem by themselves, as we still have a mix of SImode and DImode operations. I looked at REE. It doesn't work because there is more than one

[Bug target/98981] gcc-10.2 for RISC-V has extraneous register moves

2021-02-17 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98981 --- Comment #4 from Jim Wilson --- With this testcase extern void sub2 (void); void sub (int *i, int *j) { int k = *i + 1; *j = k; if (k == 0) sub2 (); } Compiling without the riscv_rtx_cost patch, I get lw a5,0(a0)

[Bug target/99089] unnecessary zero extend before AND

2021-02-15 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99089 --- Comment #2 from Jim Wilson --- I don't know if REE can do this optimization, but it is a good place to start looking.

[Bug debug/99090] New: gsplit-dwarf broken on riscv64-linux

2021-02-13 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99090 Bug ID: 99090 Summary: gsplit-dwarf broken on riscv64-linux Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug

[Bug target/99089] New: unnecessary zero extend before AND

2021-02-13 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99089 Bug ID: 99089 Summary: unnecessary zero extend before AND Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target

[Bug target/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2021-02-13 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 Jim Wilson changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug rtl-optimization/99067] Missed optimization for induction variable elimination

2021-02-10 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99067 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #1

[Bug target/98981] gcc-10.2 for RISC-V has extraneous register moves

2021-02-05 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98981 --- Comment #3 from Jim Wilson --- I suppose cost model problems could explain why combine didn't do the optimization. I didn't have a chance to look at that. I still think there is a fundmental problem with how we represent SImode operations,

[Bug target/98981] gcc-10.2 for RISC-V has extraneous register moves

2021-02-05 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98981 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #1

[Bug target/98596] registers not reused on RISC-V

2021-01-13 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98596 Jim Wilson changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug target/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-12-17 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #52 from Jim Wilson --- I did some simple testing of my patch alone. I modified the riscv-gnu-toolchain makefile to use -Os to build all libraries, built a rv32imac/ilp32 toolchain, and looked at library code size. I see a few

[Bug target/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-12-15 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #51 from Jim Wilson --- Created attachment 49773 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49773=edit untested fix to use instead of levy's combine.c patch Needs testing without Levy's patch to make sure it doesn't

[Bug target/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-12-15 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #50 from Jim Wilson --- The combine change is inconvenient. We can't do that in stage3, and it means we need to make sure that this doesn't break other targets. If the combine change is a good idea, then I think you can just modify

[Bug middle-end/98227] [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'constructor' in get_section, at varasm.c:297 on riscv64-linux-gnu

2020-12-12 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98227 --- Comment #5 from Jim Wilson --- My bootstrap with ada succeeded. I used the same configure options except for --prefix. make check is still running.

[Bug middle-end/98227] [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'constructor' in get_section, at varasm.c:297 on riscv64-linux-gnu

2020-12-11 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98227 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #4

[Bug target/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-11-19 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #42 from Jim Wilson --- riscv_address_cost is a hook, so it is targetm.address_cost which is only called from address_cost which is only called in a few places one of which is in postreload.c so that is the one I would look at first.

[Bug target/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-11-18 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #40 from Jim Wilson --- If you look at riscv.opt you will see that the -mshorten-memrefs option sets the variable riscv_mshorten_memrefs. If you grep for that, you will see that it is used in riscv_address_cost in riscv.c. I

[Bug other/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-11-12 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #35 from Jim Wilson --- By combine issue, are you referring to the regression I mentioned in comment 3 and filed as bug 97747? We can handle that as a separate issue. It should be uncommon. I expect to get much more benefit from

[Bug other/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-11-11 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #33 from Jim Wilson --- I did say that I'm willing to fix code style issues. All major software projects I have worked with have coding style conventions. It makes it easier to maintain a large software base when everything is

[Bug other/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-11-10 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #30 from Jim Wilson --- Looking at your v2 patch, the first verison fails because you are passing mismatched modes to emit_move_insn. The version with gen_lowpart solves that problem, but fails because of infinite recursion. The v4

[Bug middle-end/94083] inefficient soft-float x!=Inf code

2020-11-07 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94083 The original bug report was apparently lost in the sourceware/gcc migration back in the spring and I didn't notice until now. This testcase int foo(void) { volatile float f, g; intn; f = __builtin_huge_valf(); g =

[Bug other/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-11-06 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #21 from Jim Wilson --- I submitted my testcase as 97747 so it will get more attention.

[Bug rtl-optimization/97747] New: missed combine opt with logical ops after zero extended load

2020-11-06 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97747 Bug ID: 97747 Summary: missed combine opt with logical ops after zero extended load Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal

[Bug other/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-11-06 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #20 from Jim Wilson --- Maybe convert_to_mode is recursively calling convert_to_mode until you run out of stack space. You can use --save-temps to generate a .i preprocessed file form your input testcasxe, then run cc1 under gdb.

[Bug other/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-11-05 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #17 from Jim Wilson --- Yes, LOAD_EXTEND_OP is a good suggestion. We can maybe do something like int extend = (LOAD_EXTEND_OP (mode) == ZERO_EXTEND); temp_reg = force_reg (word_mode, convert_to_mode (word_mode, src, extend));

[Bug other/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-11-05 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #15 from Jim Wilson --- I tried testing your first patch. I just built unpatched/patch rv32-elf/rv64-linux toolchains and used nm/objdump to look at libraries like libc, libstdc++, libm. I managed to find a testcase from glibc that

[Bug other/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-11-05 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #14 from Jim Wilson --- Actually, for the SImode to DImode conversion, zero extending is unlikely to be correct in that case. The rv64 'w' instructions require the input to be sign-extended from 32-bits to 64-bits, so a sign-extend

[Bug other/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-11-05 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #13 from Jim Wilson --- The attachments show the entire riscv.c file being deleted and then readded with your change. This is due to a line ending problem. The original file has the unix style linefeed and the new file has the

[Bug other/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-10-29 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #7 from Jim Wilson --- That patch is basically correct. I would suggest using gen_lowpart instead of gen_rtx_SUBREG as a minor cleanup. It will do the same thing, and is shorter and easier to read. There is one problem here that

[Bug other/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-10-27 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #5 from Jim Wilson --- Yes, the volatile is the problem. We need to disable some optimizations like the combiner to avoid breaking the semantics of volatile. However, if you try looking at other ports, like arm, you can see that

[Bug other/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-10-20 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 --- Comment #3 from Jim Wilson --- The basic idea here is that the movqi pattern in riscv.md currently emits RTL for a load that looks like this (set (reg:QI target) (mem:QI (address))) As an experiment, we want to try changing that to

[Bug target/97481] GCC ice when build with RISCV on msys2

2020-10-19 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97481 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #2

[Bug bootstrap/97409] riscv cross toolchain build fails

2020-10-19 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97409 Jim Wilson changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug other/97417] RISC-V Unnecessary andi instruction when loading volatile bool

2020-10-15 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97417 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org

[Bug bootstrap/97409] riscv cross toolchain build fails

2020-10-14 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97409 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #7

[Bug bootstrap/97183] zstd build failure for gcc 10 on Ubuntu 16.04

2020-09-30 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97183 Jim Wilson changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug bootstrap/97183] zstd build failure for gcc 10 on Ubuntu 16.04

2020-09-30 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97183 --- Comment #7 from Jim Wilson --- Fixed on mainline and the gcc-10 branch.

[Bug target/96700] undefined reference to `failure_on_line_796'

2020-09-29 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96700 Jim Wilson changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

[Bug bootstrap/97183] zstd build failure for gcc 10 on Ubuntu 16.04

2020-09-24 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97183 --- Comment #3 from Jim Wilson --- I installed Ubuntu 16.04 on an old laptop so I can directly reproduce the build failure. Checking for the zstd version looks like the easier patch. Checking for specific macros and functions might be better,

[Bug libstdc++/97182] Add support for targets that only define SYS_futex_time64 and not SYS_futex

2020-09-24 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97182 --- Comment #5 from Jim Wilson --- I see that a riscv64-linux libgomp.so has mutex calls and no obvious futex calls. Though I find it a little curious that futex support isn't auto-detected. There is already config/futex.m4 to detect futex

[Bug target/96700] undefined reference to `failure_on_line_796'

2020-09-23 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96700 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #1