Re: [PATCH] Add a new pattern in 4-insn combine

2021-01-15 Thread Segher Boessenkool
On Mon, Nov 30, 2020 at 11:08:22AM +0800, HAO CHEN GUI wrote: >   This patch adds a new pattern(combine 4 insns to 3 insns) in 4-insn > combine. In the patch, newpat is split twice. The newpat, newi2pat and As I said before, that has a lot of problems, and is only suitable for stage 1 (after man

Re: [PATCH 1/2] nios2: Add -mcustom-fpu-cfg=fph2

2021-01-15 Thread Sandra Loosemore
On 1/14/21 12:16 PM, Sebastian Huber wrote: The new -mcustom-fpu-cfg=fph2 option variant is useful to build a multilib for the "Nios II Floating Point Hardware 2 Component": https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug_nios2_custom_instruction.pdf Directly usin

Re: [PATCH 2/2] RTEMS: Add -mcustom-fpu-cfg=fph2 multilib

2021-01-15 Thread Sandra Loosemore
On 1/14/21 12:16 PM, Sebastian Huber wrote: This multilib supports Nios II configurations with the "Nios II Floating Point Hardware 2 Component". gcc/ * config/nios2/t-rtems: Reset all MULTILIB_* variables. Shorten multilib directory names. Use MULTILIB_REQUIRED instead of

Re: [stage1][PATCH] Change semantics of -frecord-gcc-switches and add -frecord-gcc-switches-format.

2021-01-15 Thread Alexandre Oliva
Hello, Martin, Our testing detected unexpected -dumpbase-ext options making to the producer string. I tracked it down to something weird that happened in this patch: On Dec 4, 2020, Martin Liška wrote: > +++ b/gcc/dwarf2out.c > - case OPT_dumpbase: > - case OPT_dumpbase_ext: > -

Re: [patch] gcc.dg/analyzer tests: relax dependency on alloca.h

2021-01-15 Thread Alexandre Oliva
On Jan 15, 2021, David Malcolm wrote: > I think an issue here was that I assumed check_effective_target_alloca > checks that "alloca" is supported, whereas I now see that I was wrong; > it actually checks for "__builtin_alloca". Yeah, it's a little misleading. And it only tests __builtin_alloca

Re: preprocessor: Make quoting : [PR 95253]

2021-01-15 Thread Nathan Sidwell
I missed some testsuite fall out with my patch to fix mkdeps file mangling. PR preprocessor/95253 gcc/testsuite/ * g++.dg/modules/dep-1_a.C: Adjust expected output. * g++.dg/modules/dep-1_b.C: Likewise. * g++.dg/modules/dep-2.C: Likewise. -- Natha

c++: Fix qualified array-type construction [PR 98538]

2021-01-15 Thread Nathan Sidwell
This was an assert that was too picky. The reason I had to alter array construction was that on stream in, we cannot dynamically determine a type's dependentness. Thus on stream out of the 'problematic' types, we save the dependentness for reconstruction. Fortunately the paths into cp_build_q

Re: Add dg-require-wchars to libstdc++ testsuite

2021-01-15 Thread Jonathan Wakely via Gcc-patches
On Fri, 15 Jan 2021, 16:19 Alexandre Oliva, wrote: > On Jan 15, 2021, Jonathan Wakely wrote: > > > On Thu, 14 Jan 2021, 22:22 Alexandre Oliva, wrote: > >> ... it is definitely the case that the target currently defines wchar_t, > >> and it even offers wchar.h and a lot of (maybe all?) wcs* func

Re: [PATCH] strlen: Return TODO_update_address_taken when memcmp has been optimized [PR96271]

2021-01-15 Thread Richard Biener
On January 15, 2021 7:32:35 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >On the following testcase, handle_builtin_memcmp in the strlen pass >folds >the memcmp into comparison of two MEM_REFs. But nothing triggers >updating >of addressable vars afterwards, so even when the parameters are no >longe

Re: [PATCH] match.pd: Optimize (x < 0) ^ (y < 0) to (x ^ y) < 0 etc. [PR96681]

2021-01-15 Thread Richard Biener
On January 15, 2021 7:25:33 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >This patch simplifies comparisons that test the sign bit xored >together. >If the comparisons are both < 0 or both >= 0, then we should xor the >operands >together and compare the result to < 0, if the comparisons are >differe

Re: [PATCH] match.pd: Generalize the PR64309 simplifications [PR96669]

2021-01-15 Thread Richard Biener
On January 15, 2021 7:38:35 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >The following patch generalizes the PR64309 simplifications, so that >instead >of working only with constants 1 and 1 it works with any two power of >two >constants, and works also for right shift (in that case it rules out >t

Re: [PATCH] strlen: Return TODO_update_address_taken when memcmp has been optimized [PR96271]

2021-01-15 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 15, 2021 at 08:48:32PM +0100, Richard Biener wrote: > On January 15, 2021 7:32:35 PM GMT+01:00, Jakub Jelinek > wrote: > >Hi! > > > >On the following testcase, handle_builtin_memcmp in the strlen pass > >folds > >the memcmp into comparison of two MEM_REFs. But nothing triggers > >upd

Re: [PATCH] match.pd: Generalize the PR64309 simplifications [PR96669]

2021-01-15 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 15, 2021 at 08:50:20PM +0100, Richard Biener wrote: > On January 15, 2021 7:38:35 PM GMT+01:00, Jakub Jelinek > wrote: > >Hi! > > > >The following patch generalizes the PR64309 simplifications, so that > >instead > >of working only with constants 1 and 1 it works with any two power of

Re: [PATCH] strlen: Return TODO_update_address_taken when memcmp has been optimized [PR96271]

2021-01-15 Thread Richard Biener
On January 15, 2021 8:57:39 PM GMT+01:00, Jakub Jelinek wrote: >On Fri, Jan 15, 2021 at 08:48:32PM +0100, Richard Biener wrote: >> On January 15, 2021 7:32:35 PM GMT+01:00, Jakub Jelinek > wrote: >> >Hi! >> > >> >On the following testcase, handle_builtin_memcmp in the strlen pass >> >folds >> >th

Re: [PATCH] match.pd: Generalize the PR64309 simplifications [PR96669]

2021-01-15 Thread Richard Biener
On January 15, 2021 9:03:58 PM GMT+01:00, Jakub Jelinek wrote: >On Fri, Jan 15, 2021 at 08:50:20PM +0100, Richard Biener wrote: >> On January 15, 2021 7:38:35 PM GMT+01:00, Jakub Jelinek > wrote: >> >Hi! >> > >> >The following patch generalizes the PR64309 simplifications, so that >> >instead >>

Re: [PATCH] strlen: Return TODO_update_address_taken when memcmp has been optimized [PR96271]

2021-01-15 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 15, 2021 at 09:16:31PM +0100, Richard Biener wrote: > >Apparently not. The passes after strlen1 are: > >pr96271.c.191t.thread4 > >pr96271.c.192t.vrp2 > >pr96271.c.193t.copyprop5 > >pr96271.c.194t.wrestrict > >pr96271.c.195t.dse4 > >pr96271.c.196t.cddce3 > >pr96271.c.197t.forwprop4 > >p

Re: [PATCH] strlen: Return TODO_update_address_taken when memcmp has been optimized [PR96271]

2021-01-15 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 15, 2021 at 09:31:10PM +0100, Jakub Jelinek via Gcc-patches wrote: > On Fri, Jan 15, 2021 at 09:16:31PM +0100, Richard Biener wrote: > > >Apparently not. The passes after strlen1 are: > > >pr96271.c.191t.thread4 > > >pr96271.c.192t.vrp2 > > >pr96271.c.193t.copyprop5 > > >pr96271.c.194t

Re: [PATCH 1/2] nios2: Add -mcustom-fpu-cfg=fph2

2021-01-15 Thread Sebastian Huber
Hello Sandra, On 15/01/2021 20:12, Sandra Loosemore wrote: The following instructions supported by this component are not enabled by this option: * -mcustom-fmins * -mcustom-fmaxs * -mcustom-round The reason is that these instructions are only in effect in combination with other options. If t

Re: [PATCH][testsuite] (committed) Fix sed script errors in complex tests

2021-01-15 Thread Mike Stump via Gcc-patches
On Jan 15, 2021, at 1:13 AM, Tamar Christina via Gcc-patches wrote: > I ran sed script late over the tests which accidentally > introduced a syntax error in the tests. > > This fixes it. > > Committed under the obvious rule. > > Ok for master? :-) Which is it? Anyway, Ok.

Re: [PATCH] PowerPC: Map IEEE 128-bit long double built-ins.

2021-01-15 Thread Segher Boessenkool
Hi! On Thu, Jan 14, 2021 at 11:59:19AM -0500, Michael Meissner wrote: > >From 78435dee177447080434cdc08fc76b1029c7f576 Mon Sep 17 00:00:00 2001 > From: Michael Meissner > Date: Wed, 13 Jan 2021 21:47:03 -0500 > Subject: [PATCH] PowerPC: Map IEEE 128-bit long double built-ins. > > This patch repl

Re: [PATCH] PowerPC: Add float128/Decimal conversions.

2021-01-15 Thread Segher Boessenkool
On Thu, Jan 14, 2021 at 12:09:36PM -0500, Michael Meissner wrote: > [PATCH] PowerPC: Add float128/Decimal conversions. Same question here. Segher

[patch] Reset force_source_line in final.c

2021-01-15 Thread Eric Botcazou
Unlike the other global variables, it is not reset at the beginning of a function so can leak into the next one. Tested on x86-64/Linux, applied on the mainline as obvious. 2021-01-15 Eric Botcazou * final.c (final_start_function_1): Reset force_source_line. -- Eric Botcazoudiff -

Re: [PATCH 1/2] nios2: Add -mcustom-fpu-cfg=fph2

2021-01-15 Thread Sandra Loosemore
On 1/15/21 2:27 PM, Sebastian Huber wrote: Hello Sandra, On 15/01/2021 20:12, Sandra Loosemore wrote: The following instructions supported by this component are not enabled by this option: * -mcustom-fmins * -mcustom-fmaxs * -mcustom-round The reason is that these instructions are only in ef

Re: [PATCH, rs6000] Update pr88233.c test (pr91799)

2021-01-15 Thread Segher Boessenkool
Hi! On Thu, Jan 14, 2021 at 03:25:46PM -0600, will schmidt wrote: > This is a follow-up fix to clean up pr91799. Per review of test results, > it appears that the combination of target and dg-require stanzas is > not sufficient to properly limit the test to 64-bit only on darwin. > > This adds a

[r11-6725 Regression] FAIL: g++.dg/modules/dep-2.C -std=c++2a scan-file \\n\\.PHONY: m\\\\:part\\.c\\+\\+m on Linux/x86_64

2021-01-15 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 1ba71fabb78b18884e9f479f45a257bab50e8959 is the first bad commit commit 1ba71fabb78b18884e9f479f45a257bab50e8959 Author: Nathan Sidwell Date: Fri Jan 15 06:47:13 2021 -0800 preprocessor: Make quoting : [PR 95253] caused FAIL: g++.dg/modules/dep-1_a.C -std=c++17 scan-fil

[PATCH] match.pd: Optimize ((cst << x) & 1) [PR96669]

2021-01-15 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 15, 2021 at 09:21:07PM +0100, Richard Biener wrote: > >BTW, I've tried to also fix what the PR wanted primarily by adding > >/* Simplify (CST << x) & 1 to 0 if CST is even or to x == 0 if it is > >odd. / > >(simplify > > (bit_and (lshift INTEGER_CST@1 @0) integer_onep) > > (if ((wi::t

Re: [PATCH] strlen: Return TODO_update_address_taken when memcmp has been optimized [PR96271]

2021-01-15 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 15, 2021 at 10:02:41PM +0100, Jakub Jelinek via Gcc-patches wrote: > Like this? Bootstrapped/regtested successfully on x86_64-linux and i686-linux. > 2021-01-15 Jakub Jelinek > > PR tree-optimization/96271 > * passes.def: Pass false argument to first two pass_cd_dce >

[PATCH] libstdc++-v3: Add -fcf-protection=none to -march=i486

2021-01-15 Thread H.J. Lu via Gcc-patches
-fcf-protection is automatically enabled in libstdc++ on Linux/x86. Starting from commit 77d372abec0fbf2cfe922e3140ee3410248f979e Author: H.J. Lu Date: Thu Jan 14 05:56:46 2021 -0800 x86: Error on -fcf-protection with incompatible target GCC issues an error on -fcf-protection with incompa

Re: [PATCH] match.pd: Optimize ((cst << x) & 1) [PR96669]

2021-01-15 Thread Richard Biener
On January 16, 2021 1:59:50 AM GMT+01:00, Jakub Jelinek wrote: >On Fri, Jan 15, 2021 at 09:21:07PM +0100, Richard Biener wrote: >> >BTW, I've tried to also fix what the PR wanted primarily by adding >> >/* Simplify (CST << x) & 1 to 0 if CST is even or to x == 0 if it is >> >odd. / >> >(simplify

Re: [PATCH] strlen: Return TODO_update_address_taken when memcmp has been optimized [PR96271]

2021-01-15 Thread Richard Biener
On January 16, 2021 2:00:38 AM GMT+01:00, Jakub Jelinek wrote: >On Fri, Jan 15, 2021 at 10:02:41PM +0100, Jakub Jelinek via Gcc-patches >wrote: >> Like this? > >Bootstrapped/regtested successfully on x86_64-linux and i686-linux. OK. Thanks, Richard. >> 2021-01-15 Jakub Jelinek >> >>

<    1   2