Re: [PATCH] [RFC] PR target/52813 and target/11807

2018-12-18 Thread Dimitar Dimitrov
On Mon, Dec 17 2018 20:15:02 EET Bernd Edlinger wrote: > out of curiosity I looked at the clobber statement in > gdb/nat/linux-ptrace.c: > >asm volatile ("pushq %0;" > ".globl linux_ptrace_test_ret_to_nx_instr;" > "linux_ptrace_test_ret

[PATCH] Shuffle ieee_arithmetic.F90

2018-12-18 Thread Steve Kargl
The attach patch shuffles lines around to eliminate 80 lines of #ifdef...#endif; thereby making the file more readable. Tested on i586-*-freebsd and x86_64-*-freebsd. Patch is a pre-requisite to fixing issues and adding missing functionality. OK to commit? 2018-12-18 Steven G. Kargl

[rs6000] Fix x86 SSSE3 compatibility implementations and testcases

2018-12-18 Thread Paul Clarke
This patch is the analog to r266868-r266870, but for SSSE3. The SSSE3 tests had been inadvertently made to PASS without actually running the test code. Actually running the code turned up some previously undetected issues. This patch fixes some issues in the implementations, fixes up the tests to

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Bin.Cheng
On Wed, Dec 19, 2018 at 12:00 PM Andi Kleen wrote: > > On Wed, Dec 19, 2018 at 10:01:15AM +0800, Bin.Cheng wrote: > > On Tue, Dec 18, 2018 at 7:15 PM Bin.Cheng wrote: > > > > > > On Sun, Dec 16, 2018 at 9:11 AM Andi Kleen wrote: > > > > > > > > "bin.cheng" writes: > > > > > > > > > Hi, > > > >

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Andi Kleen
On Wed, Dec 19, 2018 at 10:01:15AM +0800, Bin.Cheng wrote: > On Tue, Dec 18, 2018 at 7:15 PM Bin.Cheng wrote: > > > > On Sun, Dec 16, 2018 at 9:11 AM Andi Kleen wrote: > > > > > > "bin.cheng" writes: > > > > > > > Hi, > > > > > > > > Due to ICE and mal-functional bugs, indirect call value profil

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Andi Kleen
On Wed, Dec 19, 2018 at 09:26:51AM +0800, Bin.Cheng wrote: > On Wed, Dec 19, 2018 at 5:27 AM Andi Kleen wrote: > > > > > Yes, take g++.dg/tree-prof/morefunc.C as an example: > > > - int i; > > > - for (i = 0; i < 1000; i++) > > > + int i, j; > > > + for (i = 0; i < 100; i++) > > > +for

Re: [PATCH, C++] Fix PR c++/88261

2018-12-18 Thread Jason Merrill
On 12/15/18 3:36 AM, Bernd Edlinger wrote: this patch implements an error message, for non-static initialization of a flexible array member. This duplicates the existing error message from the C-FE, to avoid ICE and wrong code generation issues, as pointed out in the PR. It is a bit funny that

Re: [C++ PATCH] Constexpr fold even some TREE_CONSTANT ctors (PR c++/87934)

2018-12-18 Thread Jason Merrill
On 12/18/18 6:19 PM, Jakub Jelinek wrote: On Tue, Dec 18, 2018 at 05:40:03PM -0500, Jason Merrill wrote: On 12/18/18 3:45 PM, Jakub Jelinek wrote: The following testcase FAILs, because parsing creates a TREE_CONSTANT CONSTRUCTOR that contains CONST_DECL elts. cp_fold_r can handle that, but con

Re: [gofrontend-dev] Re: libgo patch committed: Add precise stack scan support

2018-12-18 Thread Matthias Klose
Cherry, see https://gcc.gnu.org/ml/gcc-testresults/2018-12/msg02241.html https://gcc.gnu.org/ml/gcc-testresults/2018-12/msg02240.html still shows ~180 test failures on ARM32. Sorry, no access to an ARM32 box until next year. Matthias On 13.12.18 00:27, Ian Lance Taylor wrote: > On Wed, Dec 12,

Re: V8 [PATCH] C/C++: Add -Waddress-of-packed-member

2018-12-18 Thread Sandra Loosemore
On 12/18/18 2:12 PM, H.J. Lu wrote: diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index ac2ee59d92c..47f2fc3f518 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -358,6 +358,7 @@ Objective-C and Objective-C++ Dialects}. -Wuseless-cast -Wvariadic-macros -Wvector-operation

[PATCH] [aarch64] Revert support for ARMv8.2 in tsv110

2018-12-18 Thread Shaokun Zhang
For HiSilicon's tsv110 cpu core, it supports some v8_4A features, but some mandatory features are not implemented. Revert to ARMv8.2 that all mandatory features are supported. --- gcc/ChangeLog| 5 + gcc/config/aarch64/aarch64-cores.def | 6 +++--- 2 files changed, 8 i

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Bin.Cheng
On Tue, Dec 18, 2018 at 7:15 PM Bin.Cheng wrote: > > On Sun, Dec 16, 2018 at 9:11 AM Andi Kleen wrote: > > > > "bin.cheng" writes: > > > > > Hi, > > > > > > Due to ICE and mal-functional bugs, indirect call value profile > > > transformation > > > is disabled on GCC-7/8/trunk. This patch resto

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Bin.Cheng
On Wed, Dec 19, 2018 at 5:27 AM Andi Kleen wrote: > > > Yes, take g++.dg/tree-prof/morefunc.C as an example: > > - int i; > > - for (i = 0; i < 1000; i++) > > + int i, j; > > + for (i = 0; i < 100; i++) > > +for (j = 0; j < 50; j++) > > g += tc->foo(); > > if (g<100) g++; > >

