[Bug target/106532] riscv fails to build enabling ZBA/ZBB/ZBC/ZBS by default for 32bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106532 --- Comment #12 from David Harris --- Thank you for the speedy discovery and resolution.
[Bug target/106532] riscv fails to build enabling ZBA/ZBB/ZBC/ZBS by default for 32bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106532 Andrew Pinski changed: What|Removed |Added CC||david_harris at hmc dot edu --- Comment #11 from Andrew Pinski --- *** Bug 109687 has been marked as a duplicate of this bug. ***
[Bug target/106532] riscv fails to build enabling ZBA/ZBB/ZBC/ZBS by default for 32bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106532 Andrew Pinski changed: What|Removed |Added CC||iwfinlay at gmail dot com --- Comment #10 from Andrew Pinski --- *** Bug 108284 has been marked as a duplicate of this bug. ***
[Bug target/106532] riscv fails to build enabling ZBA/ZBB/ZBC/ZBS by default for 32bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106532 Kito Cheng changed: What|Removed |Added CC||kito at gcc dot gnu.org --- Comment #9 from Kito Cheng --- HI Andrew: That's would be great if you can back port to GCC 12 branch, and thanks for your quick fix :)
[Bug target/106532] riscv fails to build enabling ZBA/ZBB/ZBC/ZBS by default for 32bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106532 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Target Milestone|--- |13.0 --- Comment #8 from Andrew Pinski --- Fixed for GCC 13 r13-1970-gffe4f55aa1bb18cc2793a4335450f34c33c9d01c If someone wants to backport it for GCC 12. Be my guest.
[Bug target/106532] riscv fails to build enabling ZBA/ZBB/ZBC/ZBS by default for 32bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106532 --- Comment #7 from Andrew Pinski --- So this has been broken since ZBS support was added in r12-4658-g4e1e0d79ecbe87 . Removing TARGET_64BIT from the check in splittable_const_int_operand fixes this testcase but I have not done any more testing.
[Bug target/106532] riscv fails to build enabling ZBA/ZBB/ZBC/ZBS by default for 32bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106532 --- Comment #6 from Andrew Pinski --- Oh why oh why: /* Check whether the constant can be loaded in a single instruction with zbs extensions. */ if (TARGET_64BIT && TARGET_ZBS && SINGLE_BIT_MASK_OPERAND (INTVAL (op))) return false; But: if (TARGET_ZBS && SINGLE_BIT_MASK_OPERAND (value)) { /* Simply BSETI. */ codes[0].code = UNKNOWN; codes[0].value = value; /* RISC-V sign-extends all 32bit values that live in a 32bit register. To avoid paradoxes, we thus need to use the sign-extended (negative) representation (-1 << 31) for the value, if we want to build (1 << 31) in SImode. This will then expand to an LUI instruction. */ if (mode == SImode && value == (HOST_WIDE_INT_1U << 31)) codes[0].value = (HOST_WIDE_INT_M1U << 31); return 1; }
[Bug target/106532] riscv fails to build enabling ZBA/ZBB/ZBC/ZBS by default for 32bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106532 --- Comment #5 from Andrew Pinski --- Even more reduced (this is why uninitialized variable was needed to form the 2048 :) ): int g (void) { return 2048; }
[Bug target/106532] riscv fails to build enabling ZBA/ZBB/ZBC/ZBS by default for 32bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106532 --- Comment #4 from Andrew Pinski --- Shorter testcase (uninitialized variable is required for the reduced testcase; I don't know why yet): int g (long B_e) { long A_e; if (A_e != 2047) A_e -= 1023; return A_e + 1; }
[Bug target/106532] riscv fails to build enabling ZBA/ZBB/ZBC/ZBS by default for 32bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106532 --- Comment #3 from Andrew Pinski --- Note with a non-modified sources fails with -O2 -march=rv32imac_zba_zbb_zbc_zbs
[Bug target/106532] riscv fails to build enabling ZBA/ZBB/ZBC/ZBS by default for 32bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106532 --- Comment #2 from Andrew Pinski --- Created attachment 53414 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53414&action=edit testcase from -freport-bug
[Bug target/106532] riscv fails to build enabling ZBA/ZBB/ZBC/ZBS by default for 32bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106532 Andrew Pinski changed: What|Removed |Added Severity|normal |blocker Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org --- Comment #1 from Andrew Pinski --- Mine, will debug in a few minutes.