Re: [PATCH][middle-end/88784] Middle end is missing some optimizations about unsigned

2019-06-27 Thread Li Jia He
On 2019/6/27 11:48 PM, Jeff Law wrote: On 6/27/19 12:11 AM, Li Jia He wrote: Hi, According to the optimizable case described by Qi Feng on issue 88784, we can combine the cases into the following: 1. x > y && x != XXX_MIN --> x > y 2. x > y && x == XXX_MIN --> false 3. x <= y &

[PATCH] Builtin function roundeven folding implementation

2019-06-27 Thread Tejas Joshi
Hi. This patch includes implementation of new function roundeven along with two utility functions. The patch bootstraps on x86_64-linux-gnu and passes regression tests. Thanks, Tejas gcc/ChangeLog: 2019-06-12 Tejas Joshi * builtins.c (mathfn_built_in_2): Added CASE_MATHFN for ROUNDEVEN.

Re: introduce EH_ELSE tree and gimplifier

2019-06-27 Thread Alexandre Oliva
On Jun 27, 2019, Richard Biener wrote: > On Thu, Jun 27, 2019 at 10:18 AM Alexandre Oliva wrote: >> @@ -909,6 +909,13 @@ DEFTREECODE (TRY_CATCH_EXPR, "try_catch_expr", >> tcc_statement, 2) >> The second operand is a cleanup expression which is evaluated >> on any exit (normal, exception, or ju

Re: [PATCH] Enable GCC support for AVX512_VP2INTERSECT.

2019-06-27 Thread Hongtao Liu
On Thu, Jun 27, 2019 at 5:38 PM Rainer Orth wrote: > > Hi Hongtao, > > > On Thu, Jun 27, 2019 at 5:02 PM Rainer Orth > > wrote: > >> > >> Hi Hongtao, > >> > >> >> as usual, the new effective-target keyword needs documenting in > >> >> sourcebuild.texi. > >> > Like this? > >> > >> a couple of ni

Re: [PATCH] constrain one character optimization to one character stores (PR 90989)

2019-06-27 Thread Jeff Law
On 6/27/19 10:12 AM, Jakub Jelinek wrote: > On Thu, Jun 27, 2019 at 09:15:41AM -0600, Jeff Law wrote: >> Actually it was trivial to create with store merging. >> >> char x[20]; >> foo() >> { >> x[0] = 0x41; >> x[1] = 0x42; >> } >> >> MEM [(char *)&x] = 16961; >> >> So clearly we can get this

[PATCH] PowerPC Prefixed Memory, Patch #3, Update predicates

2019-06-27 Thread Michael Meissner
This patch updates the predicates for prefixed addressing. This patch deletes a predicate that I had originally added, but the code no longer uses. This patch changes how local symbols for pc-relative addressing are marked. Previously, we had used a machine dependent bit in the SYMBOL_REF node.

Add support for PowerPC prefixed memory instructions and pc-relative support (Intro)

2019-06-27 Thread Michael Meissner
To keep things organized, I'm going to start submitting the patches for for a possible future PowerPC machine's prefixed addressing (including pc-relative suport) as threads under this message. There are two patches that I've already submitted that are needed for the rest of the patches: Patch #1

Re: [PATCH] Add --disable-tm-clone-registry libgcc configure option.

2019-06-27 Thread Jim Wilson
On Thu, Jun 20, 2019 at 12:50 PM Jim Wilson wrote: > This looks OK to me. It is worth pointing out that ARM already ships > compilers built this way, but they didn't bother adding a configure > option. They just override Makefile variables in their build scripts. > I think this is much cleaner a

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-27 Thread Jonathan Wakely
On 27/06/19 19:07 -0400, Ed Smith-Rowland wrote: On 6/27/19 1:06 PM, Ville Voutilainen wrote: On Thu, 27 Jun 2019 at 19:55, Ed Smith-Rowland via libstdc++ wrote: I don't think this will work in a constant expression: ?? /// Assign @p __new_val to @p __obj and return its previous value. ?? tem

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-27 Thread Ed Smith-Rowland via gcc-patches
On 6/27/19 1:06 PM, Ville Voutilainen wrote: On Thu, 27 Jun 2019 at 19:55, Ed Smith-Rowland via libstdc++ wrote: I don't think this will work in a constant expression: ?? /// Assign @p __new_val to @p __obj and return its previous value. ?? template +?? _GLIBCXX20_CONSTEXPR ?? inline

Re: [PATCH] constrain one character optimization to one character stores (PR 90989)

2019-06-27 Thread Jeff Law
On 6/27/19 12:40 PM, Richard Biener wrote: > On June 27, 2019 7:04:32 PM GMT+02:00, Jakub Jelinek wrote: >> On Thu, Jun 27, 2019 at 10:58:25AM -0600, Martin Sebor wrote: >>> The LHS is unsigned short so handle_char_store would not be called >>> because of the check in the caller. You would need s

[committed] Fix -Wimplicit-fallthrough with [[{,un}likely]] attributes on labels (PR c++/91024)

2019-06-27 Thread Jakub Jelinek
Hi! The likely/unlikely C++11 attributes on case labels result in GIMPLE_PREDICT statements inserted after the label; we should just ignore such statements, they aren't something executable in between the labels. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk, queued fo

[committed] Fix ICE in scan_operand_equal_p (PR tree-optimization/91010)

2019-06-27 Thread Jakub Jelinek
Hi! As the testcase shows, offset{1,2} can be NULL and operand_equal_p doesn't like NULL arguments. If both are NULL, we should return true, if just one, we should return false. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2019-06-27 Jakub Jelinek PR tr

Re: [PATCH] don't trim empty string initializers for pointers (PR 90947)

2019-06-27 Thread Jason Merrill
On 6/23/19 5:51 PM, Martin Sebor wrote: On 6/22/19 9:37 PM, Jason Merrill wrote: On 6/21/19 8:05 PM, Martin Sebor wrote: The solution we implemented in GCC 9 to get the mangling of non-type template arguments of class types containing array members consistent regardless of the form of their ini

Re: [C++ Patch] PR 90909 ("[10 Regression] call devirtualized to pure virtual")

2019-06-27 Thread Jason Merrill
On 6/24/19 4:52 AM, Paolo Carlini wrote: Hi, On 23/06/19 19:45, Jason Merrill wrote: On 6/23/19 7:53 AM, Paolo Carlini wrote: ... hi again ;) The other day I was having a look at using declarations for this issue and noticed that only a few lines below the de-virtualization check we have to

