Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-12 Thread Uros Bizjak
On Thu, Jan 11, 2018 at 2:28 PM, H.J. Lu wrote: > Hi Uros, > > Can you take a look at my x86 backend changes so that they are ready > to check in once we have consensus. Please finish the talks about the correct approach first. Once the consensus is reached, please post the final version of the

Re: [PATCH] Fix failure building LLVM with location wrapper nodes (PR c++/83799)

2018-01-12 Thread Markus Trippelsdorf
On 2018.01.11 at 18:21 -0500, David Malcolm wrote: > diff --git a/gcc/testsuite/g++.dg/wrappers/pr83799.C > b/gcc/testsuite/g++.dg/wrappers/pr83799.C > new file mode 100644 > index 000..f93c0ae > --- /dev/null > +++ b/gcc/testsuite/g++.dg/wrappers/pr83799.C > @@ -0,0 +1,18 @@ > +class DataLayo

Re: [PATCH] Fix failure building LLVM with location wrapper nodes (PR c++/83799)

2018-01-12 Thread Markus Trippelsdorf
On 2018.01.12 at 09:07 +0100, Markus Trippelsdorf wrote: > On 2018.01.11 at 18:21 -0500, David Malcolm wrote: > > diff --git a/gcc/testsuite/g++.dg/wrappers/pr83799.C > > b/gcc/testsuite/g++.dg/wrappers/pr83799.C > > new file mode 100644 > > index 000..f93c0ae > > --- /dev/null > > +++ b/gcc/t

[PATCH 1/3] Fix --enable-gather-detailed-mem-stats build.

2018-01-12 Thread marxin
gcc/ChangeLog: 2018-01-11 Martin Liska * Makefile.in: As qsort_chk is implemented in vec.c, add vec.o to linkage of gencfn-macros. * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's passing the info to record_node_allocation_statistics. (te

[PATCH 0/3] Fix broken --enable-gather-detailed-mem-stats build.

2018-01-12 Thread marxin
Hi. Due to changes to qsort where Alexander added new implementation in vec.c, we need to change Makefile.in. Apart from that qsort_chk triggers errors for current implementation of compare function. That's also fixed. Last change is usage of uint64_t for allocation stats counting of GIMPLE statem

[PATCH 2/3] Fix integer overflow in stats of trees.

2018-01-12 Thread marxin
gcc/ChangeLog: 2018-01-12 Martin Liska * tree-core.h: Use uint64_t instead of int. * tree.c (tree_node_counts): Likewise. (tree_node_sizes): Likewise. (dump_tree_statistics): Use PRIu64 in printf format. --- gcc/tree-core.h | 4 ++-- gcc/tree.c | 20 +

[PATCH 3/3] Fix integer overflow in stats of GIMPLE statements.

2018-01-12 Thread marxin
gcc/ChangeLog: 2018-01-12 Martin Liska * gimple.c (gimple_alloc_counts): Use uint64_t instead of int. (gimple_alloc_sizes): Likewise. (dump_gimple_statistics): Use PRIu64 in printf format. * gimple.h: Change uint64_t to int. --- gcc/gimple.c | 17 ++

Re: [PATCH] Fix up handling of not really variable VLAs (PR libgomp/83590)

2018-01-12 Thread Richard Biener
On Thu, 11 Jan 2018, Jakub Jelinek wrote: > Hi! > > My recent C FE lval folding improvements apparently broke OpenMP/OpenACC > handling of constant size VLAs, e.g. > const int size = 4096; > int array[size]; > The problem is that the OpenMP/ACC gimplification/lowering/expansion relies > on TR

[PATCH] Slightly optimize LTO streamed bytecode

2018-01-12 Thread Richard Biener
This optimizes streaming of DECL_DEBUG_EXPR to only when necessary. LTO bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-01-12 Richard Biener * lto-streamer-out.c (DFS::DFS_write_tree_body): Process DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXP

[PATCH] Trivial free-lang-data adjustments for early LTO debug

2018-01-12 Thread Richard Biener
It's now no longer necessary to preserve type related stuff for debug reasons so the following forgos with streaming TYPE_DECLs in TYPE_FIELDS, TYPE_DECLs for TYPE_NAME (where not necessary) and also BINFOs when not needed for devirtualization. I noticed the unpatched code if (TYPE_BINFO (

[PATCH] Add new verification for profile-count.h.

2018-01-12 Thread Martin Liška
Hi. Following patch adds new sanitization checks for profile_quality. Problem is that zero initialization of a struct with profile_count will lead to an invalid counter. This can help to catch them. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed

[PATCH] Initialize type_warnings::dyn_count with a default value (PR ipa/83054).

2018-01-12 Thread Martin Liška
Hi. There's an example of zero initialized profile_count. Instead I guess we want to initialize it to profile_count::zero. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From 0cb1501005429cc7ef1083bfc279d7be2a6197aa Mon Sep 17 00:00:00

Re: [PATCH] Add new verification for profile-count.h.

2018-01-12 Thread Jan Hubicka
> Hi. > > Following patch adds new sanitization checks for profile_quality. > Problem is that zero initialization of a struct with profile_count will > lead to an invalid counter. This can help to catch them. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Read

Re: [PATCH PR82096] Fix ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi

