Re: [PATCH] avoid using %lli et al.

2018-01-04 Thread Jakub Jelinek
On Wed, Jan 03, 2018 at 05:00:41PM -0700, Martin Sebor wrote: > This is an example where having a solution for bug 78014 would > be helpful. I.e., a -Wformat checker to help enforce the use No, because %zu isn't portable enough for all the hosts we support. What we could do is define SIZE_T_PRIN

[PATCH] Yet another expand_debug_expr BLKmode fix (PR debug/83666)

2018-01-04 Thread Jakub Jelinek
Hi! Another spot where we need to punt on BLKmode, otherwise we try to create a subreg with BLKmode, or ZERO/SIGN_EXTEND with BLKmode. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Eventually, we should try to handle both hw and generic vectors in the debug info better, bu

[PATCH] RTEMS/EPIPHANY: Add RTEMS support

2018-01-04 Thread Sebastian Huber
gcc/ config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration. config/epiphany/rtems.h: New file. libgcc/ config.host (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration. --- gcc/config.gcc | 16 gcc/config/epip

Re: [PR c++/83667] Fix tree_dump ICE

2018-01-04 Thread Rainer Orth
Hi Nathan, > This fixes a tree dumping ICE involving static thunk fns. Copying the > thunked-to fn's context suffices. the new test FAILs on Solaris/SPARC: FAIL: g++.dg/ipa/pr83667.C -std=gnu++11 scan-ipa-dump inline "summary for void c::*.LTHUNK0" FAIL: g++.dg/ipa/pr83667.C -std=gnu++1

Re: [PR c++/83667] Fix tree_dump ICE

2018-01-04 Thread Jakub Jelinek
On Thu, Jan 04, 2018 at 09:55:10AM +0100, Rainer Orth wrote: > Hi Nathan, > > > This fixes a tree dumping ICE involving static thunk fns. Copying the > > thunked-to fn's context suffices. > > the new test FAILs on Solaris/SPARC: > > FAIL: g++.dg/ipa/pr83667.C -std=gnu++11 scan-ipa-dump inline

Avoid Solaris/SPARC comparison failures with Solaris as (PR bootstrap/81926)

2018-01-04 Thread Rainer Orth
Bootstrapping on Solaris/SPARC with /bin/as fails in make compare. The difference is always like this: * With -gtoggle (stage2), there's no .text section in the assembler output. * Without -gtoggle (stage3), the assembler output gets --- table.s.gtoggle 2017-08-28 14:07:23.811292680 +

PR83675: Restore TARGET_VIS2 check for SPARC vec_perm_const

2018-01-04 Thread Richard Sandiford
I'd missed a TARGET_VIS2 condition when replacing vec_perm_const_optab with TARGET_VECTORIZE_VEC_PERM_CONST in r256093. Tested by Rainer on sparc-sun-solaris* (thanks) and installed as obvious. Sorry the dumb mistake. Richard 2018-01-04 Richard Sandiford gcc/ PR target/83675

Allow VEC_PERM_EXPR folding to fail

2018-01-04 Thread Richard Sandiford
tree-ssa-forwprop.c was asserting that a VEC_PERM_EXPR fold on three VECTOR_CSTs would always succeed, but it's possible for it to fail with variable-length vectors. Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. Also tested by comparing the before and after assembly outp

[PATCH, alpha]: Fix PR 83628, performance regression when accessing arrays on alpha

2018-01-04 Thread Uros Bizjak
Hello! According to [1], invalid canonization from ASHIFT to MULT was removed a while ago. Some instruction patterns (like the one below) needs to be updated from MULT to ASHIFT, and alpha was left behind. (define_insn "*sadd" [(set (match_operand:I48MODE 0 "register_operand" "=r,r") (plus:

Add tree_fits_uhwi_p tests to BIT_FIELD_REF folder

2018-01-04 Thread Richard Sandiford
The first BIT_FIELD_REF folding pattern assumed without checking that operands satisfy tree_fits_uhwi_p. The second pattern does check this: /* On constants we can use native encode/interpret to constant fold (nearly) all BIT_FIELD_REFs. */ if (CONSTANT_CLASS_P (arg0)

Protect second call to extract_range_from_multiplicative_op_1

2018-01-04 Thread Richard Sandiford
Following on from: * tree-vrp.c (extract_range_from_multiplicative_op_1): Assert for VR_RANGE only; don't allow VR_ANTI_RANGE. (extract_range_from_binary_expr_1): Don't call extract_range_from_multiplicative_op_1 if !range_int_cst_p. there was a later call to extra

Document machine_mode wrapper classes

2018-01-04 Thread Richard Sandiford
An update of the patch originally posted here, deep in the original 77 machine_mode chain: https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01407.html Tested on aarch64-linux-gnu. OK to install? Richard 2018-01-04 Richard Sandiford gcc/ * doc/rtl.texi: Document machine_mode wrapper

[PATCH] PR libstdc++/83607 specialize Boyer-Moore searchers for std::byte

2018-01-04 Thread Jonathan Wakely
This makes the searchers use the same optimization for std::byte as for narrow character types, and also uses it when the predicate is std::equal_to rather than the default std::equal_to. I wanted to call the new trait __is_byte_size, for pun value, but it isn't true for everything with size 1, b

Re: [PATCH] Yet another expand_debug_expr BLKmode fix (PR debug/83666)

2018-01-04 Thread Richard Biener
On January 4, 2018 9:36:33 AM GMT+01:00, Jakub Jelinek wrote: >Hi! > >Another spot where we need to punt on BLKmode, otherwise we try to >create >a subreg with BLKmode, or ZERO/SIGN_EXTEND with BLKmode. > >Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK. Richard. >Even

Re: [13/13] [AArch64] Use vec_perm_indices helper routines

2018-01-04 Thread Richard Sandiford
Ping**2 Richard Sandiford writes: > Ping > > Richard Sandiford writes: >> This patch makes the AArch64 vec_perm_const code use the new >> vec_perm_indices routines, instead of checking each element individually. >> This means that they extend naturally to variable-length vectors. >> >> Also, aar

[PATCH] Avoid redundant calls to filesystem::status_known

2018-01-04 Thread Jonathan Wakely
Useing exists(file_status) inside exists(const path&, error_code&) means we call status_known twice, because exists(file_status) calls it internally. By inlining the exists(file_status) logic into the outer function we avoid the redundant call. * include/bits/fs_ops.h (exists(const path&,

[PATCH 0/3] Add __builtin_load_no_speculate

2018-01-04 Thread Richard Earnshaw
Recently, Google Project Zero disclosed several classes of attack against speculative execution. One of these, known as variant-1 (CVE-2017-5753), allows explicit bounds checks to be bypassed under speculation, providing an arbitrary read gadget. Further details can be found on the GPZ blog [1] an

[PATCH 2/3] [aarch64] Implement support for __builtin_load_no_speculate.

2018-01-04 Thread Richard Earnshaw
This patch implements support for __builtin_load_no_speculate on AArch64. On this architecture we inhibit speclation by emitting a combination of CSEL and a hint instruction that ensures the CSEL is full resolved when the operands to the CSEL may involve a speculative load. * config/aarc

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

2018-01-04 Thread Richard Earnshaw
This patch adds generic support for the new builtin __builtin_load_no_speculate. It provides the overloading of the different access sizes and a default fall-back expansion for targets that do not support a mechanism for inhibiting speculation. * builtin_types.def (BT_FN_I1_CONST_VPTR_CO

[PATCH 3/3] [arm] Implement support for the de-speculation intrinsic

2018-01-04 Thread Richard Earnshaw
This patch implements despeculation on ARM. We only support it when generating ARM or Thumb2 code (we need conditional execution); and we only support it for sizes up to DImode. For unsupported cases we fall back to the generic code generation sequence so that a suitable failure warning is emitt

Re: [PATCH] Simplify floating point comparisons

2018-01-04 Thread Wilco Dijkstra
ping (note also Jeff's reply https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01916.html) From: Wilco Dijkstra Sent: 15 November 2017 15:36 To: Richard Biener Cc: GCC Patches; nd Subject: Re: [PATCH] Simplify floating point comparisons   Richard Biener wrote: > On Tue, Oct 17, 2017 at 6:28 PM, W

[PATCH, rs6000] Fix PR83677 (incorrect generation of xxpermr)

2018-01-04 Thread Bill Schmidt
Hi, https://gcc.gnu.org/PR83677 reports that generation of xxpermr is always wrong. It effectively inverts the order of the two input registers from what they should be. This patch addresses that and provides a test case modified from the original report. Bootstrapped and tested on powerpc64le-

[PATCH 2/3] [gcc-7 backport] [aarch64] Implement support for __builtin_load_no_speculate.

2018-01-04 Thread Richard Earnshaw
This patch implements support for __builtin_load_no_speculate on AArch64. On this architecture we inhibit speclation by emitting a combination of CSEL and a hint instruction that ensures the CSEL is full resolved when the operands to the CSEL may involve a speculative load. * config/aarc

[PATCH 0/3] [gcc-7 backport] Add __builtin_load_no_speculate

2018-01-04 Thread Richard Earnshaw
This is a back-port of the __builtin-load_no_speculate builtin to the GCC-7 branch. Recently, Google Project Zero disclosed several classes of attack against speculative execution. One of these, known as variant-1 (CVE-2017-5753), allows explicit bounds checks to be bypassed under speculation, pr

[PATCH 1/3] [gcc-7 backport] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-04 Thread Richard Earnshaw
This patch adds generic support for the new builtin __builtin_load_no_speculate. It provides the overloading of the different access sizes and a default fall-back expansion for targets that do not support a mechanism for inhibiting speculation. So that users can know that this version of GCC sup

[PATCH 3/3] [gcc-7 backport] [arm] Implement support for the de-speculation intrinsic

2018-01-04 Thread Richard Earnshaw
This patch implements despeculation on ARM. We only support it when generating ARM or Thumb2 code (we need conditional execution); and we only support it for sizes up to DImode. For unsupported cases we fall back to the generic code generation sequence so that a suitable failure warning is emitt

[committed] PR83680: Inverted test in arm_vectorize_vec_perm_const

2018-01-04 Thread Richard Sandiford
This patch fixes an inverted condition in r256093. I checked for other instances of the same thing and there didn't seem to be any. Tested on arm-linux-gnueabihf and applied as obvious. Richard 2018-01-04 Richard Sandiford gcc/ PR target/83680 * config/arm/arm.c (arm_vector

[PATCH, rs6000][Committed] Fix PR target/83387

2018-01-04 Thread Peter Bergner
The following patch fixes an issue Sebastian ran into trying to build Ada for a new 64-bit PowerPC RTEMS target using the ELFv2 ABI. As I discussed in the bug, the rs6000 backend has certain assumptions that 64-bit targets expect that we have FP hardware in the cases where we are using explicit FP

Re: [PATCH 5/5][AArch64] fp16fml support

2018-01-04 Thread Richard Sandiford
Hi Michael, Not a review of the full patch, just a comment about the patterns: Michael Collison writes: > +(define_expand "aarch64_fmll_lane_lowv2sf" > + [(set (match_operand:V2SF 0 "register_operand" "") > + (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "") > +

Re: [PR c++/83667] Fix tree_dump ICE

2018-01-04 Thread Nathan Sidwell
On 01/04/2018 03:55 AM, Rainer Orth wrote: Hi Nathan, This fixes a tree dumping ICE involving static thunk fns. Copying the thunked-to fn's context suffices. The dump has IPA function summary for void c::*.LLTHUNK0(...)/1 thanks. does this patch work for you? nathan -- Nathan Sidwel

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

2018-01-04 Thread Sudakshina Das
Hi The bug reported a particular test di-longlong64-sync-1.c failing when run on arm-linux-gnueabi with options -mthumb -march=armv5t -O[g,1,2,3] and -mthumb -march=armv6 -O[g,1,2,3]. According to what I could see, the crash was caused because of the explicit VOIDmode argument that was sent

Re: [PR c++/83667] Fix tree_dump ICE

2018-01-04 Thread Rainer Orth
Hi Nathan, > On 01/04/2018 03:55 AM, Rainer Orth wrote: >> Hi Nathan, >> >>> This fixes a tree dumping ICE involving static thunk fns. Copying the >>> thunked-to fn's context suffices. >> > >> The dump has >> >> IPA function summary for void c::*.LLTHUNK0(...)/1 > > thanks. > > does this patch wo

Re: [PATCH] avoid using %lli et al.

2018-01-04 Thread Martin Sebor
On 01/04/2018 01:30 AM, Jakub Jelinek wrote: On Wed, Jan 03, 2018 at 05:00:41PM -0700, Martin Sebor wrote: This is an example where having a solution for bug 78014 would be helpful. I.e., a -Wformat checker to help enforce the use No, because %zu isn't portable enough for all the hosts we sup

Re: [PATCH] avoid using %lli et al.

2018-01-04 Thread Jakub Jelinek
On Thu, Jan 04, 2018 at 08:50:30AM -0700, Martin Sebor wrote: > On 01/04/2018 01:30 AM, Jakub Jelinek wrote: > > On Wed, Jan 03, 2018 at 05:00:41PM -0700, Martin Sebor wrote: > > > This is an example where having a solution for bug 78014 would > > > be helpful. I.e., a -Wformat checker to help enf

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

2018-01-04 Thread Kyrill Tkachov
Hi Sudi, On 04/01/18 15:35, Sudakshina Das wrote: Hi The bug reported a particular test di-longlong64-sync-1.c failing when run on arm-linux-gnueabi with options -mthumb -march=armv5t -O[g,1,2,3] and -mthumb -march=armv6 -O[g,1,2,3]. According to what I could see, the crash was caused because

Re: Fix Bug 83566 - cyl_bessel_j returns wrong result for x>1000 for high orders

2018-01-04 Thread Ed Smith-Rowland
On 01/03/2018 02:49 PM, Michele Pezzutti wrote: Hi. On 01/02/2018 05:43 PM, Michele Pezzutti wrote: On 01/02/2018 02:28 AM, Ed Smith-Rowland wrote: I like the patch. I have a similar one in the tr29124 branch. Anyway, I got held up and I think it's good to have new folks looking into this

Re: [PATCH] Fix gcc.dg/vect-opt-info-1.c testcase

2018-01-04 Thread Jeff Law
On 01/03/2018 02:23 PM, Jakub Jelinek wrote: > On Mon, Oct 23, 2017 at 06:26:12PM +0100, Richard Sandiford wrote: >> 2017-10-23 Richard Sandiford >> Alan Hayward >> David Sherwood > ... > >> --- /dev/null2017-10-21 08:51:42.385141415 +0100 >> +++ gcc/testsuite/gcc.

Extra subreg fold for variable-length CONST_VECTORs

2018-01-04 Thread Richard Sandiford
The SVE support for the new CONST_VECTOR encoding needs to be able to extract the first N bits of the vector and duplicate it. This patch adds a simplify_subreg rule for that. The code is covered by the gcc.target/aarch64/sve_slp_*.c tests. Tested on aarch64-linux-gnu, x86_64-linux-gnu and power

Re: [PATCH] RTEMS/EPIPHANY: Add RTEMS support

2018-01-04 Thread Jeff Law
On 01/04/2018 01:51 AM, Sebastian Huber wrote: > gcc/ > config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) > configuration. > config/epiphany/rtems.h: New file. > > libgcc/ > config.host (epiphany-*-elf*): Add (epiphany-*-rtems*) > configuration. Seems to me like t

Re: Avoid Solaris/SPARC comparison failures with Solaris as (PR bootstrap/81926)

2018-01-04 Thread Jeff Law
On 01/04/2018 02:15 AM, Rainer Orth wrote: > Bootstrapping on Solaris/SPARC with /bin/as fails in make compare. The > difference is always like this: > > * With -gtoggle (stage2), there's no .text section in the assembler > output. > > * Without -gtoggle (stage3), the assembler output gets >

Re: [PATCH] Update crtl->has_bb_partition if NOTE_INSN_SWITCH_SECTIONS isn't emitted (PR debug/83585)

2018-01-04 Thread Jeff Law
On 01/03/2018 01:54 PM, Jakub Jelinek wrote: > Hi! > > My recent dwarf2out.c, dbxout.c and rs6000.c uses of crtl->has_bb_partition > all assume that if it is true then the function actually has 2 partitions > and NOTE_INSN_SWITCH_SECTIONS is present, but as the following testcase > shows, that isn

Re: Allow VEC_PERM_EXPR folding to fail

2018-01-04 Thread Jeff Law
On 01/04/2018 03:02 AM, Richard Sandiford wrote: > tree-ssa-forwprop.c was asserting that a VEC_PERM_EXPR fold on three > VECTOR_CSTs would always succeed, but it's possible for it to fail > with variable-length vectors. > > Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu.

[PATCH][AArch64] Improve register allocation of fma

2018-01-04 Thread Wilco Dijkstra
This patch improves register allocation of fma by preferring to update the accumulator register. This is done by adding fma insns with operand 1 as the accumulator. The register allocator considers copy preferences only in operand order, so if the first operand is dead, it has the highest chance

Re: Document machine_mode wrapper classes

2018-01-04 Thread Jeff Law
On 01/04/2018 03:22 AM, Richard Sandiford wrote: > An update of the patch originally posted here, deep in the original > 77 machine_mode chain: > > https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01407.html > > Tested on aarch64-linux-gnu. OK to install? > > Richard > > > 2018-01-04 Richard

Re: Add tree_fits_uhwi_p tests to BIT_FIELD_REF folder

2018-01-04 Thread Jeff Law
On 01/04/2018 03:06 AM, Richard Sandiford wrote: > The first BIT_FIELD_REF folding pattern assumed without checking that > operands satisfy tree_fits_uhwi_p. The second pattern does check this: > > /* On constants we can use native encode/interpret to constant > fold (nearly) all B

Re: [PATCH] exempt invalid built-in calls from -Wrestrict (PR 83655)

2018-01-04 Thread Richard Sandiford
Martin Sebor writes: > In addition to assuming that built-in functions are called with > the correct number of arguments (bug 83603), the restrict pass > also assumes that they are called with arguments of the expected > types. When a built-in is declared with no prototype and called > with argum

[AArch64] Reject (high (const (plus anchor offset)))

2018-01-04 Thread Richard Sandiford
The aarch64_legitimate_constant_p tests for HIGH and CONST seem to be the wrong way round: (high (const ...)) is valid rtl that could be passed in, but (const (high ...)) isn't. As it stands, we disallow anchor+offset but allow (high anchor+offset). TBH I can't remember whether this caused a test

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-04 Thread Joseph Myers
On Thu, 4 Jan 2018, Richard Earnshaw wrote: > 1 - generic modifications to GCC providing the builtin function for all > architectures and expanding to an implementation that gives the > logical behaviour of the builtin only. A warning is generated if > this expansion path is used that

Re: [PATCH] minor tweak to complete strlen fix for PR83501

2018-01-04 Thread Jeff Law
On 01/03/2018 02:29 PM, Martin Sebor wrote: > Prathamesh's fix restores the optimization for the test case > reported in the bug (thanks!) but it isn't sufficient to bring > GCC 8 completely up to par with 7.  Prior GCC versions are able > to compute the string length in the test case below but GCC

Re: [PATCH PR82439][simplify-rtx] Simplify (x | y) == x -> (y & ~x) == 0

2018-01-04 Thread Jeff Law
On 01/03/2018 06:57 AM, Sudakshina Das wrote: > Hi > > This patch add support for the missing transformation of (x | y) == x -> > (y & ~x) == 0. > The transformation for (x & y) == x case already exists in > simplify-rtx.c since 2014 as of r218503 and this patch only adds a > couple of extra patte

Re: Protect second call to extract_range_from_multiplicative_op_1

2018-01-04 Thread Jeff Law
On 01/04/2018 03:11 AM, Richard Sandiford wrote: > Following on from: > > * tree-vrp.c (extract_range_from_multiplicative_op_1): Assert > for VR_RANGE only; don't allow VR_ANTI_RANGE. > (extract_range_from_binary_expr_1): Don't call > extract_range_from_multiplicati

Re: [PATCH] Add version to intermediate gcov file (PR gcov-profile/83669).

2018-01-04 Thread Marco Castelluccio
Hey Martin, thanks for implementing this! One quick note, given that the intermediate file contains multiple "file" sections, maybe it would make more sense to put the "version:" at the very beginning of the file (maybe outputting it from https://github.com/gcc-mirror/gcc/blob/7ea14e0563d16460368

x86 patch ping

2018-01-04 Thread Jakub Jelinek
Hi! I'd like to ping 2 patches: http://gcc.gnu.org/ml/gcc-patches/2017-12/msg01558.html - PR83604 VBMI2 fixes http://gcc.gnu.org/ml/gcc-patches/2017-12/msg01559.html - PR83604 GFNI & misc fixes Thanks Jakub

Re: PR82665 - missing value range optimization for memchr

2018-01-04 Thread Jeff Law
On 01/03/2018 12:08 AM, Prathamesh Kulkarni wrote: > On 3 January 2018 at 12:33, Prathamesh Kulkarni > wrote: >> On 2 January 2018 at 17:49, Jakub Jelinek wrote: >>> On Tue, Jan 02, 2018 at 05:39:17PM +0530, Prathamesh Kulkarni wrote: --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr

Re: [PATCH] Fix PR83491

2018-01-04 Thread Jeff Law
On 01/02/2018 06:19 AM, Richard Biener wrote: > On Wed, Dec 20, 2017 at 2:56 PM, Wilco Dijkstra > wrote: >> This patch fixes PR83491 - if an SSA expression contains 2 identical float >> constants, the division reciprocal optimization will ICE. Fix this by >> explicitly >> checking for SSA_NAME

Re: [PATCH] exempt invalid built-in calls from -Wrestrict (PR 83655)

2018-01-04 Thread Martin Sebor
On 01/04/2018 10:52 AM, Richard Sandiford wrote: Martin Sebor writes: In addition to assuming that built-in functions are called with the correct number of arguments (bug 83603), the restrict pass also assumes that they are called with arguments of the expected types. When a built-in is declar

[COMMITTED] PR fortran/83679 -- fix regression with cshift simplification

2018-01-04 Thread Steve Kargl
I've committed the following patch that fixes a regression for simplification of cshift when the array is zero sized. Commits were made to both the 6-branch and 7-branch. The regression does not occur on trunk. 2018-01-04 Steven G. Kargl PR Fortran/83679 * simplify.c (gfc_simp

[patch, fortran] Simplify eoshift

2018-01-04 Thread Thomas Koenig
Hello world, here is a patch for simplifying eoshift. Along the way, I discovered two ICEs caused by wrong arguments to eoshift, which are now also caught by new checks and a corresponding test case. This already passed all of the *eoshift* tests and is regression-testing as I write this. OK if

[Patch][aarch64] Fix thunderx2-t99 instruction scheduling pipeline descriptions.

2018-01-04 Thread Steve Ellcey
Here is another update to the t99 scheduling file (thunderx2-t99.md). There were some instruction types (mostly asimd) that did not have schedules and other types that had duplicate schedules.  With this patch there should be one schedule for every type and no duplicates. I did some SPEC2017 runs

Re: Fix Bug 83566 - cyl_bessel_j returns wrong result for x>1000 for high orders

2018-01-04 Thread Michele Pezzutti
On 01/04/2018 06:16 PM, Ed Smith-Rowland wrote: On 01/03/2018 02:49 PM, Michele Pezzutti wrote: Hi. On 01/02/2018 05:43 PM, Michele Pezzutti wrote: On 01/02/2018 02:28 AM, Ed Smith-Rowland wrote: I like the patch. I have a similar one in the tr29124 branch. Anyway, I got held up and I t

Re: [patch, fortran] Simplify eoshift

2018-01-04 Thread Thomas Koenig
I wrote: here is a patch for simplifying eoshift. Along the way, I discovered two ICEs caused by wrong arguments to eoshift, which are now also caught by new checks and a corresponding test case. This already passed all of the *eoshift* tests and is regression-testing as I write this.  OK if it

Re: Fix Bug 83566 - cyl_bessel_j returns wrong result for x>1000 for high orders

2018-01-04 Thread Michele Pezzutti
And the test cases diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/09_cyl_bessel_j/check_value.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/09_cyl_bessel_j/check_value.cc index 26f4dd3..e340b78 100644 --- a/libstdc++-v3/testsuite/tr1

Re: [PATCH] Be careful about comdat boundary in ICF (PR ipa/82352).

2018-01-04 Thread Jakub Jelinek
On Wed, Jan 03, 2018 at 03:14:10PM +0100, Martin Liška wrote: > 2018-01-03 Martin Liska > > PR ipa/82352 > * g++.dg/ipa/pr82352.C: New test. > --- > --- /dev/null > +++ b/gcc/testsuite/g++.dg/ipa/pr82352.C > @@ -0,0 +1,93 @@ > +// PR ipa/82352 > +// { dg-do compile } > +// { dg-opti

[PATCH] Punt on possibly throwing assignments in SLSR (PR tree-optimization/83605)

2018-01-04 Thread Jakub Jelinek
Hi! While the testcase could be perhaps handled with some extra effort (the issue there is just CSE of an early possibly throwing trapping addition, so maybe_cleanup_or_replace_eh_stmt + gimple_purge_dead_eh_edges + TODO_cleanup_cfg might do the job, but I'm afraid the pass wouldn't know what to d

[PATCH] Fix ICE with -mmigitage-rop (PR target/83554)

2018-01-04 Thread Jakub Jelinek
Hi! This ICEs because split2 splits a HImode rotate by 8 into an instruction that isn't really valid (bswaphi_lowpart insn, which has preferred_for_size enabled just the first alternative that uses +Q, while the splitter creates insn with %r9) and the second alternative with +r should be disabled.

Re: [PATCH] Simplify floating point comparisons

2018-01-04 Thread Marc Glisse
(just a log of my thoughts while reading the patch) On Thu, 4 Jan 2018, Wilco Dijkstra wrote: Richard Biener wrote: On Tue, Oct 17, 2017 at 6:28 PM, Wilco Dijkstra wrote: +(if (flag_unsafe_math_optimizations) +  /* Simplify (C / x op 0.0) to x op 0.0 for C > 0.  */ +  (for op (lt le gt ge)

Tighten LRA cycling check

2018-01-04 Thread Richard Sandiford
LRA has code to try to prevent cycling, by avoiding reloads that look too similar to the instruction being reloaded. E.g. if we have a R<-C move for some constant C, reloading the source with another R<-C move is unlikely to be a good idea. However, this safeguard unnecessarily triggered in tests

Re: [PATCH] Punt on possibly throwing assignments in SLSR (PR tree-optimization/83605)

2018-01-04 Thread Bill Schmidt
Hi Jakub, Okay by me. Thanks for fixing this! Sorry I missed this bug on the list. Feel free to CC me on any SLSR bugs. -- Bill > On Jan 4, 2018, at 3:23 PM, Jakub Jelinek wrote: > > Hi! > > While the testcase could be perhaps handled with some extra effort (the > issue there is just CSE o

[PATCH] lto, testsuite: Fix ICE in -Wodr (PR lto/83121)

2018-01-04 Thread David Malcolm
PR lto/83121 reports an ICE deep inside the linemap code when -Wodr reports on a type mismatch. The root cause is that the warning can access the DECL_SOURCE_LOCATION of a streamed-in decl before the lto_location_cache has been applied. lto_location_cache::input_location stores RESERVED_LOCATION_

Re: [PATCH] Fix ICE with -mmigitage-rop (PR target/83554)

2018-01-04 Thread Uros Bizjak
On Thu, Jan 4, 2018 at 10:27 PM, Jakub Jelinek wrote: > Hi! > > This ICEs because split2 splits a HImode rotate by 8 into an instruction > that isn't really valid (bswaphi_lowpart insn, which has preferred_for_size > enabled just the first alternative that uses +Q, while the splitter creates > in

[PATCH] PR libstdc++/83626 Don't throw for remove("") and remove_all("")

2018-01-04 Thread Jonathan Wakely
This fixes filesystem::remove and filesystem::remove_all for the cases where the file to be removed doesn't exist. The standard says it should not be an error, but we were reporting errors. PR libstdc++/83626 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove

[Patch][aarch64][PR target/83466] Fix SYMBOL_SMALL_TLSDESC address calculation in ILP32 mode

2018-01-04 Thread Steve Ellcey
This is a patch for PR target/83466, an ILP32 aarch64 bug.  I verified that it did not cause any regressions in the GCC testsuite and Andreas verified that it fixed the original failure that he reported.  The basic idea is to do the addition in ptr_mode (SImode in ILP32) instead of Pmode (DImode in

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

2018-01-04 Thread Michael Meissner
This patch is the beginning step to switching the PowerPC long double support from IBM extended double to IEEE 128-bit floating point on PowerPC servers. It will be necessary to have this patch or a similar patch to allow the GLIBC team to begin their modifications in GLIBC 2.28, so that by the ti

Re: [PATCH] PR libstdc++/83626 Don't throw for remove("") and remove_all("")

2018-01-04 Thread Tim Song
What if the file to be removed is externally removed between the symlink_status and the ::remove call? This is probably QoI because filesystem race, but it seems reasonable to double check errno if ::remove fails and not fail if the failure is due to the file not existing.

[PATCH] libgo: add missing prototypes (PR 82922)

2018-01-04 Thread Martin Sebor
PR 82922 asks to enable -Wstrict-prototypes. The attached patch handles the errors in an x86_64 bootstrap. With it, GCC bootstraps successfully with --enable-languages=all,jit, but there are many FAILs in the test suite but I think those could be handled by a script so unless there are objection

Re: [PATCH][AArch64] Improve register allocation of fma

2018-01-04 Thread Andrew Pinski
On Thu, Jan 4, 2018 at 9:46 AM, Wilco Dijkstra wrote: > This patch improves register allocation of fma by preferring to update the > accumulator register. This is done by adding fma insns with operand 1 as the > accumulator. The register allocator considers copy preferences only in > operand >

[PATCH 1/2] nios2: Enable Ada run-time build

2018-01-04 Thread Sebastian Huber
gcc/ * config/nios2/nios2.h (nios2_section_threshold): Guard by not USED_FOR_TARGET. --- gcc/config/nios2/nios2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/nios2/nios2.h b/gcc/config/nios2/nios2.h index 858d4a41cd7..f62b2ce3176 100644 --- a/gcc/

[PATCH] epiphany: Enable Ada run-time build

2018-01-04 Thread Sebastian Huber
gcc/ PR target/83681 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard by not USED_FOR_TARGET. (make_pass_resolve_sw_modes): Likewise. --- gcc/config/epiphany/epiphany.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/ep