[C++ PATCH] PR c++/55442 - memory-hog with highly recursive constexpr.

2019-06-27 Thread Jason Merrill
This testcase in the PR is extremely recursive, and therefore uses a huge amount of memory on caching the results of individual calls. We no longer need to track all calls to catch infinite recursion, as we have other limits on maximum depth and operations count. So let's only cache a few calls a

[PATCH, obvious] gdbhooks.py: rename parameters to match usage

2019-06-27 Thread Vladislav Ivanishin
Hi, The parameter names here were in the wrong order (which doesn't matter to the interpreter, but confuses the humans reading the calling code). I am going to install the following patch soon. gcc/ChangeLog: * gdbhooks.py (GdbPrettyPrinters.add_printer_for_types): Reorder param

[PATCH] Prepare for prefixed instructions on PowerPC

2019-06-27 Thread Michael Meissner
A future PowerPC machine may have prefixed instructions. This patch changes the RTL "length" attribute of all of the "mov*", and "*extend*" insns from an explicit "4" to "*". This change prepares for the length attribute to be set appropriately for single instruction loads, stores, and add immedi

RFC: GCC Aarch64 SIMD vectorization question involving libmvec

2019-06-27 Thread Steve Ellcey
I am testing the latest GCC with not-yet-submitted GLIBC changes that implement libmvec on Aarch64. While trying to run SPEC 2017 (specifically 521.wrf_r) I ran into a case where GCC was generating a call to _ZGVnN2vv_powf, that is a vectorized powf call for 2 (not 4) elements. This was a problem

Re: [PATCH] Fix 2 clang warnings.

2019-06-27 Thread NightStrike
On Thu, Jun 27, 2019 at 11:16 AM Martin Sebor wrote: > > On 6/27/19 8:03 AM, Martin Liška wrote: > > Hi. > > > > This reduces 2 warnings reported by clang. > > > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > > > Ready to be installed? > > Thanks, > > Martin > > > > g

Re: [PATCH] constrain one character optimization to one character stores (PR 90989)

2019-06-27 Thread Martin Sebor
On 6/27/19 11:04 AM, Jakub Jelinek wrote: On Thu, Jun 27, 2019 at 10:58:25AM -0600, Martin Sebor wrote: The LHS is unsigned short so handle_char_store would not be called because of the check in the caller. You would need something like: MEM [(char *)&x] = { 'a', 'b' }; This is invalid,

[Darwin, PPC, committed] Allow the user to override the use of hard float in kexts.

2019-06-27 Thread Iain Sandoe
The default for the kernel is soft-float, however a user writing a kernel extension might want to make use of hard float. This change makes " -mkernel -mhard-float " work as expected. tested on powerpc-darwin9 applied to mainline thanks Iain 2019-06-27 Iain Sandoe * config/rs6000/rs6

[Darwin, PPC, committed] Correct whitespace in specs.

2019-06-27 Thread Iain Sandoe
A recent merge dropped whitespace in the endfile specs, which affects transactional memory cases. applied to mainline thanks Iain 2019-06-27 Iain Sandoe * config/rs6000/darwin.h (ENDFILE_SPEC): Correct whitespace in the spec. --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/

[Darwin, PPC, committed] Do not use longcall for 64b code.

2019-06-27 Thread Iain Sandoe
The linker [ld64] that supports 64Bit does not need the JBSR longcall optimisation, and will not work with the most generic case (where the symbol is undefined external, but there is no symbl stub). So switch the longcall option off. ld64 will generate branch islands as needed. tested on powerpc

Re: [PATCH] Deprecate -frepo option.

2019-06-27 Thread Jan Hubicka
> > > On 27 Jun 2019, at 19:21, Jan Hubicka wrote: > > > >> > >> It's useful on targets without COMDAT support. Are there any such > >> that we care about at this point? > >> > >> If the problem is the combination with LTO, why not just prohibit that? > > > > The problem is that at the colle

Re: [PATCH] constrain one character optimization to one character stores (PR 90989)

2019-06-27 Thread Richard Biener
On June 27, 2019 7:04:32 PM GMT+02:00, Jakub Jelinek wrote: >On Thu, Jun 27, 2019 at 10:58:25AM -0600, Martin Sebor wrote: >> The LHS is unsigned short so handle_char_store would not be called >> because of the check in the caller. You would need something like: >> >> MEM [(char *)&x] = { 'a'

Re: [PATCH 32/30] Document movmem/cpymem changes in gcc-10/changes.html

2019-06-27 Thread Aaron Sawdey
On 6/25/19 4:43 PM, Jeff Law wrote: > On 6/25/19 2:22 PM, acsaw...@linux.ibm.com wrote: >> From: Aaron Sawdey >> >> * builtins.c (get_memory_rtx): Fix comment. >> * optabs.def (movmem_optab): Change to cpymem_optab. >> * expr.c (emit_block_move_via_cpymem): Change movmem to cpymem.

Re: [PATCH] Deprecate -frepo option.

2019-06-27 Thread Iain Sandoe
> On 27 Jun 2019, at 19:21, Jan Hubicka wrote: > >> >> It's useful on targets without COMDAT support. Are there any such >> that we care about at this point? >> >> If the problem is the combination with LTO, why not just prohibit that? > > The problem is that at the collect2 time we want to

Re: [PATCH] Deprecate -frepo option.

2019-06-27 Thread Jan Hubicka
> > It's useful on targets without COMDAT support. Are there any such > that we care about at this point? > > If the problem is the combination with LTO, why not just prohibit that? The problem is that at the collect2 time we want to decide whether to hold stderr/stdout of the linker. The issue

Re: Use ODR for canonical types construction in LTO

2019-06-27 Thread Jason Merrill
On Mon, Jun 24, 2019 at 1:46 PM Jan Hubicka wrote: > > > > I thought I remembered someone's recent-ish work to treat specially > > types containing a char array, but I'm not finding it now. > > > > > For dynamically allocated memory as well as for stack space after stack > > > slot sharing done in

[Committed] PF fortran/90987 -- Adjust parsing of COMMONI

2019-06-27 Thread Steve Kargl
I've committed the attached patch after successful regression tests on x86_64-*-freebsd. The patch returns MATCH_NO when matching is done for a COMMON statement, but the statement in fact is not COMMON. See testcases. While here I corrected the recording of the wrong revision number in the Change

Re: [PATCH] Deprecate -frepo option.

2019-06-27 Thread Jason Merrill
On Thu, Jun 27, 2019 at 10:23 AM Martin Liška wrote: > > On 6/27/19 2:58 PM, Jonathan Wakely wrote: > > On Thu, 27 Jun 2019 at 13:30, Martin Liška wrote: > >> > >> On 6/21/19 4:28 PM, Richard Biener wrote: > >>> On Fri, Jun 21, 2019 at 4:13 PM Jakub Jelinek wrote: > > On Fri, Jun 21, 2

Re: [PATCH] Remove another bunch of dead assignment.

2019-06-27 Thread Richard Sandiford
Martin Liška writes: > diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c > index d50b811d863..1bd251ea8e2 100644 > --- a/gcc/config/i386/i386-expand.c > +++ b/gcc/config/i386/i386-expand.c > @@ -19780,8 +19780,7 @@ ix86_expand_sse2_mulvxdi3 (rtx op0, rtx op1, rtx op2) >

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-27 Thread Ville Voutilainen
On Thu, 27 Jun 2019 at 19:55, Ed Smith-Rowland via libstdc++ wrote: > > I don't think this will work in a constant expression: > > > > ?? /// Assign @p __new_val to @p __obj and return its previous value. > > ?? template > > +?? _GLIBCXX20_CONSTEXPR > > ?? inline _Tp > > ?? exchange(_

Re: [PATCH] constrain one character optimization to one character stores (PR 90989)

2019-06-27 Thread Jakub Jelinek
On Thu, Jun 27, 2019 at 10:58:25AM -0600, Martin Sebor wrote: > The LHS is unsigned short so handle_char_store would not be called > because of the check in the caller. You would need something like: > > MEM [(char *)&x] = { 'a', 'b' }; This is invalid, because the rhs is non-empty CONSTRUCTO

Re: [PATCH] x86: mark "k" and "Yk" constraints as non-internal

2019-06-27 Thread H.J. Lu
On Thu, Jun 27, 2019 at 5:26 AM Uros Bizjak wrote: > > On Thu, Jun 27, 2019 at 2:23 PM Jan Beulich wrote: > > > > >>> On 27.06.19 at 14:00, wrote: > > > On Thu, Jun 27, 2019 at 1:46 PM Jan Beulich wrote: > > >> > > >> >>> On 27.06.19 at 13:09, wrote: > > >> > On Thu, Jun 27, 2019 at 12:11 PM J

Re: [PATCH] constrain one character optimization to one character stores (PR 90989)

2019-06-27 Thread Martin Sebor
On 6/27/19 9:15 AM, Jeff Law wrote: On 6/27/19 9:00 AM, Jeff Law wrote: On 6/26/19 8:40 PM, Martin Sebor wrote: On 6/26/19 4:31 PM, Jeff Law wrote: On 6/25/19 5:03 PM, Martin Sebor wrote: The caller ensures that handle_char_store is only called for stores to arrays (MEM_REF) or single eleme

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-27 Thread Ed Smith-Rowland via gcc-patches
On 6/27/19 11:41 AM, Jonathan Wakely wrote: On 26/06/19 19:13 -0400, Ed Smith-Rowland via libstdc++ wrote: Here is the first of three patches for C++20 constexpr library. ?? Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. ??Implement C++20 p1023 - conste

[PATCH], PR Fix floatsi{sf,df}2 and floatunssi{sf,df}2 for a future powerpc machine

2019-06-27 Thread Michael Meissner
As I detail in PR 91009, I had some testsuite failures with my patches for a future machine. In the future patches, I added new RTL attributes to support the new prefixed load/store instructions (which will include pc-relative support). This new attribute needs to look at the 'type' RTL attribute

Re: [PATCH] constrain one character optimization to one character stores (PR 90989)

2019-06-27 Thread Jakub Jelinek
On Thu, Jun 27, 2019 at 09:15:41AM -0600, Jeff Law wrote: > Actually it was trivial to create with store merging. > > char x[20]; > foo() > { > x[0] = 0x41; > x[1] = 0x42; > } > > MEM [(char *)&x] = 16961; > > So clearly we can get this in gimple. So we need a check of some kind, > eithe

Re: [PATCH][middle-end/88784] Middle end is missing some optimizations about unsigned

2019-06-27 Thread Jeff Law
On 6/27/19 12:11 AM, Li Jia He wrote: > Hi, > > According to the optimizable case described by Qi Feng on > issue 88784, we can combine the cases into the following: > > 1. x > y && x != XXX_MIN --> x > y > 2. x > y && x == XXX_MIN --> false > 3. x <= y && x == XXX_MIN --> x == X

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-27 Thread Jonathan Wakely
On 26/06/19 19:13 -0400, Ed Smith-Rowland via libstdc++ wrote: Here is the first of three patches for C++20 constexpr library. ?? Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. ??Implement C++20 p1023 - constexpr comparison operators for std::array. I

Re: [RFC PATCH, i386]: Autovectorize 8-byte vectors

2019-06-27 Thread Jeff Law
On 6/27/19 9:34 AM, Jakub Jelinek wrote: > On Thu, Jun 27, 2019 at 09:24:58AM -0600, Jeff Law wrote: >> On 6/27/19 12:05 AM, Jakub Jelinek wrote: >>> On Wed, Jun 26, 2019 at 12:19:28PM +0200, Uros Bizjak wrote: Yes, the patch works OK. I'll regression test it and push it later today. >>> >>> I

Re: [RFC PATCH, i386]: Autovectorize 8-byte vectors

2019-06-27 Thread Jakub Jelinek
On Thu, Jun 27, 2019 at 09:24:58AM -0600, Jeff Law wrote: > On 6/27/19 12:05 AM, Jakub Jelinek wrote: > > On Wed, Jun 26, 2019 at 12:19:28PM +0200, Uros Bizjak wrote: > >> Yes, the patch works OK. I'll regression test it and push it later today. > > > > I think it caused > > +FAIL: gcc.dg/tree-ssa

Re: [RFC PATCH, i386]: Autovectorize 8-byte vectors

2019-06-27 Thread Jeff Law
On 6/27/19 12:05 AM, Jakub Jelinek wrote: > On Wed, Jun 26, 2019 at 12:19:28PM +0200, Uros Bizjak wrote: >> Yes, the patch works OK. I'll regression test it and push it later today. > > I think it caused > +FAIL: gcc.dg/tree-ssa/pr84512.c scan-tree-dump optimized "return 285;" > which admittedly a

Re: [PATCH] Fix 2 clang warnings.

2019-06-27 Thread Martin Sebor
On 6/27/19 8:03 AM, Martin Liška wrote: Hi. This reduces 2 warnings reported by clang. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: 2019-06-27 Martin Liska * edit-context.c (test_applying_fixits_unread

Re: [PATCH] constrain one character optimization to one character stores (PR 90989)

2019-06-27 Thread Jeff Law
On 6/27/19 9:00 AM, Jeff Law wrote: > On 6/26/19 8:40 PM, Martin Sebor wrote: >> On 6/26/19 4:31 PM, Jeff Law wrote: >>> On 6/25/19 5:03 PM, Martin Sebor wrote: >>> The caller ensures that handle_char_store is only called for stores to arrays (MEM_REF) or single elements as wide as c

Re: [PATCH] constrain one character optimization to one character stores (PR 90989)

2019-06-27 Thread Jeff Law
On 6/26/19 8:40 PM, Martin Sebor wrote: > On 6/26/19 4:31 PM, Jeff Law wrote: >> On 6/25/19 5:03 PM, Martin Sebor wrote: >> >>> >>> The caller ensures that handle_char_store is only called for stores >>> to arrays (MEM_REF) or single elements as wide as char. >> Where?  I don't see it, even after f

Re: [PATCH] Fix 2 clang warnings.

2019-06-27 Thread Martin Sebor
On 6/27/19 8:21 AM, Martin Liška wrote: On 6/27/19 4:11 PM, Jakub Jelinek wrote: On Thu, Jun 27, 2019 at 04:03:06PM +0200, Martin Liška wrote: * ggc-page.c (free_page): Use (char *) for %p printf format argument. --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -977,7 +977,7 @@ f

Re: [PATCH] Fix 2 clang warnings.

2019-06-27 Thread Jakub Jelinek
On Thu, Jun 27, 2019 at 04:21:10PM +0200, Martin Liška wrote: > 2019-06-27 Martin Liska > > * edit-context.c (test_applying_fixits_unreadable_file): Do not > use () for a constructor call. > (test_applying_fixits_line_out_of_range): Likewise. > * ggc-page.c (alloc_page):

Re: [PATCH] Deprecate -frepo option.

2019-06-27 Thread Martin Liška
On 6/27/19 2:58 PM, Jonathan Wakely wrote: > On Thu, 27 Jun 2019 at 13:30, Martin Liška wrote: >> >> On 6/21/19 4:28 PM, Richard Biener wrote: >>> On Fri, Jun 21, 2019 at 4:13 PM Jakub Jelinek wrote: On Fri, Jun 21, 2019 at 04:04:00PM +0200, Martin Liška wrote: > On 6/21/19 1:58 PM,

Re: [PATCH] Fix 2 clang warnings.

2019-06-27 Thread Martin Liška
On 6/27/19 4:11 PM, Jakub Jelinek wrote: > On Thu, Jun 27, 2019 at 04:03:06PM +0200, Martin Liška wrote: >> * ggc-page.c (free_page): Use (char *) for %p printf format >> argument. > >> --- a/gcc/ggc-page.c >> +++ b/gcc/ggc-page.c >> @@ -977,7 +977,7 @@ free_page (page_entry *entry) >>

Re: [PATCH 21/30] Changes to pdp11

2019-06-27 Thread Paul Koning
> On Jun 25, 2019, at 4:22 PM, acsaw...@linux.ibm.com wrote: > > From: Aaron Sawdey > > * config/pdp11/pdp11.md (movmemhi, movmemhi1, > movmemhi_nocc, UNSPEC_MOVMEM): Change movmem to cpymem. Ok, thanks. paul

Re: [PATCH] Fix 2 clang warnings.

2019-06-27 Thread Jakub Jelinek
On Thu, Jun 27, 2019 at 04:03:06PM +0200, Martin Liška wrote: > * ggc-page.c (free_page): Use (char *) for %p printf format > argument. > --- a/gcc/ggc-page.c > +++ b/gcc/ggc-page.c > @@ -977,7 +977,7 @@ free_page (page_entry *entry) >if (GGC_DEBUG_LEVEL >= 2) > fprintf (G.deb

[PATCH] Remove another bunch of dead assignment.

2019-06-27 Thread Martin Liška
Hi. The patch continues to remove quite obvious dead assignments that are not used. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: 2019-06-27 Martin Liska * config/i386/i386-expand.c (ix86_expand_sse2_mulv

[PATCH] Fix 2 clang warnings.

2019-06-27 Thread Martin Liška
Hi. This reduces 2 warnings reported by clang. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: 2019-06-27 Martin Liska * edit-context.c (test_applying_fixits_unreadable_file): Do not use () for a co

Re: [PATCH][gcc] libgccjit: add bitfield support

2019-06-27 Thread Andrea Corallo
Hi Dave, last version for this patch addressing the suggestion about the JIT_BIT_FIELD macros comment description. Thank you for all the suggestions. Regarding the write access please see my previous answer into the binary op patch thread. Bests Andrea 2019-06-20 Andrea Corallo andrea.cora.

RE: Use ODR for canonical types construction in LTO

2019-06-27 Thread JiangNing OS
No. Since this is LTO, it's very hard to simplify the big application. Sorry for that. I think Christophe is mentioning the case from g++.dg is reporting the similar issue like " type variant differs by TYPE_CXX_ODR_P ", right? Thanks, -Jiangning > -Original Message- > From: Jan Hubic

Re: [PATCH] Handle '\0' in strcmp in RTL expansion (PR tree-optimization/90892).

2019-06-27 Thread Martin Liška
On 6/18/19 12:16 PM, Jakub Jelinek wrote: > I think any such length changes should be moved after the two punt checks. > Move also the len3 setting before the new checks (of course conditional on > is_ncmp). Ok, I'm sending updated version of the patch that addresses this. I've been testing the pa

Re: [PATCH] x86: mark "k" and "Yk" constraints as non-internal

2019-06-27 Thread Segher Boessenkool
On Thu, Jun 27, 2019 at 05:46:00AM -0600, Jan Beulich wrote: > While maybe not explicitly applicable here, the intrinsics aren't > (afaict) providing full flexibility. In particular (just as example) > I haven't found a way to use embedded broadcast with the > intrinsics, but I can easily do so wit

Re: [PATCH] Deprecate -frepo option.

2019-06-27 Thread Jonathan Wakely
On Thu, 27 Jun 2019 at 13:30, Martin Liška wrote: > > On 6/21/19 4:28 PM, Richard Biener wrote: > > On Fri, Jun 21, 2019 at 4:13 PM Jakub Jelinek wrote: > >> > >> On Fri, Jun 21, 2019 at 04:04:00PM +0200, Martin Liška wrote: > >>> On 6/21/19 1:58 PM, Jakub Jelinek wrote: > On Fri, Jun 21, 20

Re: [PATCH] Deprecate -frepo option.

2019-06-27 Thread Martin Liška
On 6/21/19 4:28 PM, Richard Biener wrote: > On Fri, Jun 21, 2019 at 4:13 PM Jakub Jelinek wrote: >> >> On Fri, Jun 21, 2019 at 04:04:00PM +0200, Martin Liška wrote: >>> On 6/21/19 1:58 PM, Jakub Jelinek wrote: On Fri, Jun 21, 2019 at 01:52:09PM +0200, Martin Liška wrote: > On 6/21/19 1:47

[PATCH] Add .gnu.lto_.lto section.

2019-06-27 Thread Martin Liška
Hi. So this is a patch candidate for the .gnu.lto_.lto ELF section. As mentioned, the section contains information about bytecode version, compression algorithm used and slim LTO object flag. One minor issues is that I need to append random suffix to the section: [ 6] .gnu.lto_.lto.36e74acfb145

Re: [PATCH] x86: mark "k" and "Yk" constraints as non-internal

2019-06-27 Thread Uros Bizjak
On Thu, Jun 27, 2019 at 2:23 PM Jan Beulich wrote: > > >>> On 27.06.19 at 14:00, wrote: > > On Thu, Jun 27, 2019 at 1:46 PM Jan Beulich wrote: > >> > >> >>> On 27.06.19 at 13:09, wrote: > >> > On Thu, Jun 27, 2019 at 12:11 PM Jan Beulich wrote: > >> >> > >> >> Without these constraints asm() c

Re: [PATCH] x86: mark "k" and "Yk" constraints as non-internal

2019-06-27 Thread Jan Beulich
>>> On 27.06.19 at 14:00, wrote: > On Thu, Jun 27, 2019 at 1:46 PM Jan Beulich wrote: >> >> >>> On 27.06.19 at 13:09, wrote: >> > On Thu, Jun 27, 2019 at 12:11 PM Jan Beulich wrote: >> >> >> >> Without these constraints asm() can't make use of mask registers. >> > >> > asm should be deprecated.

Re: [PATCH] rs6000: Enable -fvariable-expansion-in-unroller by default

2019-06-27 Thread Bill Schmidt
On 6/27/19 6:45 AM, Segher Boessenkool wrote: > On Thu, Jun 27, 2019 at 11:33:45AM +0200, Richard Biener wrote: >> On Thu, Jun 27, 2019 at 5:23 AM Bill Schmidt wrote: >>> We've done some experimenting and realized that the subject option almost >>> always provide improved performance for Power whe

Re: [PATCH] x86: mark "k" and "Yk" constraints as non-internal

2019-06-27 Thread Uros Bizjak
On Thu, Jun 27, 2019 at 1:46 PM Jan Beulich wrote: > > >>> On 27.06.19 at 13:09, wrote: > > On Thu, Jun 27, 2019 at 12:11 PM Jan Beulich wrote: > >> > >> Without these constraints asm() can't make use of mask registers. > > > > asm should be deprecated. We have intrinsics for this purpose. > > W

Re: [PATCH] x86: mark "k" and "Yk" constraints as non-internal

2019-06-27 Thread Jan Beulich
>>> On 27.06.19 at 13:09, wrote: > On Thu, Jun 27, 2019 at 12:11 PM Jan Beulich wrote: >> >> Without these constraints asm() can't make use of mask registers. > > asm should be deprecated. We have intrinsics for this purpose. While maybe not explicitly applicable here, the intrinsics aren't (af

Re: [PATCH] rs6000: Enable -fvariable-expansion-in-unroller by default

2019-06-27 Thread Segher Boessenkool
On Thu, Jun 27, 2019 at 11:33:45AM +0200, Richard Biener wrote: > On Thu, Jun 27, 2019 at 5:23 AM Bill Schmidt wrote: > > We've done some experimenting and realized that the subject option almost > > always provide improved performance for Power when the loop unroller is > > enabled. So this patc

Re: [PATCH] x86: fix/improve vgf2p8affine*qb insns

2019-06-27 Thread Uros Bizjak
On Thu, Jun 27, 2019 at 1:39 PM Jan Beulich wrote: > > >>> On 27.06.19 at 12:58, wrote: > > On Thu, Jun 27, 2019 at 12:49 PM Jan Beulich wrote: > >> > >> >>> On 27.06.19 at 12:20, wrote: > >> > On Thu, Jun 27, 2019 at 10:57 AM Jan Beulich wrote: > >> >> > >> >> - the affine transformations are

Re: Use ODR for canonical types construction in LTO

2019-06-27 Thread Jan Hubicka
> On Thu, 27 Jun 2019, Jan Hubicka wrote: > > > Hi, > > here is update patch I am re-testing. Ok if it suceeds? > > + if (!type_in_anonymous_namespace_p (t)) > + hash = htab_hash_string (IDENTIFIER_POINTER > + (DECL_ASSEMBLER_NAME > +

Re: [PATCH] x86: fix/improve vgf2p8affine*qb insns

2019-06-27 Thread Jan Beulich
>>> On 27.06.19 at 12:58, wrote: > On Thu, Jun 27, 2019 at 12:49 PM Jan Beulich wrote: >> >> >>> On 27.06.19 at 12:20, wrote: >> > On Thu, Jun 27, 2019 at 10:57 AM Jan Beulich wrote: >> >> >> >> - the affine transformations are not commutative (the two source >> >> operands have entirely diff

[PATCH] PR libstdc++/85494 use rand_s in std::random_device

2019-06-27 Thread Jonathan Wakely
This is a minimal fix for the use of a deterministic RNG on mingw-w64, simply using rand_s unconditionally. The rest of the r271740 changes on trunk are not included. That means that RDSEED and RDRAND are not available for mingw-w64 and the token passed to the constructor is ignored completely.

Re: [PATCH] rs6000: Enable -fvariable-expansion-in-unroller by default

2019-06-27 Thread Segher Boessenkool
Hi Bill, On Wed, Jun 26, 2019 at 10:23:06PM -0500, Bill Schmidt wrote: > 2019-06-27 Bill Schmidt > > * config/rs6000/rs6000.c (rs6000_option_override_internal): Enable > -fvariable-expansion-in-unroller by default. > > > --- gcc/config/rs6000/rs6000.c(revision 272719) > +

[PATCH] Add late non-iterating FRE with optimize > 1

2019-06-27 Thread Richard Biener
This fixes FREs handling of TARGET_MEM_REF (it didn't consider &TARGET_MEM_REF) and adds a late FRE pass which has iteration disabled and runs only at -O[2s]+ to limit the compile-time impact. This helps cases where unrolling and vectorization exposes "piecewise" redundancies DOM cannot handle.

[PATCH] Fix various issues seen with clang-static-analyzer.

2019-06-27 Thread Martin Liška
Hi. The patch addressed couple of issues that are explained and I should have permission to install the patch. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Thanks, Martin gcc/ChangeLog: 2019-06-27 Martin Liska PR tree-optimization/90974 PR rtl-opti

Re: Use ODR for canonical types construction in LTO

2019-06-27 Thread Richard Biener
On Thu, 27 Jun 2019, Jan Hubicka wrote: > Hi, > here is update patch I am re-testing. Ok if it suceeds? + if (!type_in_anonymous_namespace_p (t)) + hash = htab_hash_string (IDENTIFIER_POINTER + (DECL_ASSEMBLER_NAME +

Re: [PATCH] x86: mark "k" and "Yk" constraints as non-internal

2019-06-27 Thread Uros Bizjak
On Thu, Jun 27, 2019 at 12:11 PM Jan Beulich wrote: > > Without these constraints asm() can't make use of mask registers. asm should be deprecated. We have intrinsics for this purpose. Uros. > gcc/ > 2019-06-27 Jan Beulich > > * config/i386/constraints.md: Remove @internal from "k" a

Re: Use ODR for canonical types construction in LTO

2019-06-27 Thread Jan Hubicka
Hi, here is update patch I am re-testing. Ok if it suceeds? Orace quary stats finished in meantime. Alias oracle query stats: refs_may_alias_p: 39232255 disambiguations, 47436580 queries ref_maybe_used_by_call_p: 59801 disambiguations, 39811399 queries call_may_clobber_ref_p: 5967 disambigu

Re: [PATCH] x86: fix/improve vgf2p8affine*qb insns

2019-06-27 Thread Uros Bizjak
On Thu, Jun 27, 2019 at 12:49 PM Jan Beulich wrote: > > >>> On 27.06.19 at 12:20, wrote: > > On Thu, Jun 27, 2019 at 10:57 AM Jan Beulich wrote: > >> > >> - the affine transformations are not commutative (the two source > >> operands have entirely different meaning) > >> - there's no need for

Re: [PATCH] x86: fix/improve vgf2p8affine*qb insns

2019-06-27 Thread Jan Beulich
>>> On 27.06.19 at 12:20, wrote: > On Thu, Jun 27, 2019 at 10:57 AM Jan Beulich wrote: >> >> - the affine transformations are not commutative (the two source >> operands have entirely different meaning) >> - there's no need for three alternatives >> - the nonimmediate_operand/Bm combination can

Re: Use ODR for canonical types construction in LTO

2019-06-27 Thread Jan Hubicka
> > Actually this was intended to be prevail in both cases, but it is > > harmless. The difference here is that anonymous types have > > DECL_ASSEMBLED_NAME , so if we inserted them to the hash > > table based on names they will all conflict. > > > > Anonymous namespace types never have duplicate

Re: Use ODR for canonical types construction in LTO

2019-06-27 Thread Richard Biener
On Thu, 27 Jun 2019, Jan Hubicka wrote: > > > + if (RECORD_OR_UNION_TYPE_P (t) > > > + && odr_type_p (t) && !odr_type_violation_reported_p (t)) > > > +{ > > > + /* Here we rely on fact that all non-ODR types was inserted into > > > + canonical type hash and thus we can safely detec

Re: Use ODR for canonical types construction in LTO

2019-06-27 Thread Jan Hubicka
> > + if (RECORD_OR_UNION_TYPE_P (t) > > + && odr_type_p (t) && !odr_type_violation_reported_p (t)) > > +{ > > + /* Here we rely on fact that all non-ODR types was inserted into > > +canonical type hash and thus we can safely detect conflicts between > > +ODR types and intero

Re: Use ODR for canonical types construction in LTO

2019-06-27 Thread Richard Biener
On Thu, 27 Jun 2019, Jan Hubicka wrote: > Hi, > this is updated patch for ODR based canonical type calculation. It makes use > of TYPE_CXX_ODR_P instead of doing the guesswork and while thinking how to get > rid of the quadratic behaviour of the hash I noticed that all the logic fits > quite natu

Re: [PATCH] x86: fix/improve vgf2p8affine*qb insns

2019-06-27 Thread Uros Bizjak
On Thu, Jun 27, 2019 at 10:57 AM Jan Beulich wrote: > > - the affine transformations are not commutative (the two source > operands have entirely different meaning) > - there's no need for three alternatives > - the nonimmediate_operand/Bm combination can better be vector_operand/m > > gcc/ > 20

Re: [RFA][tree-optimization/90883] Improve DSE to handle redundant calls

2019-06-27 Thread Christophe Lyon
On Thu, 27 Jun 2019 at 04:23, Jeff Law wrote: > > On 6/26/19 7:14 PM, Bill Schmidt wrote: > > Looks like this patch breaks bootstrap. > > > > /home3/wschmidt/gcc/gcc-mainline-base/gcc/tree-ssa-dse.c: In function > > 'void dse\ > > _optimize_redundant_stores(gimple*)': > > /home3/wschmidt/gcc/gcc-m

Re: [PATCH] x86: mark "k" and "Yk" constraints as non-internal

2019-06-27 Thread Jan Beulich
>>> On 27.06.19 at 12:11, wrote: > Without these constraints asm() can't make use of mask registers. Similarly it is entirely unclear to me how to use e.g. v4fmaddps or vp2intersectd in asm(): For the former the respective "Yh" constraint was dropped (oddly enough leaving its comment line in plac

[PATCH] x86: mark "k" and "Yk" constraints as non-internal

2019-06-27 Thread Jan Beulich
Without these constraints asm() can't make use of mask registers. gcc/ 2019-06-27 Jan Beulich * config/i386/constraints.md: Remove @internal from "k" and "Yk". --- a/gcc/config/i386/constraints.md +++ b/gcc/config/i386/constraints.md @@ -79,10 +79,10 @@ "Second from top of 8

Re: [PATCH] Improve avx_vec_concat (PR target/90991)

2019-06-27 Thread Uros Bizjak
On Thu, Jun 27, 2019 at 8:17 AM Jakub Jelinek wrote: > > Hi! > > In the last two alternatives of avx_vec_concat, we can allow memory > source, which optimizes the following testcases from weird > vmovaps (%rdi), %xmm0 > vmovaps %xmm0, %xmm0 > and similar to just the first instructi

Re: [PATCH] Remove quite obvious dead assignments.

2019-06-27 Thread Richard Sandiford
Martin Liška writes: > On 6/26/19 1:39 PM, Jakub Jelinek wrote: >> On Wed, Jun 26, 2019 at 12:57:15PM +0200, Martin Liška wrote: >>> --- a/gcc/tree-vect-stmts.c >>> +++ b/gcc/tree-vect-stmts.c >>> @@ -3483,8 +3483,7 @@ vectorizable_call (stmt_vec_info stmt_info, >>> gimple_stmt_iterator *gsi, >>>

Re: Use ODR for canonical types construction in LTO

2019-06-27 Thread Jan Hubicka
Hi, this is updated patch for ODR based canonical type calculation. It makes use of TYPE_CXX_ODR_P instead of doing the guesswork and while thinking how to get rid of the quadratic behaviour of the hash I noticed that all the logic fits quite naturally into gimple_register_canonical_type_1. We on

[PATCH] PR libstdc++/91012 fixfilesystem_error::what() string

2019-06-27 Thread Jonathan Wakely
When I refactored the filesystem_error code I changed it to only use the constructor parameter in the what() string, instead of the string returned by system_error::what(). That meant it no longer included the description of the error_code that system_error adds. This restores the previous behaivo

Re: [PATCH] Fix ICE when __builtin_calloc has no LHS (PR tree-optimization/91014).

2019-06-27 Thread Richard Biener
On Thu, Jun 27, 2019 at 11:21 AM Martin Liška wrote: > > Hi. > > This is quite an obvious changes I've noticed during fuzzing > of s390x target compiler. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? OK. Richard. > Thanks, > Martin > > gcc

Re: introduce EH_ELSE tree and gimplifier

2019-06-27 Thread Richard Biener
On Thu, Jun 27, 2019 at 10:18 AM Alexandre Oliva wrote: > > I found GIMPLE_EH_ELSE offered exactly the semantics I needed for some > Ada changes yet to be contributed, but GIMPLE_EH_ELSE was only built > by GIMPLE passes, and I needed to build earlier something that > eventually became GIMPLE_EH_E

Re: [PATCH] Enable GCC support for AVX512_VP2INTERSECT.

2019-06-27 Thread Rainer Orth
Hi Hongtao, > On Thu, Jun 27, 2019 at 5:02 PM Rainer Orth > wrote: >> >> Hi Hongtao, >> >> >> as usual, the new effective-target keyword needs documenting in >> >> sourcebuild.texi. >> > Like this? >> >> a couple of nits: first of all, your mailer seems to replace tabs by a >> single space. Ple

Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-06-27 Thread Richard Biener
On Thu, Jun 27, 2019 at 10:18 AM Alexandre Oliva wrote: > > The only preexisting use of GIMPLE_EH_ELSE, for transactional memory > commits, did not allow exceptions to escape from the ELSE path. The > trick it uses to allow the ELSE path to see the propagating exception > does not work very well

Re: [PATCH] rs6000: Enable -fvariable-expansion-in-unroller by default

2019-06-27 Thread Richard Biener
On Thu, Jun 27, 2019 at 5:23 AM Bill Schmidt wrote: > > Hi, > > We've done some experimenting and realized that the subject option almost > always provide improved performance for Power when the loop unroller is > enabled. So this patch turns that flag on by default for us. > > Bootstrapped and t

Re: [PATCH] Remove quite obvious dead assignments.

2019-06-27 Thread Martin Liška
On 6/26/19 1:39 PM, Jakub Jelinek wrote: > On Wed, Jun 26, 2019 at 12:57:15PM +0200, Martin Liška wrote: >> --- a/gcc/asan.c >> +++ b/gcc/asan.c >> @@ -1713,8 +1713,8 @@ asan_emit_allocas_unpoison (rtx top, rtx bot, rtx_insn >> *before) >>rtx ret = init_one_libfunc ("__asan_allocas_unpoison");

Re: [PATCH] ix86: pass correct options to compiler for gfni-4 testcase

2019-06-27 Thread Uros Bizjak
On Thu, Jun 27, 2019 at 10:58 AM Jan Beulich wrote: > > SSE2 is the required prereq of the builtins; as x86-64 has SSE2 enabled > anyway, the test failure was noticable on 32-bit builds only. > > gcc/testsuite/ > 2019-06-27 Jan Beulich > > * gcc.target/i386/gfni-4.c: Pass -msse2. OK.

  1   2   >