2018-01-12 Thread Christophe Lyon
Hi, On 11 January 2018 at 11:58, Sudakshina Das wrote: > Hi Jeff > > > On 10/01/18 21:08, Jeff Law wrote: >> >> On 01/10/2018 09:25 AM, Sudakshina Das wrote: >>> >>> Hi Jeff >>> >>> On 10/01/18 10:44, Sudakshina Das wrote: Hi Jeff On 09/01/18 23:43, Jeff Law wrote: > >

Re: [PATCH] Fix up handling of not really variable VLAs (PR libgomp/83590)

2018-01-12 Thread Jakub Jelinek
On Fri, Jan 12, 2018 at 09:16:35AM +0100, Richard Biener wrote: > Or another workaround would be to make sure non-constant sizepos > stay non-constant by doing sth like the following? FEs can mark > expressions as TREE_CONSTANT if they don't want this behavior > for things that might optimize to c

Re: [PATCH] Initialize type_warnings::dyn_count with a default value (PR ipa/83054).

2018-01-12 Thread Jan Hubicka
> Hi. > > There's an example of zero initialized profile_count. Instead I guess we want > to initialize it to profile_count::zero. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? > Martin > >From 0cb1501005429cc7ef1083bfc279d7be2a6197aa

Re: [PATCH] Trivial free-lang-data adjustments for early LTO debug

2018-01-12 Thread Jan Hubicka
> > It's now no longer necessary to preserve type related stuff for debug > reasons so the following forgos with streaming TYPE_DECLs in TYPE_FIELDS, > TYPE_DECLs for TYPE_NAME (where not necessary) and also BINFOs when > not needed for devirtualization. > > I noticed the unpatched code > >

[PATCH] Fix PR83157, abstract origins refering to concrete instances

2018-01-12 Thread Richard Biener
This fixes PR83157 (well, not the guality fail...) and avoids creating references to abstract instances that actually end up refering to the concrete instance thereby eventually picking up invalid location attributes (and whatever else there may be). As said in the PR a simple testcase int foo (

RE: [PATCH] Fix various x86 avx512{bitalg,vpopcntdq,vbmi2} issues (PR target/83488)

2018-01-12 Thread Koval, Julia
Changelog gcc/ * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask, _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask, _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask, _mm_mask_bitshuffle_epi64_mask): Fix type. * confi

Re: [PATCH 5/5] Fix test-suite fallout.

2018-01-12 Thread Jan Hubicka
> Last patch from the series it clean up of test-suite. > > Martin > >From e76a4544e236d7d586380f33e20431f854436ce4 Mon Sep 17 00:00:00 2001 > From: marxin > Date: Tue, 9 Jan 2018 10:52:36 +0100 > Subject: [PATCH 5/5] Fix test-suite fallout. > > gcc/testsuite/ChangeLog: > > 2018-01-09 Martin

Re: C++ PATCH to add a test for c++/81860

2018-01-12 Thread Rainer Orth
Hi Nathan, >> On 01/02/2018 09:36 AM, Marek Polacek wrote: >>> This test exercising inheriting a template constructor in this PR got >>> fixed with >>> r251426. As I don't see any lambdas here, I thought it worth to add it. >>> >>> Tested on x86_64-linux, ok for trunk? >>> >>> 2018-01-02 Marek P

Re: [PATCH] Fix PR83157, abstract origins refering to concrete instances

