[PATCH] Match: Improve inverted_equal_p for bool and `^` and `==` [PR113186]

2023-12-31 Thread Andrew Pinski
For boolean types, `a ^ b` is a valid form for `a != b`. This means for gimple_bitwise_inverted_equal_p, we catch some inverted value forms. This patch extends inverted_equal_p to allow matching of `^` with the corresponding `==`. Note in the testcase provided we used to optimize in GCC 12 to just

Re: Ping^3: [PATCH] Add a late-combine pass [PR106594]

2023-12-31 Thread YunQiang Su
Richard Sandiford 于2023年12月30日周六 23:35写道: > > Ping^3 > I am testing it on MIPS. > --- a/gcc/common/config/aarch64/aarch64-common.cc > +++ b/gcc/common/config/aarch64/aarch64-common.cc > @@ -55,6 +55,7 @@ static const struct default_options > aarch_option_optimization_table[] = > {

Re: [PATCH v9 2/2] Add gcov MC/DC tests for GDC

2023-12-31 Thread Iain Buclaw
Excerpts from Jørgen Kvalsvik's message of Dezember 31, 2023 4:51 pm: > This is a mostly straight port from the gcov-19.c tests from the C test > suite. The only notable differences from C to D are that D flips the > true/false outcomes for loop headers, and the D front end ties loop and > ternary

[PATCH] LoongArch: Provide fmin/fmax RTL pattern for vectors

2023-12-31 Thread Xi Ruoyao
We already had smin/smax RTL pattern using vfmin/vfmax instructions. But for smin/smax, it's unspecified what will happen if either operand contains any NaN operands. So we would not vectorize the loop with -fno-finite-math-only (the default for all optimization levels expect -Ofast). But,

Re: [PATCH] RISC-V: Count pointer type SSA into RVV regs liveness for dynamic LMUL cost model

2023-12-31 Thread Jeff Law
On 12/28/23 18:21, Juzhe-Zhong wrote: This patch fixes the following choosing unexpected big LMUL which cause register spillings. Before this patch, choosing LMUL = 4: addisp,sp,-160 addiw t1,a2,-1 li a5,7 bleut1,a5,.L16 vsetivli

Re: [PATCH v4] RISC-V: Adds the prefix "th." for the instructions of XTheadVector.

2023-12-31 Thread Jeff Law
On 12/28/23 21:19, Jun Sha (Joshua) wrote: This patch adds th. prefix to all XTheadVector instructions by implementing new assembly output functions. We only check the prefix is 'v', so that no extra attribute is needed. gcc/ChangeLog: * config/riscv/riscv-protos.h

Re: [PATCH] Pass GUILE down to subdirectories

2023-12-31 Thread Jeff Law
On 12/30/23 14:21, Tom Tromey wrote: When I enable cgen rebuilding in the binutils-gdb tree, the default is to run cgen using 'guile'. However, on my host, guile is guile 2.2, which doesn't work for me -- I have to use guile3.0. This patch arranges to pass "GUILE" down to subdirectories, so

Re: [PATCH] libstdc++ testsuite/std/ranges/iota/max_size_type.cc: Reduce /10 for simulators

2023-12-31 Thread Hans-Peter Nilsson
On Sat, 30 Dec 2023, Hans-Peter Nilsson wrote: > On Sat, 30 Dec 2023, Jonathan Wakely wrote: > > > On Sat, 30 Dec 2023, 01:41 Hans-Peter Nilsson, wrote: > > > Or perhaps the cause is known? > > > > Not to me. It probably is a target codegen bug, since all this test really > > does is emulate a

Re: [x86_PATCH] peephole2 to resolve failure of gcc.target/i386/pr43644-2.c

2023-12-31 Thread Uros Bizjak
On Sun, Dec 31, 2023 at 4:56 PM Roger Sayle wrote: > > > Hi Uros, > > > From: Uros Bizjak > > Sent: 28 December 2023 10:33 > > On Fri, Dec 22, 2023 at 11:14 AM Roger Sayle > > wrote: > > > > > > This patch resolves the failure of pr43644-2.c in the testsuite, a > > > code quality test I added

[middle-end PATCH take #2] Only call targetm.truly_noop_truncation for truncations.

2023-12-31 Thread Roger Sayle
Very many thanks (and a Happy New Year) to the pre-commit patch testing folks at linaro.org. Their testing has revealed that although my patch is clean on x86_64, it triggers some problems on aarch64 and arm. The issue (with the previous version of my patch) is that these platforms require a

RE: [x86_PATCH] peephole2 to resolve failure of gcc.target/i386/pr43644-2.c

2023-12-31 Thread Roger Sayle
Hi Uros, > From: Uros Bizjak > Sent: 28 December 2023 10:33 > On Fri, Dec 22, 2023 at 11:14 AM Roger Sayle > wrote: > > > > This patch resolves the failure of pr43644-2.c in the testsuite, a > > code quality test I added back in July, that started failing as the > > code GCC generates for

[PATCH v9 2/2] Add gcov MC/DC tests for GDC

2023-12-31 Thread Jørgen Kvalsvik
This is a mostly straight port from the gcov-19.c tests from the C test suite. The only notable differences from C to D are that D flips the true/false outcomes for loop headers, and the D front end ties loop and ternary conditions to slightly different locus. The test for >64 conditions warning

Re: [PATCH v7] Add condition coverage (MC/DC)

2023-12-31 Thread Richard Biener
> Am 31.12.2023 um 11:20 schrieb Jørgen Kvalsvik : > > On 31/12/2023 10:40, Jan Hubicka wrote: This seems good. Profile-arcs is rarely used by itself - most of time it is implied by -fprofile-generate and -ftest-coverage and since condition coverage is more associated to the

Re: [PATCH v7] Add condition coverage (MC/DC)

2023-12-31 Thread Jørgen Kvalsvik
On 31/12/2023 10:40, Jan Hubicka wrote: This seems good. Profile-arcs is rarely used by itself - most of time it is implied by -fprofile-generate and -ftest-coverage and since condition coverage is more associated to the second, I guess -fcondition-coverage is better name. Since

Re: [PATCH v7] Add condition coverage (MC/DC)

2023-12-31 Thread Jan Hubicka
> > This seems good. Profile-arcs is rarely used by itself - most of time it > > is implied by -fprofile-generate and -ftest-coverage and since > > condition coverage is more associated to the second, I guess > > -fcondition-coverage is better name. > > > > Since -fcondition-coverage now affects