Re: [PATCH][RFC] phiopt: Optimize A < 0 ? ARG1 OP 2^n-1 : ARG1

2025-06-28 Thread Andrew Pinski
On Sat, Jun 28, 2025, 1:19 PM Jeff Law wrote: > > > On 6/27/25 12:20 PM, Andrew Pinski wrote: > > > > > > > > > I have been trying to most of the phiopt to over to use match and > > simplify (via match.pd patterns). Is there an issue why this can't be a > > match pattern instead? It seems like a

Re: [PATCH][RFC] phiopt: Optimize A < 0 ? ARG1 OP 2^n-1 : ARG1

2025-06-28 Thread Jeff Law
On 6/27/25 12:20 PM, Andrew Pinski wrote: I have been trying to most of the phiopt to over to use match and simplify (via match.pd patterns). Is there an issue why this can't be a match pattern instead? It seems like a good fit too. It should simplify the code added even. I can certai

Re: [PATCH] Add "void debug (tree)"

2025-06-28 Thread H.J. Lu
On Sun, Jun 29, 2025 at 3:42 AM Jeff Law wrote: > > > > On 6/27/25 10:24 PM, H.J. Lu wrote: > > On Sat, Jun 28, 2025 at 12:03 PM Jeff Law wrote: > >> > >> > >> > >> On 6/27/25 5:34 PM, H.J. Lu wrote: > >>> Add "void debug (tree)" to support: > >>> > >>> (gdb) call debug (expr) > >>> >>>

Re: [PATCH] Add "void debug (tree)"

2025-06-28 Thread Jeff Law
On 6/27/25 10:24 PM, H.J. Lu wrote: On Sat, Jun 28, 2025 at 12:03 PM Jeff Law wrote: On 6/27/25 5:34 PM, H.J. Lu wrote: Add "void debug (tree)" to support: (gdb) call debug (expr) unit-size user align:256 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type

Re: [PATCH RFC] libgcc: don't use a weak ref for __cxa_finalize

2025-06-28 Thread Florian Weimer
* Jason Merrill: > Since r10-6069[1] we control the call to __cxa_finalize with > DEFAULT_USE_CXA_ATEXIT, so there's no need to also declare it as a weak > reference; if the target has __cxa_atexit, it must also have __cxa_finalize. I expect that most targets do not need __cxa_finalize. They can

[Ada] Fix PR ada/120854

2025-06-28 Thread Eric Botcazou
This fixes an error recovery issue, whereby the compilation of a string concatenation with an illegal character constant hangs. Tested on x86-64/Linux, applied on the mainline and 15 branch. 2025-06-28 Eric Botcazou PR ada/120854 * sem_eval.adb (Get_String_Val): Be prepared

Re: [PATCH] Add "void debug (tree)"

2025-06-28 Thread Richard Biener
> Am 28.06.2025 um 01:36 schrieb H.J. Lu : > > Add "void debug (tree)" to support: > > (gdb) call debug (expr) > type size >unit-size >user align:256 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type > 0x7fffe99cebd0 >fields double> >X

[patch,avr,applied] Fix ICE PR120856 in split2 with -mno-lra

2025-06-28 Thread Georg-Johann Lay
This is an obvious fix for PR120856. The ICE is relatively recent, and I don't see it in v15. As it occurs when building libgcc with -mno-lra I went ahead and installed a fix. Johann -- AVR: target/120856 - Deny R24:DI in avr_hard_regno_mode_ok with Reload. This fixes an ICE with -mno-lra whe

[PATCH RFC] libgcc: don't use a weak ref for __cxa_finalize

2025-06-28 Thread Jason Merrill
Tested x86_64-pc-linux-gnu. Thoughts? Can someone else test it on a !DEFAULT_USE_CXA_ATEXIT target? -- 8< -- The weak declaration of __cxa_finalize was causing some shared libraries linked with -Wl,--as-needed to omit -lc as a dependency, since a library only used to satisfy a weak reference is

[PATCH] x86: Preserve frame pointer for no_callee_saved_registers attribute

2025-06-28 Thread H.J. Lu
Update functions with no_callee_saved_registers/preserve_none attribute to preserve frame pointer since caller may use it to save the current stack: pushq %rbp movq %rsp, %rbp ... call function ... leave ret If callee changes frame pointer without restoring it, caller will fail to restore its sta

[PATCH v2] RISC-V: Refactor the function bitmap_union_of_preds_with_entry

2025-06-28 Thread Jin Ma
The current implementation of this function is somewhat difficult to understand, as it uses a direct break statement within the for loop, rendering the loop meaningless. Additionally, during the Coverity check on the for loop, a warning appeared: "unreachable: Since the loop increment ix++; is unre

[PATCH] c-family: Check backend for argument alignment on stack

2025-06-28 Thread H.J. Lu
Since a backend may ignore user type alignment for arguments passed on stack, check backend for argument alignment on stack when evaluating __alignof. gcc/c-family/ PR c/89544 * c-common.cc (c_alignof_expr): Check backend for argument alignment on stack. gcc/testsuite/ PR c/89544 * gcc.target/i

Re: [PATCH] c++: Fix up cp_build_array_ref COND_EXPR handling [PR120471]

2025-06-28 Thread Jakub Jelinek
On Fri, Jun 27, 2025 at 06:49:12PM -0400, Jason Merrill wrote: > On 6/27/25 5:58 PM, Jakub Jelinek wrote: > > The following testcase is miscompiled since the introduction of UBSan, > > cp_build_array_ref COND_EXPR handling replaces > > (cond ? a : b)[idx] with cond ? a[idx] : b[idx], but if there a