2018-01-12 Thread Richard Biener
On Fri, 12 Jan 2018, Richard Biener wrote: > > This fixes PR83157 (well, not the guality fail...) and avoids creating > references to abstract instances that actually end up refering to > the concrete instance thereby eventually picking up invalid location > attributes (and whatever else there ma

Re: [PATCH] Fix PR83157, abstract origins refering to concrete instances

2018-01-12 Thread Jakub Jelinek
On Fri, Jan 12, 2018 at 09:53:28AM +0100, Richard Biener wrote: > This fixes PR83157 (well, not the guality fail...) and avoids creating > references to abstract instances that actually end up refering to > the concrete instance thereby eventually picking up invalid location > attributes (and whate

Re: [PATCH] Fix up handling of not really variable VLAs (PR libgomp/83590)

2018-01-12 Thread Richard Biener
On Fri, 12 Jan 2018, Jakub Jelinek wrote: > On Fri, Jan 12, 2018 at 09:16:35AM +0100, Richard Biener wrote: > > Or another workaround would be to make sure non-constant sizepos > > stay non-constant by doing sth like the following? FEs can mark > > expressions as TREE_CONSTANT if they don't want

Re: [Patch][ARM] Add -mbranch-cost option, and update a few tests

2018-01-12 Thread Rainer Orth
Hi Christophe, > On 10 January 2018 at 15:44, Jakub Jelinek wrote: >> On Mon, Oct 23, 2017 at 02:30:24PM +0200, Christophe Lyon wrote: >>> After Jakub's suggestion in PR82120 and PR81184, the attached patch >>> adds the -mbranch-cost option to the ARM target. My understanding >>> is that it's int

Re: C++ PATCH to add a test for c++/81860

2018-01-12 Thread Marek Polacek
On Fri, Jan 12, 2018 at 10:12:15AM +0100, Rainer Orth wrote: > Hi Nathan, > > >> On 01/02/2018 09:36 AM, Marek Polacek wrote: > >>> This test exercising inheriting a template constructor in this PR got > >>> fixed with > >>> r251426. As I don't see any lambdas here, I thought it worth to add it.

Link with correct values-*.o files on Solaris (PR target/40411)

2018-01-12 Thread Rainer Orth
On Solaris, gcc has long failed to enable libc's C99 mode as documented in PR target/40411. To do so, one needs to link with a values-xpg6.o file provided by the system. That file defines a __xpg6 variable in a way which lets libc (and in some cases libm) select between C99 and non-C99 behaviour

Ping: Extra subreg fold for variable-length CONST_VECTORs

2018-01-12 Thread Richard Sandiford
Ping. FWIW, the SLP test failures it fixes were ICEs rather than code-quality tests, so this is a correctness fix rather than an optimisation. Thanks, Richard Richard Sandiford writes: > The SVE support for the new CONST_VECTOR encoding needs to be able > to extract the first N bits of the vect

[testsuite] Add dg-require-effective-target alloca for c++ test-cases

2018-01-12 Thread Tom de Vries
Hi, this patch adds dg-require-effective-target alloca for c++ test-cases. Build and reg-tested on x86_64 and nvptx. Committed as obvious. Thanks, - Tom Add dg-require-effective-target alloca for c++ test-cases 2018-01-12 Tom de Vries * c-c++-common/dwarf2/vla1.c: Add dg-require-effectiv

[testsuite] Add dg-require-effective-target indirect_jumps for g++

2018-01-12 Thread Tom de Vries
Hi, this patch adds dg-require-effective-target indirect_jumps for g++ test-cases. Build and reg-tested on x86_64 and nvptx. Committed as obvious. Thanks, - Tom Add dg-require-effective-target indirect_jumps for g++ 2018-01-12 Tom de Vries * g++.dg/ext/label13.C: Add dg-require-effecti

Re: [Patch][ARM] Add -mbranch-cost option, and update a few tests

2018-01-12 Thread Christophe Lyon
On 12 January 2018 at 10:25, Rainer Orth wrote: > Hi Christophe, > >> On 10 January 2018 at 15:44, Jakub Jelinek wrote: >>> On Mon, Oct 23, 2017 at 02:30:24PM +0200, Christophe Lyon wrote: After Jakub's suggestion in PR82120 and PR81184, the attached patch adds the -mbranch-cost option

Re: [Patch][ARM] Add -mbranch-cost option, and update a few tests

2018-01-12 Thread Rainer Orth
Hi Christophe, >> not at all, but it has two problems: >> >> * The new branch_cost effective-target keyword needs documenting in >> sourcebuild.texi, as always. >> > > Sorry, I keep forgetting this. How about the trivial attached patch? (I'm > mainly > asking to check I add it to the most appro

Fix PR rtl-optimization/83565

2018-01-12 Thread Eric Botcazou
cazou * gcc.c-torture/execute/20180112-1.c: New test. -- Eric BotcazouIndex: rtlanal.c === --- rtlanal.c (revision 256562) +++ rtlanal.c (working copy) @@ -4429,7 +4429,7 @@ nonzero_bits1 (const_rtx x, scalar_

Fix PR target/83368

2018-01-12 Thread Eric Botcazou
This fixes a somewhat obscure interaction between alloca and setjmp/longjmp in PIC mode on the SPARC architecture. The problem is that the canonical PIC register on SPARC (%l7) is call-saved like on other architectures but, unlike on other architectures, not (always) preserved by setjmp. There

[PATCH] rs6000: Tune new testcase (PR83629)

2018-01-12 Thread Segher Boessenkool
It has some problems running on some 64-bit configuratiions, and the bug it is testing for is only on 32-bit; so let's not run it elsewhere. Committing to trunk. Segher 2018-01-12 Segher Boessenkool gcc/testsuite/ PR target/83629 * gcc.target/powerpc/pr83629.c: Require ilp3

Re: [PATCH 1/7]: SVE: Add CLOBBER_HIGH expression

2018-01-12 Thread Alan Hayward
> On 19 Dec 2017, at 16:27, Jeff Law wrote: > > On 12/19/2017 03:12 AM, Alan Hayward wrote: >> Ping ping. >> I think there should be enough information in the first test to show that >> any "set to self” >> registers become live. Let me know if there’s anything I’ve missed. > I think that both

Re: [PR 81616] Deferring FMA transformations in tight loops

2018-01-12 Thread Richard Biener
On Wed, 10 Jan 2018, Martin Jambor wrote: > Hello, > > I would really like to ping the FMA transformation prevention patch that > I sent here in December, which, after incorporating a suggestion from > Richi, re-base and re-testing, I re-post below. I really think that it > should make into gcc

Re: [PATCH, r3], Add optional IEEE/IBM long double multilib support

2018-01-12 Thread Michael Meissner
Of course it would be helpful, if I included the patch: 2018-01-12 Michael Meissner * config.gcc (powerpc*-linux*-*): Add support for 64-bit little endian Linux systems to optionally enable multilibs for selecting the long double type if the user configured an explicit

Re: [PATCH 0/3] Fix broken --enable-gather-detailed-mem-stats build.

2018-01-12 Thread Richard Biener
On Fri, Jan 12, 2018 at 9:10 AM, marxin wrote: > Hi. > > Due to changes to qsort where Alexander added new implementation in vec.c, > we need to change Makefile.in. Apart from that qsort_chk triggers errors > for current implementation of compare function. That's also fixed. > Last change is usage

Re: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread Martin Jambor
Hi, On Thu, Jan 11 2018, Jeff Law wrote: > On 01/07/2018 03:59 PM, H.J. Lu wrote: >> Add -mindirect-branch-loop= option to control loop filler in call and >> return thunks generated by -mindirect-branch=. 'lfence' uses "lfence" >> as loop filler. 'pause' uses "pause" as loop filler. 'nop' uses

Re: PR83648

2018-01-12 Thread Richard Biener
On Fri, 12 Jan 2018, Prathamesh Kulkarni wrote: > On 12 January 2018 at 05:02, Jeff Law wrote: > > On 01/10/2018 10:04 PM, Prathamesh Kulkarni wrote: > >> On 11 January 2018 at 04:50, Jeff Law wrote: > >>> On 01/09/2018 05:57 AM, Prathamesh Kulkarni wrote: > > As Jakub pointed out for

[testsuite, i386] Guard against incomplete AVX512F support in Solaris as

2018-01-12 Thread Rainer Orth
Recent versions of the Solaris/x86 assembler do support AVX512F, but there are a couple of bugs: it chokes on vaddsd {rn-sae}, %xmm2, %xmm0, %xmm0 vaddsd {rn-sae}, %xmm0, %xmm1, %xmm5{%k1} vaddsd {rn-sae}, %xmm2, %xmm0, %xmm0{%k1}{z} and similar for vaddss, vdivs[ds], v

[PATCH] Fix part of PR83157

2018-01-12 Thread Richard Biener
This fixes the bogus DW_AT_abstract_origins in the PR83157 testcase. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk sofar. Richard. 2018-01-12 Richard Biener PR debug/83157 * dwarf2out.c (gen_variable_die): Do not reset old_die for inline inst

[PATCH 0/4] x86: CVE-2017-5715, aka Spectre

2018-01-12 Thread H.J. Lu
This set of patches for GCC 8 mitigates variant #2 of the speculative execution vulnerabilities on x86 processors identified by CVE-2017-5715, aka Spectre. They convert indirect branches and function returns to call and return thunks to avoid speculative execution via indirect call, jmp and ret.

[PATCH 4/4] x86: Add 'V' register operand modifier

2018-01-12 Thread H.J. Lu
Add 'V', a special modifier which prints the name of the full integer register without '%'. For extern void (*func_p) (void); void foo (void) { asm ("call __x86_indirect_thunk_%V0" : : "a" (func_p)); } it generates: foo: movqfunc_p(%rip), %rax call__x86_indirect_thunk

[PATCH 2/4] x86: Add -mfunction-return=

2018-01-12 Thread H.J. Lu
Add -mfunction-return= option to convert function return to call and return thunks. The default is 'keep', which keeps function return unmodified. 'thunk' converts function return to call and return thunk. 'thunk-inline' converts function return to inlined call and return thunk. 'thunk-extern'

[PATCH 1/4] x86: Add -mindirect-branch=

2018-01-12 Thread H.J. Lu
Add -mindirect-branch= option to convert indirect call and jump to call and return thunks. The default is 'keep', which keeps indirect call and jump unmodified. 'thunk' converts indirect call and jump to call and return thunk. 'thunk-inline' converts indirect call and jump to inlined call and re

[PATCH 3/4] x86: Add -mindirect-branch-register

2018-01-12 Thread H.J. Lu
Add -mindirect-branch-register to force indirect branch via register. This is implemented by disabling patterns of indirect branch via memory, similar to TARGET_X32. -mindirect-branch= and -mfunction-return= tests are updated with -mno-indirect-branch-register to avoid false test failures when -mi

Re: [PATCH 2/5] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-01-12 Thread Torvald Riegel
On Tue, 2018-01-09 at 17:54 +, Mike Crowe wrote: > On Tuesday 09 January 2018 at 13:50:54 +, Jonathan Wakely wrote: > > On 07/01/18 20:55 +, Mike Crowe wrote: > > > The futex system call supports waiting for an absolute time if > > > FUTEX_WAIT_BITSET is used rather than FUTEX_WAIT. Doi

Re: [PATCH] Simplify floating point comparisons

2018-01-12 Thread Wilco Dijkstra
Hi, Here is the updated version: This patch implements some of the optimizations discussed in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71026. Simplify (C / x >= 0.0) into x >= 0.0 with -fno-signed-zeros and -ffinite-math-only. If C is negative the comparison is reversed. Only handle >= and

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-12 Thread H.J. Lu
On Fri, Jan 12, 2018 at 12:01 AM, Uros Bizjak wrote: > On Thu, Jan 11, 2018 at 2:28 PM, H.J. Lu wrote: > >> Hi Uros, >> >> Can you take a look at my x86 backend changes so that they are ready >> to check in once we have consensus. > > Please finish the talks about the correct approach first. Once

Re: Use poly_int tree accessors

2018-01-12 Thread Richard Sandiford
Richard Sandiford writes: > Jeff Law writes: >> On 01/09/2018 11:39 AM, Richard Sandiford wrote: >>> This patch generalises various places that used hwi tree accessors >>> so that they can handle poly_ints instead. Earlier patches did >>> this while updating interfaces; this patch just mops up s

Allow variable-sized temporary variables in gimplify.c

2018-01-12 Thread Richard Sandiford
This is needed to build libgfortran for SVE. The OpenMP code needs to create temporary vector variables, and the variables will therefore be variable-sized for SVE. Earlier patches made such variables work. Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. Also tested by c

Handle poly_int vector sizes in get_vec_alignment_for_array_type

2018-01-12 Thread Richard Sandiford
get_vectype_for_scalar_type returns a variable-length vector type for SVE, whereas get_vec_alignment_for_array_type assumed it would always be an INTEGER_CST. This is needed to build libstdc++-v3/src/closures.cc for SVE (and probably many other places besides -- this was just the first hit). Test

Re: [testsuite, i386] Guard against incomplete AVX512F support in Solaris as

2018-01-12 Thread Uros Bizjak
On Fri, Jan 12, 2018 at 1:58 PM, Rainer Orth wrote: > Recent versions of the Solaris/x86 assembler do support AVX512F, but > there are a couple of bugs: it chokes on > > vaddsd {rn-sae}, %xmm2, %xmm0, %xmm0 > vaddsd {rn-sae}, %xmm0, %xmm1, %xmm5{%k1} > vaddsd {rn-sae}, %

Handle polynomial DR_INIT

2018-01-12 Thread Richard Sandiford
The idea with the main 107-patch poly_int series (latterly 109-patch) was to change the mode sizes and vector element counts to poly_int and then propagate those changes as far as they needed to go to fix build failures from incompatible types. This means that DR_INIT is now constructed as a poly_

Re: Allow variable-sized temporary variables in gimplify.c

2018-01-12 Thread Richard Biener
On Fri, Jan 12, 2018 at 2:33 PM, Richard Sandiford wrote: > This is needed to build libgfortran for SVE. The OpenMP code needs > to create temporary vector variables, and the variables will therefore > be variable-sized for SVE. Earlier patches made such variables work. > > Tested on aarch64-lin

Re: Handle poly_int vector sizes in get_vec_alignment_for_array_type

2018-01-12 Thread Richard Biener
On Fri, Jan 12, 2018 at 2:34 PM, Richard Sandiford wrote: > get_vectype_for_scalar_type returns a variable-length vector type > for SVE, whereas get_vec_alignment_for_array_type assumed it would > always be an INTEGER_CST. > > This is needed to build libstdc++-v3/src/closures.cc for SVE > (and pro

Re: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread H.J. Lu
On Fri, Jan 12, 2018 at 4:38 AM, Martin Jambor wrote: > Hi, > > On Thu, Jan 11 2018, Jeff Law wrote: >> On 01/07/2018 03:59 PM, H.J. Lu wrote: >>> Add -mindirect-branch-loop= option to control loop filler in call and >>> return thunks generated by -mindirect-branch=. 'lfence' uses "lfence" >>> as

Re: Handle polynomial DR_INIT

2018-01-12 Thread Richard Biener
On Fri, Jan 12, 2018 at 2:47 PM, Richard Sandiford wrote: > The idea with the main 107-patch poly_int series (latterly 109-patch) > was to change the mode sizes and vector element counts to poly_int and > then propagate those changes as far as they needed to go to fix build > failures from incompa

[PATCH][ARM] Fix test fail with conflicting -mfloat-abi

2018-01-12 Thread Sudakshina Das
Hi This patch fixes my earlier test case that fails for arm-none-eabi with explicit user option for -mfloat-abi which conflict with the test case options. I have added a guard to skip the test on those cases. @Christophe: Sorry about this. I think this should fix the test case. Can you please co

RE: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread Kumar, Venkataramanan
Hi all, > -Original Message- > From: H.J. Lu [mailto:hjl.to...@gmail.com] > Sent: Friday, January 12, 2018 7:36 PM > To: Martin Jambor > Cc: Nagarajan, Muthu kumar raj ; > Kumar, Venkataramanan ; GCC > Patches ; Jeff Law > Subject: Re: [PATCH 2/5] x86: Add -mindirect-branch-loop= > > On

Re: [PATCH 2/5] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-01-12 Thread Jonathan Wakely
On 12/01/18 14:18 +0100, Torvald Riegel wrote: On Tue, 2018-01-09 at 17:54 +, Mike Crowe wrote: On Tuesday 09 January 2018 at 13:50:54 +, Jonathan Wakely wrote: > On 07/01/18 20:55 +, Mike Crowe wrote: > > The futex system call supports waiting for an absolute time if > > FUTEX_WAIT_

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-12 Thread Jan Hubicka
> On Fri, Jan 12, 2018 at 12:01 AM, Uros Bizjak wrote: > > On Thu, Jan 11, 2018 at 2:28 PM, H.J. Lu wrote: > > > >> Hi Uros, > >> > >> Can you take a look at my x86 backend changes so that they are ready > >> to check in once we have consensus. > > > > Please finish the talks about the correct ap

RE: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread Kumar, Venkataramanan
Hi all, > -Original Message- > From: Kumar, Venkataramanan > Sent: Friday, January 12, 2018 8:16 PM > To: 'H.J. Lu' ; Martin Jambor > Cc: Nagarajan, Muthu kumar raj ; > GCC Patches ; Jeff Law ; Uros > Bizjak (ubiz...@gmail.com) ; 'Jan Hubicka' > > Subject: RE: [PATCH 2/5] x86: Add -mind

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-12 Thread H.J. Lu
On Fri, Jan 12, 2018 at 6:50 AM, Jan Hubicka wrote: >> On Fri, Jan 12, 2018 at 12:01 AM, Uros Bizjak wrote: >> > On Thu, Jan 11, 2018 at 2:28 PM, H.J. Lu wrote: >> > >> >> Hi Uros, >> >> >> >> Can you take a look at my x86 backend changes so that they are ready >> >> to check in once we have con

Re: [3/4] [AArch64] SVE tests

2018-01-12 Thread Richard Sandiford
James Greenhalgh writes: > On Sat, Jan 06, 2018 at 07:13:22PM +, Richard Sandiford wrote: >> James Greenhalgh writes: >> > On Fri, Nov 03, 2017 at 05:50:54PM +, Richard Sandiford wrote: >> >> This patch adds gcc.target/aarch64 tests for SVE, and forces some >> >> existing Advanced SIMD te

Re: [PATCH v2] Change default to -fno-math-errno

2018-01-12 Thread Wilco Dijkstra
Joseph Myers wrote:   > No existing glibc version defines math_errhandling based on > __NO_MATH_ERRNO__.  I'd expect such a change to come with a glibc patch, > and indeed a GCC execution test of the value of math_errhandling to make > sure the compiler's behavior isn't contradicting what's decl

Re: [PATCH] Fix up handling of not really variable VLAs (PR libgomp/83590)

2018-01-12 Thread Jakub Jelinek
On Fri, Jan 12, 2018 at 10:25:30AM +0100, Richard Biener wrote: > On Fri, 12 Jan 2018, Jakub Jelinek wrote: > > > On Fri, Jan 12, 2018 at 09:16:35AM +0100, Richard Biener wrote: > > > Or another workaround would be to make sure non-constant sizepos > > > stay non-constant by doing sth like the fol

[PATCH] Workaround for a GDB bug for -flto -freorder-blocks-and-partition -g (PR debug/81155)

2018-01-12 Thread Jakub Jelinek
Hi! The LTO debug changes create a DW_TAG_subprogram in main in one spot and a small DW_TAG_subprogram that has DW_AT_abstract_origin to that + DW_AT_ranges when doing hot/cold partitioning. Unfortunately, it seems GDB in that case doesn't read the DIE in the initial debug info read, as read_part

Re: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread Jeff Law
On 01/12/2018 08:09 AM, Kumar, Venkataramanan wrote: > Hi all, > >> -Original Message- >> From: Kumar, Venkataramanan >> Sent: Friday, January 12, 2018 8:16 PM >> To: 'H.J. Lu' ; Martin Jambor >> Cc: Nagarajan, Muthu kumar raj ; >> GCC Patches ; Jeff Law ; Uros >> Bizjak (ubiz...@gmail.c

Re: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread Jeff Law
On 01/12/2018 07:05 AM, H.J. Lu wrote: > On Fri, Jan 12, 2018 at 4:38 AM, Martin Jambor wrote: >> Hi, >> >> On Thu, Jan 11 2018, Jeff Law wrote: >>> On 01/07/2018 03:59 PM, H.J. Lu wrote: Add -mindirect-branch-loop= option to control loop filler in call and return thunks generated by -mi

[C PATCH] Outside of initializers partially restore c_fully_fold 7.x behavior (PR c/83801)

2018-01-12 Thread Jakub Jelinek
Hi! In 7.x and earlier, decl_constant_value_for_optimization punted if the initializer has ARRAY_TYPE or BLKmode type, and the following patch shows that is reasonable thing to do, otherwise we might grab very large initializers out of constant variable initializers and if e.g. ARRAY_REF on it doe

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-12 Thread Richard Earnshaw (lists)
On 10/01/18 23:26, Jeff Law wrote: > On 01/08/2018 09:01 AM, Bill Schmidt wrote: >> On Jan 8, 2018, at 8:06 AM, Richard Earnshaw (lists) >> wrote: >>> >>> On 08/01/18 02:20, Bill Schmidt wrote: Hi Richard, Unfortunately, I don't see any way that this will be useful for the ppc >>>

[PATCH] x86: Disallow -mindirect-branch=/-mfunction-return= with -mshstk

2018-01-12 Thread H.J. Lu
On Thu, Jan 11, 2018 at 3:00 PM, H.J. Lu wrote: > On Thu, Jan 11, 2018 at 2:46 PM, Jeff Law wrote: >> Do you want to mention that CET and retpolines are inherently > > I will document it. > >> incompatible? Should an attempt to use them together generate a >> compile-time error? >> > > Compile-

[PATCH] rs6000: Remove -mstring

2018-01-12 Thread Segher Boessenkool
-mstring is only enabled by default on 601, and with -Os on some configurations. It is almost always slower (than not using it) and does not very often lead to smaller code. This patch disables it. If a user uses -mstring he gets a warning (but not with -mno-string). I left the target attribute

Re: PR81703 and Martin's fix for PR83501

2018-01-12 Thread Martin Sebor
On 01/11/2018 11:44 PM, Prathamesh Kulkarni wrote: On 12 January 2018 at 06:15, Martin Sebor wrote: On 01/11/2018 02:48 PM, Rainer Orth wrote: Hi Martin, I am not sure why constant string is not emitted for arm-linux-gnueabihf ? As far as this issue is concerned, should I simply XFAIL it on

Re: Add support for masked load/store_lanes

2018-01-12 Thread Richard Sandiford
Sorry, just realised this wasn't ACKed Jeff Law writes: > On 11/17/2017 02:36 AM, Richard Sandiford wrote: >> Richard Sandiford writes: >>> This patch adds support for vectorising groups of IFN_MASK_LOADs >>> and IFN_MASK_STOREs using conditional load/store-lanes instructions. >>> This requires

Re: [PATCH] Fix up handling of not really variable VLAs (PR libgomp/83590)

2018-01-12 Thread Richard Biener
On January 12, 2018 4:47:41 PM GMT+01:00, Jakub Jelinek wrote: >On Fri, Jan 12, 2018 at 10:25:30AM +0100, Richard Biener wrote: >> On Fri, 12 Jan 2018, Jakub Jelinek wrote: >> >> > On Fri, Jan 12, 2018 at 09:16:35AM +0100, Richard Biener wrote: >> > > Or another workaround would be to make sure

Re: [PATCH] Workaround for a GDB bug for -flto -freorder-blocks-and-partition -g (PR debug/81155)

2018-01-12 Thread Richard Biener
On January 12, 2018 4:52:27 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >The LTO debug changes create a DW_TAG_subprogram in main in one spot >and >a small DW_TAG_subprogram that has DW_AT_abstract_origin to that + >DW_AT_ranges when doing hot/cold partitioning. Unfortunately, it seems >GDB >in th

[PATCH, alpha]: Work around PR83628, performance regression when accessing arrays on alpha

2018-01-12 Thread Uros Bizjak
Hello! It turns out that without ashlsi3 named pattern combine pass won't simplify subregs in: (set (reg:SI 74) (plus:SI (subreg:SI (ashift:DI (reg:DI 17 $17 [ b ]) (const_int 2 [0x2])) 0) (reg:SI 16 $16 [ a ]))) Attached patch adds relevant insn-and-split patterns to

Re: [PATCH] i386: Align stack frame if argument is passed on stack

2018-01-12 Thread Uros Bizjak
On Thu, Jan 11, 2018 at 10:17 PM, H.J. Lu wrote: > On Thu, Jan 11, 2018 at 11:07 AM, Uros Bizjak wrote: >> On Wed, Jan 10, 2018 at 9:40 PM, H.J. Lu wrote: >>> When a function call is removed, it may become a leaf function. But if >>> argument may be passed on stack, we need to align the stack f

Re: [PATCH] Fix up handling of not really variable VLAs (PR libgomp/83590)

2018-01-12 Thread Jakub Jelinek
On Fri, Jan 12, 2018 at 05:45:15PM +0100, Richard Biener wrote: > >In a few C testcases the cases with TREE_CONSTANT before gimplify_expr > >are > >stuff like: > >extern void dynreplace_trampoline(void); > >extern void dynreplace_trampoline_endlabel(void); > >int dynreplace_add_trampoline(void) > >

patch to fix PR80481

2018-01-12 Thread Vladimir Makarov
  The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80481    During forming an allocation thread in a multi-region function a conflict allocno was added to the thread and that resulted in generation of additional moves.  The patch prevents inclusion of conflict allocnos i

Re: [PATCH], Set PowerPC .gnu_attribute for long double use if no call

2018-01-12 Thread Segher Boessenkool
On Thu, Jan 11, 2018 at 01:11:05PM -0500, Michael Meissner wrote: > In working on the transition of PowerPC long double from using the IBM > extended > double format to IEEE 128-bit floating point, I noticed that the long double > .gnu_attribute (#4) was not set if the compiler can handle long dou

Re: [PATCH, rs6000] pr58684, pr83759 Disable test cases that fail on powerpc64.

2018-01-12 Thread Segher Boessenkool
On Thu, Jan 11, 2018 at 01:36:53PM -0600, Bill Seurer wrote: > [PATCH, rs6000] pr58684, pr83759 Disable test cases that fail on powerpc64. > > This patch disables a few test cases on powerpc64 that fail after r256380 > due to a longstanding issue with floating-point compares. > > See https://gcc.

Re: [PATCH] Add PowerPC configuration option --with-long-double-format={ibm,ieee}

2018-01-12 Thread Segher Boessenkool
On Thu, Jan 11, 2018 at 05:35:59PM -0500, Michael Meissner wrote: > On Wed, Jan 10, 2018 at 11:48:30PM +, Joseph Myers wrote: > > On Wed, 10 Jan 2018, Michael Meissner wrote: > > > > > This patch is next in my series of patches to enable us to configure the > > > long > > > double type on Pow

[PATCH v2] Fix failure building LLVM with location wrapper nodes (PR c++/83799)

2018-01-12 Thread David Malcolm
On Fri, 2018-01-12 at 09:07 +0100, Markus Trippelsdorf wrote: > On 2018.01.11 at 18:21 -0500, David Malcolm wrote: > > diff --git a/gcc/testsuite/g++.dg/wrappers/pr83799.C > > b/gcc/testsuite/g++.dg/wrappers/pr83799.C > > new file mode 100644 > > index 000..f93c0ae > > --- /dev/null > > +++ b/g

Re: PR81703 and Martin's fix for PR83501

2018-01-12 Thread Jeff Law
On 01/12/2018 09:23 AM, Martin Sebor wrote: > On 01/11/2018 11:44 PM, Prathamesh Kulkarni wrote: >> On 12 January 2018 at 06:15, Martin Sebor wrote: >>> On 01/11/2018 02:48 PM, Rainer Orth wrote: Hi Martin, >> I am not sure why constant string is not emitted for >> arm-linux

[committed, PR83737] Set use_gcc_stdint=wrap for nvptx

2018-01-12 Thread Tom de Vries
Hi, atm, for nvptx we have the following failure: ... FAIL: gcc.dg/stdint-width-1.c (test for excess errors) ... In more detail: ... gcc/testsuite/gcc.dg/stdint-width-1.c:20:4: error: #error "missing INT8_WIDTH" ... The test fails because newlib's stdint.h lacks TS 18661-1 support. The test

Re: Link with correct values-*.o files on Solaris (PR target/40411)

2018-01-12 Thread Joseph Myers
On Fri, 12 Jan 2018, Rainer Orth wrote: > At the same time, I had a new look at when values-Xc.o is used by the > Studio compilers. It selects strict ISO C mode in a couple of cases, > and the latest Studio 12.6 cc, which is about to do away with the > previous -Xc option which enabled that mode

Re: [PATCH 1/4] x86: Add -mindirect-branch=

2018-01-12 Thread Jan Hubicka
> gcc/ > > * config/i386/i386-opts.h (indirect_branch): New. > * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise. > * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone > with local indirect jump when converting indirect call and jump. > (ix86_

Re: [PATCH, r3], Add optional IEEE/IBM long double multilib support

2018-01-12 Thread Segher Boessenkool
On Fri, Jan 12, 2018 at 07:23:37AM -0500, Michael Meissner wrote: > Of course it would be helpful, if I included the patch: Yup :-) > 2018-01-12 Michael Meissner > > * config.gcc (powerpc*-linux*-*): Add support for 64-bit little > endian Linux systems to optionally enable multili

Re: PR81703 and Martin's fix for PR83501

2018-01-12 Thread Jakub Jelinek
On Fri, Jan 12, 2018 at 10:38:39AM -0700, Jeff Law wrote: > >>> Thanks for pointing it out.  I see it there as well with > >>> Prathamesh's test case, though not with the test case in > >>> bug 83543.  It is the same root cause in both.  I agree > >>> that enhancing the strlen pass to handle this c

Re: [PATCH 2/4] x86: Add -mfunction-return=

2018-01-12 Thread Jan Hubicka
> Add -mfunction-return= option to convert function return to call and > return thunks. The default is 'keep', which keeps function return > unmodified. 'thunk' converts function return to call and return thunk. > 'thunk-inline' converts function return to inlined call and return thunk. > 'thun

Re: [PATCH 2/5] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-01-12 Thread Joseph Myers
On Fri, 12 Jan 2018, Torvald Riegel wrote: > Another option might be to require a minimum glibc version on Linux, and > build libstdc++ for that. That would yield a minimum kernel version as > well, and we may can make use of other things in return such as syscall > wrappers. A minimum glibc ver

Re: [PATCH 1/5] x86: Add -mindirect-branch=

2018-01-12 Thread Jeff Law
On 01/11/2018 04:07 PM, Jakub Jelinek wrote: > On Thu, Jan 11, 2018 at 03:46:51PM -0700, Jeff Law wrote: >> Note I'm expecting Uros to chime in. So please do not consider this >> ack'd until you hear from Uros. >> >> At a high level is there really that much value in having thunks in the >> object

Re: [PATCH, r3], Add optional IEEE/IBM long double multilib support

2018-01-12 Thread Segher Boessenkool
Hi! On Fri, Jan 12, 2018 at 01:46:27AM -0500, Michael Meissner wrote: > This is my current multilib version support for migrating PowerPC servers from > using IBM extended double as the long double type to IEEE 128-bit floating > point. > > I have built both little endian and big endian PowerPC t

Re: [PATCH 1/5] x86: Add -mindirect-branch=

2018-01-12 Thread Jakub Jelinek
On Fri, Jan 12, 2018 at 10:57:08AM -0700, Jeff Law wrote: > On 01/11/2018 04:07 PM, Jakub Jelinek wrote: > > On Thu, Jan 11, 2018 at 03:46:51PM -0700, Jeff Law wrote: > >> Note I'm expecting Uros to chime in. So please do not consider this > >> ack'd until you hear from Uros. > >> > >> At a high l

Re: [PATCH 3/4] x86: Add -mindirect-branch-register

2018-01-12 Thread Jan Hubicka
> Add -mindirect-branch-register to force indirect branch via register. > This is implemented by disabling patterns of indirect branch via memory, > similar to TARGET_X32. > > -mindirect-branch= and -mfunction-return= tests are updated with > -mno-indirect-branch-register to avoid false test failu

  1   2   >