Re: [x86_64 PATCH] Allow any immediate constant in *cmp_doubleword splitter.

2022-08-06 Thread Uros Bizjak via Gcc-patches
On Fri, Aug 5, 2022 at 3:14 PM Roger Sayle wrote: > > > This patch tweaks i386.md's *cmp_doubleword splitter's predicate to > allow general_operand, not just x86_64_hilo_general_operand, to improve > code generation. As a general rule, i386.md's _doubleword splitters should > be post-reload split

[PATCH] c++: Extend -Wredundant-move for const-qual objects [PR90428]

2022-08-06 Thread Marek Polacek via Gcc-patches
In this PR, Jon suggested extending the -Wredundant-move warning to warn when the user is moving a const object as in: struct T { }; T f(const T& t) { return std::move(t); } where the std::move is redundant, because T does not have a T(const T&&) constructor (which is very unlikely).

[PING^6] nvptx: forward '-v' command-line option to assembler, linker

2022-08-06 Thread Thomas Schwinge
Hi Tom! Ping. Grüße Thomas On 2022-07-27T17:48:46+0200, I wrote: > Hi Tom! > > Ping. > > > Grüße > Thomas > > > On 2022-07-20T14:44:36+0200, I wrote: >> Hi Tom! >> >> Ping. >> >> >> Grüße >> Thomas >> >> >> On 2022-07-13T10:41:23+0200, I wrote: >>> Hi Tom! >>> >>> Ping. >>> >>> >>> Grüße >>

[PING^5] nvptx: Allow '--with-arch' to override the default '-misa' (was: nvptx multilib setup)

2022-08-06 Thread Thomas Schwinge
Hi Tom! Ping. Grüße Thomas On 2022-07-27T17:48:58+0200, I wrote: > Hi Tom! > > Ping. > > > Grüße > Thomas > > > On 2022-07-20T14:46:03+0200, I wrote: >> Hi Tom! >> >> Ping. >> >> >> Grüße >> Thomas >> >> >> On 2022-07-13T10:42:44+0200, I wrote: >>> Hi Tom! >>> >>> Ping. >>> >>> >>> Grüße >>

[PATCH] RISC-V: Use the X iterator for eh_set_lr_{si,di}

2022-08-06 Thread Palmer Dabbelt
These two patterns were independent, but exactly match the semantics of X. Replace them with a single paramaterized pattern. Thanks to Andrew for pointing this one out over IRC. gcc/ChangeLog * config/riscv/riscv.md (eh_set_lr_): New pattern. (eh_set_lr_si): Remove. (eh_

[PATCH] RISC-V: Fix the sge ..., x0, ... pattern

2022-08-06 Thread Palmer Dabbelt
There's no operand 2 here, so referencing it doesn't make sense. I couldn't find a way to trigger bad assembly output so I don't have a test. gcc/ChangeLog PR target/106543 * config/riscv/riscv.md (sge_): Remove reference to non-existent operand. --- No new failures on th

Re: [PATCH] c-family: Honor -Wno-init-self for cv-qual vars [PR102633]

2022-08-06 Thread Jason Merrill via Gcc-patches
On 7/26/22 14:31, Marek Polacek wrote: On Tue, Jul 26, 2022 at 04:24:18PM -0400, Jason Merrill wrote: On 7/26/22 15:03, Marek Polacek wrote: Since r11-5188-g32934a4f45a721, we drop qualifiers during l-to-r conversion by creating a NOP_EXPR. For e.g. const int i = i; that means that the D

Re: [PATCH] gimple, internal-fn: Add IFN_TRAP and use it for __builtin_unreachable [PR106099]

2022-08-06 Thread Jason Merrill via Gcc-patches
On 7/27/22 03:09, Richard Biener wrote: On Wed, 27 Jul 2022, Jakub Jelinek wrote: On Wed, Jul 27, 2022 at 09:33:47AM +, Richard Biener wrote: __builtin_unreachable and __ubsan_handle_builtin_unreachable don't use vops, they are marked const/leaf/noreturn/nothrow/cold. But __builtin_trap us

Re: [PATCH] c++, v4: Add support for __real__/__imag__ modifications in constant expressions [PR88174]

2022-08-06 Thread Jason Merrill via Gcc-patches
On 7/27/22 02:09, Jakub Jelinek wrote: On Tue, Jul 05, 2022 at 04:44:41PM -0400, Jason Merrill wrote: But preeval should always be true, so we'd never reach the new handling in the if (!preeval) block. Certainly the new testcase doesn't exercise this code. Ok, changed now. I had to keep the

Re: [PATCH] c++: Extend -Wpessimizing-move for class prvalues [PR106276]

2022-08-06 Thread Jason Merrill via Gcc-patches
On 7/27/22 17:14, Marek Polacek wrote: We already have a warning that warns about pessimizing std::move in a return statement, when it prevents the NRVO: T fn() { T t; return std::move (t); // warning \o/ } However, the warning doesn't warn when what we are returning is a cla

Re: [PATCH] c++: Tweak for -Wpessimizing-move in templates [PR89780]

2022-08-06 Thread Jason Merrill via Gcc-patches
On 8/4/22 11:46, Marek Polacek wrote: In my previous patches I've been extending our std::move warnings, but this tweak actually dials it down a little bit. As reported in bug 89780, it's questionable to warn about expressions in templates that were type-dependent, but aren't anymore because we'

Re: [PATCH] c++: Extend -Wpessimizing-move for class prvalues [PR106276]

2022-08-06 Thread Jason Merrill via Gcc-patches
On 8/6/22 15:49, Jason Merrill wrote: On 7/27/22 17:14, Marek Polacek wrote: We already have a warning that warns about pessimizing std::move in a return statement, when it prevents the NRVO:    T fn()    { T t; return std::move (t); // warning \o/    } However, the warning doesn't w

Re: [PATCH] c++: Extend -Wredundant-move for const-qual objects [PR90428]

2022-08-06 Thread Jason Merrill via Gcc-patches
On 8/6/22 11:13, Marek Polacek wrote: In this PR, Jon suggested extending the -Wredundant-move warning to warn when the user is moving a const object as in: struct T { }; T f(const T& t) { return std::move(t); } where the std::move is redundant, because T does not have a T(con