Re: [PR86153] simplify more overflow tests in VRP

2018-12-18 Thread Jeff Law
On 12/18/18 3:58 AM, Alexandre Oliva wrote: > Jeff, you mentioned you had changes to the VRP overflow test that would > fix this, but I couldn't figure out whether or not you ever put them in > and it regressed again later, or what. Anyway, here's my take on it. No, they're not on the trunk yet.

Re: [C++ PATCH] Constexpr fold even some TREE_CONSTANT ctors (PR c++/87934)

2018-12-18 Thread Jakub Jelinek
On Tue, Dec 18, 2018 at 05:40:03PM -0500, Jason Merrill wrote: > On 12/18/18 3:45 PM, Jakub Jelinek wrote: > > The following testcase FAILs, because parsing creates a TREE_CONSTANT > > CONSTRUCTOR that contains CONST_DECL elts. cp_fold_r can handle that, > > but constexpr evaluation doesn't touch

Re: [C++ PATCH] Constexpr fold even some TREE_CONSTANT ctors (PR c++/87934)

2018-12-18 Thread Jason Merrill
On 12/18/18 3:45 PM, Jakub Jelinek wrote: The following testcase FAILs, because parsing creates a TREE_CONSTANT CONSTRUCTOR that contains CONST_DECL elts. cp_fold_r can handle that, but constexpr evaluation doesn't touch those CONSTRUCTORs. Fixed thusly, bootstrapped/regtested on x86_64-linux a

Re: [C++ PATCH] Avoid GC during cp_parser_parenthesized_expression_list (PR c++/88180)

2018-12-18 Thread Jason Merrill
On 12/18/18 3:49 PM, Jakub Jelinek wrote: cp_parser_parenthesized_expression_list creates expression_list in GC memory; if it is called when current_function_decl is NULL, there might be ggc_collect in the middle of the parsing and collect that vector. Fixed by temporarily bumping function_depth

Re: V8 [PATCH] C/C++: Add -Waddress-of-packed-member

2018-12-18 Thread Jason Merrill
On 12/18/18 4:12 PM, H.J. Lu wrote: On Tue, Dec 18, 2018 at 12:36 PM Jason Merrill wrote: On 12/18/18 9:10 AM, H.J. Lu wrote: + switch (TREE_CODE (rhs)) +{ +case ADDR_EXPR: + base = TREE_OPERAND (rhs, 0); + while (handled_component_p (base)) + { + if (TREE_CODE (b

Re: patch to fix PR87759

2018-12-18 Thread Vladimir Makarov
On 12/18/18 4:50 PM, Jakub Jelinek wrote: On Tue, Dec 18, 2018 at 04:23:12PM -0500, Vladimir Makarov wrote:   The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87759   The patch was bootstrapped and tested on x86-64. Committed as rev. 267244. The test FAILs on i686-lin

Re: patch to fix PR87759

2018-12-18 Thread Jakub Jelinek
On Tue, Dec 18, 2018 at 04:23:12PM -0500, Vladimir Makarov wrote: >   The following patch fixes > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87759 > >   The patch was bootstrapped and tested on x86-64. > > Committed as rev. 267244. The test FAILs on i686-linux, fixed thusly, committed as ob

Re: [PATCH] accept all C integer types in function parameters referenced by alloc_align (PR 88363)

2018-12-18 Thread Martin Sebor
On 12/11/18 4:19 PM, Jason Merrill wrote: On 12/11/18 6:08 PM, Martin Sebor wrote: On 12/11/18 3:52 PM, Marek Polacek wrote: On Tue, Dec 11, 2018 at 03:46:37PM -0700, Martin Sebor wrote: On 12/11/18 1:47 PM, Jakub Jelinek wrote: On Tue, Dec 11, 2018 at 01:36:58PM -0700, Martin Sebor wrote: A

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Andi Kleen
> Yes, take g++.dg/tree-prof/morefunc.C as an example: > - int i; > - for (i = 0; i < 1000; i++) > + int i, j; > + for (i = 0; i < 100; i++) > +for (j = 0; j < 50; j++) > g += tc->foo(); > if (g<100) g++; > } > @@ -27,8 +28,9 @@ void test1 (A *tc) > static __attribute__((alw

patch to fix PR87759

2018-12-18 Thread Vladimir Makarov
  The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87759   The patch was bootstrapped and tested on x86-64. Committed as rev. 267244. Index: ChangeLog === --- ChangeLog (revision 267243) +++ ChangeLog (workin

V8 [PATCH] C/C++: Add -Waddress-of-packed-member

2018-12-18 Thread H.J. Lu
On Tue, Dec 18, 2018 at 12:36 PM Jason Merrill wrote: > > On 12/18/18 9:10 AM, H.J. Lu wrote: > > + switch (TREE_CODE (rhs)) > > +{ > > +case ADDR_EXPR: > > + base = TREE_OPERAND (rhs, 0); > > + while (handled_component_p (base)) > > + { > > + if (TREE_CODE (base) == C

Re: [PATCH 2/6, OpenACC, libgomp] Async re-work, oacc-* parts (revised, v2)

2018-12-18 Thread Thomas Schwinge
Hi Chung-Lin! On Tue, 18 Dec 2018 23:06:38 +0800, Chung-Lin Tang wrote: > this part includes some of the lookup_goacc_asyncqueue fixes we talked about. > I am still thinking about how the queue lock problem should really be solved, > so regard > this patch as just fixing some of the problems.

[PATCH] Allow _mm256_clmulepi64_epi128 even for just -mvcplmulqdq -mavx (PR target/88541)

2018-12-18 Thread Jakub Jelinek
Hi! As mentioned in the PR, there is a VEX encoded vpclmulqdq instruction with ymm arguments that needs VPCLMULQDQ ISA, and then EVEX encoded vpclmulqdq with zmm arguments that needs VPCLMULQDQ + AVX512F ISAs and vpclmulqdq with xmm or ymm arguments that needs VPCLMULQDQ + AVX512VL ISAs. So, _mm2

[C++ PATCH] Avoid GC during cp_parser_parenthesized_expression_list (PR c++/88180)

2018-12-18 Thread Jakub Jelinek
Hi! cp_parser_parenthesized_expression_list creates expression_list in GC memory; if it is called when current_function_decl is NULL, there might be ggc_collect in the middle of the parsing and collect that vector. Fixed by temporarily bumping function_depth. Or should that be done in some other

[C++ PATCH] Constexpr fold even some TREE_CONSTANT ctors (PR c++/87934)

2018-12-18 Thread Jakub Jelinek
Hi! The following testcase FAILs, because parsing creates a TREE_CONSTANT CONSTRUCTOR that contains CONST_DECL elts. cp_fold_r can handle that, but constexpr evaluation doesn't touch those CONSTRUCTORs. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-12-1

Re: [PATCH 3/4] c/c++, asm: Use nicer error for const and restrict

2018-12-18 Thread Jason Merrill
On 12/10/18 5:47 PM, Segher Boessenkool wrote: Not all qualifiers are asm qualifiers. We can talk about that in a nicer way than just giving a generic parser error. This also adds two testcases for C++, that previously were for C only. 2018-12-10 Segher Boessenkool c/ * c-parser.c

Re: [PATCH 4/4] c++, asm: Do not handle any asm-qualifiers in top-level asm

2018-12-18 Thread Jason Merrill
On 12/10/18 5:47 PM, Segher Boessenkool wrote: Previously, "volatile" was allowed. Changing this simplifies the code, makes things more regular, and makes the C and C++ frontends handle this the same way. 2018-12-10 Segher Boessenkool cp/ * parser.c (cp_parser_asm_definition): Do n

Re: [PATCH 1/4] c/c++, asm: Write the asm-qualifier loop without "done" boolean

2018-12-18 Thread Jason Merrill
On 12/10/18 5:47 PM, Segher Boessenkool wrote: As suggested by Jason. Segher 2018-12-10 Segher Boessenkool c/ * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without "done" boolean variable. cp/ * parser.c (cp_parser_asm_definition): Rewrite the lo

Re: [PATCH] v6: C++: more location wrapper nodes (PR c++/43064, PR c++/43486)

2018-12-18 Thread Jason Merrill
On 12/18/18 4:22 PM, David Malcolm wrote: On Mon, 2018-12-17 at 18:30 -0500, David Malcolm wrote: On Mon, 2018-12-17 at 14:33 -0500, Jason Merrill wrote: On 12/14/18 7:17 PM, David Malcolm wrote: + /* Since default args are effectively part of the function type, +strip location wr

Re: V7 [PATCH] C/C++: Add -Waddress-of-packed-member

2018-12-18 Thread Jason Merrill
On 12/18/18 9:10 AM, H.J. Lu wrote: + switch (TREE_CODE (rhs)) +{ +case ADDR_EXPR: + base = TREE_OPERAND (rhs, 0); + while (handled_component_p (base)) + { + if (TREE_CODE (base) == COMPONENT_REF) + break; + base = TREE_OPERAND (base, 0); +

[PATCH] v6: C++: more location wrapper nodes (PR c++/43064, PR c++/43486)

2018-12-18 Thread David Malcolm
On Mon, 2018-12-17 at 18:30 -0500, David Malcolm wrote: > On Mon, 2018-12-17 at 14:33 -0500, Jason Merrill wrote: > > On 12/14/18 7:17 PM, David Malcolm wrote: > > > + /* Since default args are effectively part of the function > > > type, > > > + strip location wrappers here, since otherwise

Re: [PATCH] v5: C++: more location wrapper nodes (PR c++/43064, PR c++/43486)

2018-12-18 Thread Jason Merrill
On 12/17/18 6:30 PM, David Malcolm wrote: On Mon, 2018-12-17 at 14:33 -0500, Jason Merrill wrote: On 12/14/18 7:17 PM, David Malcolm wrote: + /* Since default args are effectively part of the function type, +strip location wrappers here, since otherwise the location of +one

Re: [PATCH] Enable scatter vectorization with 128-bit and 256-bit vectors with AVX512VL (PR target/88464)

2018-12-18 Thread Uros Bizjak
On Tue, Dec 18, 2018 at 3:57 PM Jakub Jelinek wrote: > > Hi! > > We weren't vectorizing with unconditional or masked scatters when > -mprefered-vector-width={128,256}. While for DI index and DF/DI > stores or SI index and SF/SI stores we even have the builtins, > for the remaining combinations I

[PATCH] LWG 3171: restore stream insertion for filesystem::directory_entry

2018-12-18 Thread Jonathan Wakely
* include/bits/fs_dir.h (operator<<): Overload for directory_entry, as per LWG 3171. * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: New test. Tested x86_64-linux, committed to trunk. commit 0d24038c0b565dbcd5e7729423398da281245c41 Author: Jonathan Wakely Date:

Re: [PATCH v4][C][ADA] use function descriptors instead of trampolines in C

2018-12-18 Thread Jakub Jelinek
On Tue, Dec 18, 2018 at 04:33:48PM +, Uecker, Martin wrote: > > Yes, something like this. If the trampolines are pre-allocated, this could > > even avoid the need to clear the cache on archs where this is needed. > > And if we can make the trampolines be all the same (and it somehow derived >

Re: [PATCH] Micro-optimization to avoid creating temporary path

2018-12-18 Thread Jonathan Wakely
On 18/12/18 15:52 +, Jonathan Wakely wrote: Now that path::operator/=(basic_string_view) works directly from the string argument, instead of constructing a temporary path from the string, it's potentially more efficient to do 'path(x) /= s' instead of 'x / s'. This changes the only relevant p

Re: [PATCH v4][C][ADA] use function descriptors instead of trampolines in C

2018-12-18 Thread Uecker, Martin
Am Dienstag, den 18.12.2018, 17:29 +0100 schrieb Martin Uecker: > Am Dienstag, den 18.12.2018, 17:24 +0100 schrieb Jakub Jelinek: > > On Tue, Dec 18, 2018 at 09:03:41AM -0700, Jeff Law wrote: > > > Right.  This is the classic example and highlights the ABI concerns.  If > > > we use the low bit to

Re: [PATCH v4][C][ADA] use function descriptors instead of trampolines in C

2018-12-18 Thread Uecker, Martin
Am Dienstag, den 18.12.2018, 17:24 +0100 schrieb Jakub Jelinek: > On Tue, Dec 18, 2018 at 09:03:41AM -0700, Jeff Law wrote: > > Right.  This is the classic example and highlights the ABI concerns.  If > > we use the low bit to distinguish between a normal function pointer and > > a pointer to a des

Re: [PATCH v4][C][ADA] use function descriptors instead of trampolines in C

2018-12-18 Thread Uecker, Martin
Am Dienstag, den 18.12.2018, 09:03 -0700 schrieb Jeff Law: > On 12/18/18 8:32 AM, Jakub Jelinek wrote: > > On Tue, Dec 18, 2018 at 10:23:46AM -0500, Paul Koning wrote: > > > > > > > > > > On Dec 17, 2018, at 2:23 PM, Szabolcs Nagy > > > > wrote: > > > > > > > > On 17/12/2018 18:22, Uecker, Mar

Re: [PATCH v4][C][ADA] use function descriptors instead of trampolines in C

2018-12-18 Thread Jakub Jelinek
On Tue, Dec 18, 2018 at 09:03:41AM -0700, Jeff Law wrote: > Right. This is the classic example and highlights the ABI concerns. If > we use the low bit to distinguish between a normal function pointer and > a pointer to a descriptor and qsort doesn't know about it, then we lose. > > One way arou

Re: [patch] Fix bootstrap powerpc*-*-freebsd* targets

2018-12-18 Thread Segher Boessenkool
On Tue, Dec 18, 2018 at 11:18:03PM +1030, Alan Modra wrote: > On Tue, Dec 18, 2018 at 03:20:02AM -0600, Segher Boessenkool wrote: > > Hi Alan, > > > > On Tue, Dec 18, 2018 at 10:39:27AM +1030, Alan Modra wrote: > > > On Mon, Dec 17, 2018 at 11:05:57AM -0600, Segher Boessenkool wrote: > > > > On Mo

Re: [PATCH v4][C][ADA] use function descriptors instead of trampolines in C

2018-12-18 Thread Jeff Law
On 12/18/18 8:32 AM, Jakub Jelinek wrote: > On Tue, Dec 18, 2018 at 10:23:46AM -0500, Paul Koning wrote: >> >> >>> On Dec 17, 2018, at 2:23 PM, Szabolcs Nagy wrote: >>> >>> On 17/12/2018 18:22, Uecker, Martin wrote: > > ... So a thread_local static variable for storing the static

[PATCH] Micro-optimization to avoid creating temporary path

2018-12-18 Thread Jonathan Wakely
Now that path::operator/=(basic_string_view) works directly from the string argument, instead of constructing a temporary path from the string, it's potentially more efficient to do 'path(x) /= s' instead of 'x / s'. This changes the only relevant place in the library. * src/filesystem/st

[PATCH] LWG 2936: update path::compare logic and optimize string comparisons

2018-12-18 Thread Jonathan Wakely
The resolution for LWG 2936 defines the comparison more precisely, which this patch implements. The patch also defines comparisons with strings to work without constructing a temporary path object (so avoids any memory allocations). * include/bits/fs_path.h (path::compare(const string_typ

[PATCH] LWG 3040: define starts_with/ends_with as proposed

2018-12-18 Thread Jonathan Wakely
* include/std/string_view [__cplusplus > 201703L] (basic_string_view::starts_with(basic_string_view)): Implement proposed resolution of LWG 3040 to avoid redundant length check. (basic_string_view::starts_with(_CharT)): Implement proposed resolution of LWG 3

Re: [PATCH v4][C][ADA] use function descriptors instead of trampolines in C

2018-12-18 Thread Jakub Jelinek
On Tue, Dec 18, 2018 at 10:23:46AM -0500, Paul Koning wrote: > > > > On Dec 17, 2018, at 2:23 PM, Szabolcs Nagy wrote: > > > > On 17/12/2018 18:22, Uecker, Martin wrote: > >>> > >>> ... > >> > >> So a thread_local static variable for storing the static > >> chain? > > > > something like that

Re: [PATCH v4][C][ADA] use function descriptors instead of trampolines in C

2018-12-18 Thread Paul Koning
> On Dec 17, 2018, at 2:23 PM, Szabolcs Nagy wrote: > > On 17/12/2018 18:22, Uecker, Martin wrote: >>> >>> ... >> >> So a thread_local static variable for storing the static >> chain? > > something like that, but the more i think about it the > harder it seems: the call site of the nested f

Re: [PATCH] [RFC] PR target/52813 and target/11807

2018-12-18 Thread Bernd Edlinger
On 12/18/18 3:16 PM, Bernd Edlinger wrote: > Hi, > > while I looked closely at the asm statement in the gdb, > I realized that the SP clobber forces the function to use > the frame pointer, and prevents the red zone.  That > makes the push / pop sequence in the asm statement safe > to use, as long

Re: [PATCH 6/6, OpenACC, libgomp] Async re-work, nvptx changes (revised, v3)

2018-12-18 Thread Chung-Lin Tang
On 2018/12/11 9:50 PM, Chung-Lin Tang wrote: On 2018/12/10 6:02 PM, Chung-Lin Tang wrote: On 2018/12/7 04:57 AM, Thomas Schwinge wrote>> ---  a/libgomp/plugin/plugin-nvptx.c +++ b/libgomp/plugin/plugin-nvptx.c +struct goacc_asyncqueue * +GOMP_OFFLOAD_openacc_async_construct (void) +{ +  stru

Re: [PATCH 2/6, OpenACC, libgomp] Async re-work, oacc-* parts (revised, v2)

2018-12-18 Thread Chung-Lin Tang
On 2018/9/25 9:10 PM, Chung-Lin Tang wrote: Hi Thomas, These are the OpenACC specific changes, mostly the re-implementation of async-related acc_* runtime library API functions to use the new backend plugin interfaces, in a non-target specific way. Hi Thomas, this part includes some of the l

Re: [PATCH 1/6, OpenACC, libgomp] Async re-work, interfaces (revised, v2)

2018-12-18 Thread Chung-Lin Tang
On 2018/12/15 1:52 AM, Thomas Schwinge wrote: As for the following changes, will you please make sure that there is one common order for these, used in "libgomp/libgomp-plugin.h" function prototypes, "libgomp/libgomp.h:acc_dispatch_t", "libgomp/target.c:gomp_load_plugin_for_device", "libgomp/oacc

[PATCH] Enable scatter vectorization with 128-bit and 256-bit vectors with AVX512VL (PR target/88464)

2018-12-18 Thread Jakub Jelinek
Hi! We weren't vectorizing with unconditional or masked scatters when -mprefered-vector-width={128,256}. While for DI index and DF/DI stores or SI index and SF/SI stores we even have the builtins, for the remaining combinations I had to add a few alt builtins (with spaces in names as in other cas

Re: [PATCH 2/3] Factor out duplicate code in gimplify_scan_omp_clauses

2018-12-18 Thread Jakub Jelinek
On Sat, Nov 10, 2018 at 09:11:19AM -0800, Julian Brown wrote: > This patch, created while trying to figure out the open-coded linked-list > handling in gimplify_scan_omp_clauses, factors out four somewhat > repetitive portions of that function into two new outlined functions. > This was done largel

Re: [PATCH] [RFC] PR target/52813 and target/11807

2018-12-18 Thread Bernd Edlinger
Hi, while I looked closely at the asm statement in the gdb, I realized that the SP clobber forces the function to use the frame pointer, and prevents the red zone. That makes the push / pop sequence in the asm statement safe to use, as long as the stack is restored to the original value. That ca

Re: [PATCH 2/3] Factor out duplicate code in gimplify_scan_omp_clauses

2018-12-18 Thread Julian Brown
On Sat, 10 Nov 2018 09:11:19 -0800 Julian Brown wrote: > This patch, created while trying to figure out the open-coded > linked-list handling in gimplify_scan_omp_clauses, factors out four > somewhat repetitive portions of that function into two new outlined > functions. This was done largely mec

V7 [PATCH] C/C++: Add -Waddress-of-packed-member

2018-12-18 Thread H.J. Lu
On Mon, Dec 17, 2018 at 08:53:32AM -0500, Jason Merrill wrote: > On 12/17/18 7:42 AM, H.J. Lu wrote: > > On Mon, Dec 17, 2018 at 1:39 AM Richard Biener > > wrote: > > > > > > On Fri, Dec 14, 2018 at 11:48 PM H.J. Lu wrote: > > > > > > > > On Fri, Dec 14, 2018 at 2:10 PM Jason Merrill wrote: >

Re: [PATCH 1/6, OpenACC, libgomp] Async re-work, interfaces

2018-12-18 Thread Chung-Lin Tang
On 2018/12/18 8:36 PM, Jakub Jelinek wrote: On Fri, Dec 14, 2018 at 06:52:20PM +0100, Thomas Schwinge wrote: --- a/include/gomp-constants.h +++ b/include/gomp-constants.h @@ -199,7 +200,7 @@ enum gomp_map_kind /* Versions of libgomp and device-specific plugins. GOMP_VERSION should be

Re: [PATCH, rs6000] Clarify when typedef names can be used with AltiVec vector types

2018-12-18 Thread Bill Schmidt
On 12/18/18 7:43 AM, Ulrich Weigand wrote: > Bill Schmidt wrote: > >> +@item >> +When using @code{vector} in keyword-and-predefine mode; for example, >> + >> +@smallexample >> +typedef signed short int16; >> +vector int16 data; >> +@end smallexample >> + >> +Note that keyword-and-predefine mode is

Re: [PATCH, rs6000] Clarify when typedef names can be used with AltiVec vector types

2018-12-18 Thread Ulrich Weigand
Bill Schmidt wrote: > +@item > +When using @code{vector} in keyword-and-predefine mode; for example, > + > +@smallexample > +typedef signed short int16; > +vector int16 data; > +@end smallexample > + > +Note that keyword-and-predefine mode is enabled by disabling GNU > +extensions (e.g., by using

[PATCH][GCC][AArch64] Have empty HWCAPs string ignored during native feature detection

2018-12-18 Thread Tamar Christina
Hi All, This patch makes the feature detection code for AArch64 GCC not add features automatically when the feature had no hwcaps string to match against. This means that -mcpu=native no longer adds feature flags such as +profile. The behavior wasn't noticed before because at the time +profile wa

[committed][MSP430] Define TARGET_VTABLE_ENTRY_ALIGN

2018-12-18 Thread Jozef Lawrynowicz
TARGET_VTABLE_ENTRY_ALIGN defaults to POINTER_SIZE, which is 20 for msp430-elf -mlarge. g++.dg/torture/pr41257.C ICEs after the invalid alignment of 20 is set. > during GIMPLE pass: slp > gcc/testsuite/g++.dg/torture/pr41257.C: In function 'void bar()': > gcc/testsuite/g++.dg/torture/pr41257.C:17

Re: [PATCH, rs6000] Clarify when typedef names can be used with AltiVec vector types

2018-12-18 Thread Bill Schmidt
On 12/18/18 4:33 AM, Ulrich Weigand wrote: > Bill Schmidt wrote: > >> +@item >> +When using vector in keyword-and-predefine mode; for example, >> + >> +@smallexample >> +/* With -maltivec only: */ > This is a bit confusing (at least to me). What does "with -maltivec only" > mean here? Just addin

Re: [patch] various OpenACC reduction enhancements - FE changes

2018-12-18 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 02:11:31PM +, Julian Brown wrote: > > Any reason for the above (ditto in C), rather than just adding > > && ort != C_ORT_ACC to the while loop condition for CPP_OPEN_SQUARE? > > (, . or * after id-expression is like any other unhandled > > characters... > > I think the

Re: [PATCH, arm][PR88167] Fix __builtin_return_address returns invalid address

2018-12-18 Thread Mihail Ionescu
On 12/18/2018 09:32 AM, Mihail Ionescu wrote: Hi All, In Thumb mode when the function prologue gets expanded, in case of a multiple register push, additional mov instructions are generated to save the high registers which result in lr getting overwritten before it's value can be used to ret

Re: [PATCH, OpenACC, 4/8] Multi-dimensional dynamic array support for OpenACC data clauses, omp-low: dynamic array descriptor creation

2018-12-18 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 10:52:32PM +0800, Chung-Lin Tang wrote: > --- gcc/omp-low.c (revision 267050) > +++ gcc/omp-low.c (working copy) > @@ -60,6 +60,7 @@ along with GCC; see the file COPYING3. If not see > #include "hsa-common.h" > #include "stringpool.h" > #include "attribs.h" > +#i

Re: [patch] Fix bootstrap powerpc*-*-freebsd* targets

2018-12-18 Thread Alan Modra
On Tue, Dec 18, 2018 at 03:20:02AM -0600, Segher Boessenkool wrote: > Hi Alan, > > On Tue, Dec 18, 2018 at 10:39:27AM +1030, Alan Modra wrote: > > On Mon, Dec 17, 2018 at 11:05:57AM -0600, Segher Boessenkool wrote: > > > On Mon, Dec 17, 2018 at 10:40:01AM +1030, Alan Modra wrote: > > > > Since I b

Re: [PATCH, OpenACC] Enable GOMP_MAP_FIRSTPRIVATE_INT for OpenACC

2018-12-18 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 03:44:25PM +, Julian Brown wrote: > +static tree > +convert_to_firstprivate_int (tree var, gimple_seq *gs) > +{ > + tree type = TREE_TYPE (var), new_type = NULL_TREE; > + tree tmp = NULL_TREE; > + > + if (omp_is_reference (var)) > +type = TREE_TYPE (type); > + > +

Re: [PATCH][testsuite] Enable vect_usad_char effective target for non-SVE aarch64

2018-12-18 Thread Richard Biener
On Tue, Dec 18, 2018 at 12:40 PM Kyrill Tkachov wrote: > > Hi all, > > In GCC 9 the aarch64 port learned how to do V16QImode SAD operations on > signed and unsigned chars. > But I had missed enabling the effective target for that. > This patch enables that target for non-SVE aarch64. > Two new te

Re: [PATCH 1/6, OpenACC, libgomp] Async re-work, interfaces

2018-12-18 Thread Jakub Jelinek
On Fri, Dec 14, 2018 at 06:52:20PM +0100, Thomas Schwinge wrote: > > --- a/include/gomp-constants.h > > +++ b/include/gomp-constants.h > > > @@ -199,7 +200,7 @@ enum gomp_map_kind > > /* Versions of libgomp and device-specific plugins. GOMP_VERSION > > should be incremented whenever an ABI-i

Re: [PATCH] OpenACC 2.6 manual deep copy support (attach/detach)

2018-12-18 Thread Jakub Jelinek
On Fri, Dec 14, 2018 at 07:00:30PM +, Julian Brown wrote: > OpenACC 2.6 manual deep copy support (attach/detach) > > gcc/c-family/ > * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH, > PRAGMA_OACC_CLAUSE_DETACH. and instead of , ? > --- a/gcc/c-family/

Re: [PATCH 2/6, OpenACC, libgomp] Async re-work, oacc-* parts

2018-12-18 Thread Thomas Schwinge
Hi Chung-Lin! On Tue, 18 Dec 2018 18:02:54 +0800, Chung-Lin Tang wrote: > On 2018/12/17 10:32 PM, Thomas Schwinge wrote: > >> The reason there are deadlocks from inside the plugin on > >> GOMP_PLUGIN_fatal() is when we hold the > >> struct gomp_device_descr's*device* lock, which is also acquir

[PATCH][testsuite] Enable vect_usad_char effective target for non-SVE aarch64

2018-12-18 Thread Kyrill Tkachov
Hi all, In GCC 9 the aarch64 port learned how to do V16QImode SAD operations on signed and unsigned chars. But I had missed enabling the effective target for that. This patch enables that target for non-SVE aarch64. Two new tests now PASS on aarch64: gcc.dg/vect/slp-reduc-sad.c gcc.dg/vect/vect-

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-18 Thread Bin.Cheng
On Sun, Dec 16, 2018 at 9:11 AM Andi Kleen wrote: > > "bin.cheng" writes: > > > Hi, > > > > Due to ICE and mal-functional bugs, indirect call value profile > > transformation > > is disabled on GCC-7/8/trunk. This patch restores the transformation. The > > main issue is AutoFDO should store cg

Re: [PATCH] Fix AVX512VL gather ICEs (PR target/88513, PR target/88514)

2018-12-18 Thread Richard Biener
On Mon, 17 Dec 2018, Jakub Jelinek wrote: > Hi! > > Some of the following testcases ICE, because I was assuming that > VEC_UNPACK_{LO,HI}_EXPR and VEC_PACK_TRUNC_EXPR just work on the > VECTOR_BOOLEAN_TYPE_P mask types that AVX512* has (with scalar modes), > but they really only work if the wider

[PR86153] simplify more overflow tests in VRP

2018-12-18 Thread Alexandre Oliva
Jeff, you mentioned you had changes to the VRP overflow test that would fix this, but I couldn't figure out whether or not you ever put them in and it regressed again later, or what. Anyway, here's my take on it. PR 86153 was originally filed when changes to the C++11's implementation of vector

Re: [PATCH] [MSP430] Fix gcc.dg/pr85180.c and gcc.dg/pr87985.c timeouts for msp430-elf -mlarge

2018-12-18 Thread Jozef Lawrynowicz
On Tue, 18 Dec 2018 03:08:51 -0600 Segher Boessenkool wrote: > Hi! > > On Fri, Dec 14, 2018 at 03:22:13PM +, Jozef Lawrynowicz wrote: > > 2018-12-14 Jozef Lawrynowicz > > > > gcc/ChangeLog: > > * combine.c (update_rsp_from_reg_equal): Only look for the nonzero bits > > of src

Re: [PATCH, rs6000] Clarify when typedef names can be used with AltiVec vector types

2018-12-18 Thread Ulrich Weigand
Bill Schmidt wrote: > +@item > +When using vector in keyword-and-predefine mode; for example, > + > +@smallexample > +/* With -maltivec only: */ This is a bit confusing (at least to me). What does "with -maltivec only" mean here? Just adding -maltivec will *not* switch to keyword-and- predefine

Re: [PATCH] cleanup libgomp's coalesce chunk data structures

2018-12-18 Thread Jakub Jelinek
On Tue, Dec 18, 2018 at 10:59:20AM +0100, Thomas Schwinge wrote: > OK for trunk? > > commit 20d3cbd6e27b10ae1cd352cc177d7697a4a57db0 > Author: Thomas Schwinge > Date: Mon Dec 17 18:26:29 2018 +0100 > > Cleanup libgomp's coalesce chunk data structures > > libgomp/ >

Re: [PATCH 2/6, OpenACC, libgomp] Async re-work, oacc-* parts

2018-12-18 Thread Chung-Lin Tang
On 2018/12/17 10:32 PM, Thomas Schwinge wrote: The reason there are deadlocks from inside the plugin on GOMP_PLUGIN_fatal() is when we hold the struct gomp_device_descr's*device* lock, which is also acquired when we execute atexit device shutdown handlers, hence the deadlock. I don't think th

Re: [PATCH] cleanup libgomp's coalesce chunk data structures

2018-12-18 Thread Thomas Schwinge
Hi Jakub! Julian had a look at this, and now I too (and just fixed some formatting): On Wed, 2 May 2018 13:02:09 -0700, Cesar Philippidis wrote: > Libgomp's usage of struct gomp_coalesce_buf is a little confusing. The > member chunks is an array where the even elements represent the starting >

Re: [PATCH 2/6, OpenACC, libgomp] Async re-work, oacc-* parts

2018-12-18 Thread Chung-Lin Tang
On 2018/12/17 9:52 PM, Thomas Schwinge wrote: Hi Chung-Lin! On Fri, 14 Dec 2018 22:52:44 +0800, Chung-Lin Tang wrote: On 2018/12/14 10:17 PM, Thomas Schwinge wrote: On Tue, 25 Sep 2018 21:10:47 +0800, Chung-Lin Tang wrote: --- a/libgomp/oacc-async.c +++ b/libgomp/oacc-async.c +attribut

[PATCH, arm][PR88167] Fix __builtin_return_address returns invalid address

2018-12-18 Thread Mihail Ionescu
Hi All, In Thumb mode when the function prologue gets expanded, in case of a multiple register push, additional mov instructions are generated to save the high registers which result in lr getting overwritten before it's value can be used to retrieve the return address. The fix consists of d

Re: [patch] Fix bootstrap powerpc*-*-freebsd* targets

2018-12-18 Thread Segher Boessenkool
Hi Alan, On Tue, Dec 18, 2018 at 10:39:27AM +1030, Alan Modra wrote: > On Mon, Dec 17, 2018 at 11:05:57AM -0600, Segher Boessenkool wrote: > > On Mon, Dec 17, 2018 at 10:40:01AM +1030, Alan Modra wrote: > > > Since I broke powerpc*-freebsd and the other non-linux powerpc > > > targets, I guess I o

Re: [PATCH, rs6000] Clarify when typedef names can be used with AltiVec vector types

2018-12-18 Thread Segher Boessenkool
Hi Bill, On Mon, Dec 17, 2018 at 03:54:23PM -0600, Bill Schmidt wrote: > We recently discovered some incorrect documentation about this topic and > agreed it should be changed. > This is my attempt to clarify it. Built and verified on > powerpc64le-linux-gnu. Is this ok for trunk? Okay for tr

Re: [PATCH] [MSP430] Fix gcc.dg/pr85180.c and gcc.dg/pr87985.c timeouts for msp430-elf -mlarge

2018-12-18 Thread Segher Boessenkool
Hi! On Fri, Dec 14, 2018 at 03:22:13PM +, Jozef Lawrynowicz wrote: > 2018-12-14 Jozef Lawrynowicz > > gcc/ChangeLog: > * combine.c (update_rsp_from_reg_equal): Only look for the nonzero bits > of src in nonzero_bits_mode if the mode of src is MODE_INT and > HWI_COMP

Re: [PATCH] Fix AVX512VL gather ICEs (PR target/88513, PR target/88514)

2018-12-18 Thread Jakub Jelinek
On Tue, Dec 18, 2018 at 08:25:37AM +0100, Uros Bizjak wrote: > > : Check for non-VECTOR_MODE_P > > rather than VOIDmode. > > This entry doesn't match the change, you are checking for > VECTOR_MODE_P. On a related note, should similar Ok, I'll write: Check for VECTOR_MODE_P rather