[AARCH64][ACLE] Implement __ARM_FP_FENV_ROUNDING in aarch64 backend.

2016-01-11 Thread Bilyan Borisov
This patch implements the __ARM_FP_FENV_ROUNDING macro in the aarch64 backend. AArch64 supports configurable rounding modes, which can be set using the standard C fesetround() function. According to the ACLE 2.0 specification, __ARM_FP_FENV_ROUNDING is defined to 1 only when fesetround() is provi

Re: [PATCH] Performance fix for libmpx memmove wrapper

2016-01-11 Thread Thomas Schwinge
Hi! On Tue, 29 Dec 2015 15:51:56 +0300, Ilya Enkovich wrote: > This patch is OK. I applied it to trunk. > > Thanks, > Ilya > > 2015-12-24 14:24 GMT+03:00 Aleksandra Tsvetkova : > > Description: > > 2015-12-11 Tsvetkova Alexandra > > > > * libmpxwrap/mpx_wrappers.c (__mpx_wrapper_me

Re: [patch] Avoid an unwanted decl re-map in copy_gimple_seq_and_replace_locals

2016-01-11 Thread Richard Biener
On Fri, Jan 8, 2016 at 3:59 PM, Martin Jambor wrote: > Hi, > > I ran into an ICE when compiling the following function on the HSA branch: > > foo (int n, int m, int o, int (*a)[m][o]) > { > int i, j, k; > #pragma omp target teams distribute parallel for shared(a) firstprivate(n, m, > o) private

Re: [PATCH v2, middle-end]: Fix PR68999, gfortran.fortran-torture/execute/save_1.f90 execution failure on alpha

2016-01-11 Thread Richard Biener
On Fri, Jan 8, 2016 at 5:23 PM, Uros Bizjak wrote: > Hello! > > Attached patch returns "unknown" from memrefs_conflict_p when > realigned decls are processed. This is the same approach as is done at > the end of memrefs_conflict_p. > > We still need early return for AND addresses in base_alias_che

[Committed, PR69058] Don't parallelize loops if libgomp not supported

2016-01-11 Thread Tom de Vries
Hi, when doing an ftree-parallelize-loops=2 build (PR68967), I ran into an ICE building libgo. The ICE can be reproduced using a regular toolchain using this command: ... $ gccgo src/libgo/go/strconv/decimal.go -O2 -ftree-parallelize-loops=2 -S ... The problem is that parloops is trying to us

[Committed, PR69108] Handle case that outer phi res is not used in a phi in gather_scalar_reductions

2016-01-11 Thread Tom de Vries
Hi, when compiling interchange-2.c with ftree-parallelize-loops=2 we run into an ICE: ... $ gcc -O2 src/gcc/testsuite/gcc.dg/graphite/interchange-2.c -S -ftree-parallelize-loops=2 interchange-2.c: In function ‘foo.constprop’: interchange-2.c:13:1: internal compiler error: in as_a, at is-a.h:1

Re: [PATCH] Remove PTX link option

2016-01-11 Thread Alexander Monakov
On Fri, 8 Jan 2016, Jakub Jelinek wrote: > And CU_JIT_TARGET / CU_TARGET_COMPUTE_30 requests JITting only on sm_30 and > nothing else, or just on sm_30 or later, something else? It requests to produce binary code targeting sm_30 devices. Newer (Maxwell) devices use a different hw instruction set,

Re: [PATCH] Remove PTX link option

2016-01-11 Thread Alexander Monakov
On Fri, 8 Jan 2016, James Norris wrote: > > On Fri, Jan 08, 2016 at 10:21:16AM -0600, James Norris wrote: > > So, why this didn't get fixed 1.5 years ago? Are you testing just on sm_30 > > and not on sm_50? > > > > Jakub > > As the Maxwell GPU's (sm_50) are relatively new, we've only > recently

Re: [PATCH PR68542]

2016-01-11 Thread Yuri Rumyantsev
Hi Richard, Did you have anu chance to look at updated patch? Thanks. Yuri. 2015-12-18 13:20 GMT+03:00 Yuri Rumyantsev : > Hi Richard, > > Here is updated patch for middle-end part of the whole patch which > fixes all your remarks I hope. > > Regression testing and bootstrapping did not show any

[Committed, PR69109] Don't allow latch with phi in try_transform_to_exit_first_loop_alt

2016-01-11 Thread Tom de Vries
Hi, when compiling src/gcc/testsuite/gcc.dg/vect/unswitch-loops-pr26969.c and src/gcc/testsuite/gcc.c-torture/compile/pr32399.c with -O2 -funswitch-loops -ftree-parallelize-loops=2 we run into two different ICEs. In both cases, -funswitch-loops introduces a virtual memory phi in the latch, a

Re: [RFC] Combine vectorized loops with its scalar remainder.

2016-01-11 Thread Yuri Rumyantsev
Hi Richard, Did you have a chance to look at this updated patch? Thanks. Yuri. 2015-12-15 19:41 GMT+03:00 Yuri Rumyantsev : > Hi Richard, > > I re-designed the patch to determine ability of loop masking on fly of > vectorization analysis and invoke it after loop transformation. > Test-case is al

Re: [PR tree-optimization/64946] Push integer type conversion to ABS_EXPR argument when possible.

2016-01-11 Thread Richard Biener
On Fri, Jan 8, 2016 at 11:24 PM, Joseph Myers wrote: > On Fri, 8 Jan 2016, Matthew Wahab wrote: > >> Hello, >> >> The C/C++ front-ends apply type conversions to expressions using ABS >> with integral arguments of type smaller than int. This means that, for >> short x, ABS(x) becomes something like

Re: [AARCH64][ACLE] Implement __ARM_FP_FENV_ROUNDING in aarch64 backend.

2016-01-11 Thread Marcus Shawcroft
On 11 January 2016 at 08:12, Bilyan Borisov wrote: > 2015-XX-XX Bilyan Borisov > > * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): New > macro > definition. > > gcc/testsuite/ > > 2015-XX-XX Bilyan Borisov > > * gcc.target/aarch64/fesetround-checking-bare

Re: [RFA] [PATCH][PR tree-optimization/64910] Fix reassociation of binary bitwise operations with 3 operands

2016-01-11 Thread Richard Biener
On Sat, Jan 9, 2016 at 12:20 AM, Jeff Law wrote: > On 01/08/2016 02:36 AM, Richard Biener wrote: >>> >>> My original patch did this for all binary operations. However, reviewing >>> the assembly code & dump files before/after it was pretty clear that >>> doing >>> this for arithmetic was losing (

Re: [PATCH] Remove PTX link option

2016-01-11 Thread Thomas Schwinge
Hi! On Mon, 11 Jan 2016 12:46:17 +0300 (MSK), Alexander Monakov wrote: > On Fri, 8 Jan 2016, Jakub Jelinek wrote: > > And CU_JIT_TARGET / CU_TARGET_COMPUTE_30 requests JITting only on sm_30 and > > nothing else, or just on sm_30 or later, something else? > > It requests to produce binary code t

Re: gomp_target_fini

2016-01-11 Thread Thomas Schwinge
Hi! Ping. On Wed, 23 Dec 2015 12:05:32 +0100, I wrote: > Ping. > > On Wed, 16 Dec 2015 13:30:21 +0100, I wrote: > > On Mon, 14 Dec 2015 19:47:36 +0300, Ilya Verbin wrote: > > > On Fri, Dec 11, 2015 at 18:27:13 +0100, Jakub Jelinek wrote: > > > > On Tue, Dec 08, 2015 at 05:45:59PM +0300, Ilya Ve

Re: [PATCH] Fix up reduction-1{1,2} testcases (PR middle-end/68221)

2016-01-11 Thread Thomas Schwinge
Hi! Ping. On Wed, 23 Dec 2015 12:03:48 +0100, I wrote: > Ping. > > On Thu, 26 Nov 2015 14:31:56 +0100, I wrote: > > On Mon, 23 Nov 2015 12:13:07 +0100 (CET), Richard Biener > > wrote: > > > On Fri, 20 Nov 2015, Jakub Jelinek wrote: > > > > If C/C++ array section reductions have non-zero (posit

[PATCH 0/2] S/390 test case fixes.

2016-01-11 Thread Dominik Vogt
The following two patches fix some test cases for S/390. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany

Re: [AARCH64][ACLE] Implement __ARM_FP_FENV_ROUNDING in aarch64 backend.

2016-01-11 Thread Alan Lawrence
On 11/01/16 10:28, Marcus Shawcroft wrote: On 11 January 2016 at 08:12, Bilyan Borisov wrote: 2015-XX-XX Bilyan Borisov * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): New macro definition. gcc/testsuite/ 2015-XX-XX Bilyan Borisov * gcc.target/a

Re: [PATCH 0/2] S/390 test case fixes.

2016-01-11 Thread Dominik Vogt
On Mon, Jan 11, 2016 at 11:46:21AM +0100, Dominik Vogt wrote: > The following two patches fix some test cases for S/390. Patch 1: gcc.dg/tree-ssa/20040204-1.c does not fail on S/390 at the moment. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany gcc/testsuite/ChangeLog * gcc.dg/t

Re: [PATCH 0/2] S/390 test case fixes.

2016-01-11 Thread Dominik Vogt
On Mon, Jan 11, 2016 at 11:46:21AM +0100, Dominik Vogt wrote: > The following two patches fix some test cases for S/390. Patch 2: Add -mbackchain on S/390 to make the -W[no-]frame-adrress tests work. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany gcc/testsuite/ChangeLog * g++

Re: [PR69123] fix VTA dataflow oscillation

2016-01-11 Thread Alexandre Oliva
On Jan 9, 2016, Alexandre Oliva wrote: > for gcc/testsuite/ChangeLog > PR bootstrap/69123 > * gcc.dg/pr69123.c: New. Doh, it doesn't work to install a C++ testcase as C. Here's the patch with testcase that I actually tested successfully and checked in. [PR69123] fix handling of

Re: [PATCH] Remove PTX link option

2016-01-11 Thread Alexander Monakov
On Mon, 11 Jan 2016, Thomas Schwinge wrote: > Alexander, would you please also submit a fix for that for nvptx-tools' > nvptx-run.c? (Or want me to do that?) I can do that, along with another small change I used for -mgomp testing. > Going further, for both GCC's libgomp and nvptx-tools' nvptx-r

Re: [PATCH] Remove PTX link option

2016-01-11 Thread Jakub Jelinek
On Mon, Jan 11, 2016 at 11:38:29AM +0100, Thomas Schwinge wrote: > On Mon, 11 Jan 2016 12:46:17 +0300 (MSK), Alexander Monakov > wrote: > > On Fri, 8 Jan 2016, Jakub Jelinek wrote: > > > And CU_JIT_TARGET / CU_TARGET_COMPUTE_30 requests JITting only on sm_30 > > > and > > > nothing else, or just

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/68841: Make sure one basic block doesn't clobber CC reg usage of the other

2016-01-11 Thread Kyrill Tkachov
Hi Bernd, On 08/01/16 13:22, Bernd Schmidt wrote: On 01/08/2016 02:11 PM, Kyrill Tkachov wrote: How's this? Hmm. Almost there, but... - if (then_bb && else_bb && !a_simple && !b_simple - && (!bbs_ok_for_cmove_arith (then_bb, else_bb) - || !bbs_ok_for_cmove_arith (else_bb, then_bb

Re: [ARM][PR69194] Fix ICE in in extract_insn

2016-01-11 Thread Kyrill Tkachov
Hi Kugan, On 09/01/16 23:08, Kugan wrote: On 09/01/16 07:01, Jakub Jelinek wrote: On Fri, Jan 08, 2016 at 11:43:34AM -0800, Jim Wilson wrote: Here is a smaller simpler testcase. Only the first four args get passed in regs, so the fifth one has address equal to the virtual incoming args reg w

[PATCH] Fix line number that is expected to generate an error.

2016-01-11 Thread Dominik Vogt
The attached patch fixes a test failure caused by expecting the error message for the wrong line. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany gcc/testsuite/ChangeLog * g++.dg/cpp0x/constexpr-reinterpret1.C: Fix line number that is expected to generate an error. >From 740

Re: [PATCH, ARM] Fox target/69180] #pragma GCC target should not warn about redefined macros

2016-01-11 Thread Kyrill Tkachov
Hi Christian, On 07/01/16 15:40, Christian Bruel wrote: as discussed with Kyrill (https://gcc.gnu.org/ml/gcc-patches/2016-01/msg00307.html), this patch avoids confusing (for the testsuite) macro redefinition warning or pedantic errors when the user changes FP versions implicitly with a #pragma G

Re: [AARCH64][ACLE] Implement __ARM_FP_FENV_ROUNDING in aarch64 backend.

2016-01-11 Thread Szabolcs Nagy
On 11/01/16 08:12, Bilyan Borisov wrote: + /* Since fesetround () is not present in newlib, but it's present in glibc, we + only define the __ARM_FP_FENV_ROUNDING macro to 1 when glibc is used + i.e. on aarch64-none-linux-gnu. The OPTION_GLIBC macro is undefined on + aarch64-none-e

Re: [PATCH] Remove snprintf from _(load|store)_mask

2016-01-11 Thread Kirill Yukhin
Hello HJ, On 10 Jan 14:28, H.J. Lu wrote: > This patch removes snprintf from _(load|store)_mask > patterns. Tested on x86-64. OK for trunk? The patch is OK for main trunk. -- Thanks, K > > H.J. > --- > > * config/i386/sse.md (_load_mask): Remove > snprintf. > (_store_mask): L

[Patch AArch64] Use software sqrt expansion always for -mlow-precision-recip-sqrt

2016-01-11 Thread James Greenhalgh
Hi, I'd like to switch the logic around in aarch64.c such that -mlow-precision-recip-sqrt causes us to always emit the low-precision software expansion for reciprocal square root. I have two reasons to do this; first is consistency across -mcpu targets, second is enabling more -mcpu targets to us

Re: [gomp4] Fix use of declare'd vars by routine procedures.

2016-01-11 Thread Thomas Schwinge
Hi! On Thu, 7 Jan 2016 12:57:32 -0600, James Norris wrote: > The checking of variables declared by OpenACC declare directives > used within an OpenACC routine procedure was not being done correctly. > This fix adds the checking required and also adds to the testing. > > This fix resolves the is

[AArch64] Remove TODO (redundant type conversions) in arm_neon.h

2016-01-11 Thread Jiong Wang
There are quite a few redundant type conversions in arm_neon.h, all of them are intrinsics taking argument of vector float type and return result of vector unsigned integer type. The problem is currently we support UNOP and UNOPU qualifiers for unary "signed <- signed", "unsigned <- unsigned" res

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/68841: Make sure one basic block doesn't clobber CC reg usage of the other

2016-01-11 Thread Bernd Schmidt
Ok, this works too. Here is a version that adds orig_x to the if_info struct and passes it down to bbs_ok_for_cmove_arith. This passes bootstrap and test on arm, aarch64, x86_64. I think this is ok. Bernd

[AArch64] Remove AARCH64_EXTRA_TUNE_RECIP_SQRT from Cortex-A57 tuning

2016-01-11 Thread James Greenhalgh
Hi, I've seen a couple of large performance issues caused by expanding the high-precision reciprocal square root for Cortex-A57, so I'd like to turn it off by default. This is good for art (~2%) from Spec2000, bad (~3.5%) for fma3d from Spec2000, good (~5.5%) for gromcas from Spec2006, and very

Re: [gomp4] private reductions

2016-01-11 Thread Thomas Schwinge
Hi! On Wed, 6 Jan 2016 19:55:02 -0800, Cesar Philippidis wrote: > This patch updates the way that private reductions are handled in gomp4 > to be more like trunk. Anything to commit to trunk (test cases at least?)? > This patch has been applied to gomp-4_0-branch. > PR other/68813 Can

Re: Backport: [Patch AArch64] Reinstate CANNOT_CHANGE_MODE_CLASS to fix pr67609

2016-01-11 Thread James Greenhalgh
On Fri, Dec 18, 2015 at 12:13:31PM +, James Greenhalgh wrote: > > On Mon, Dec 14, 2015 at 11:49:26AM +, Marcus Shawcroft wrote: > > On 14 December 2015 at 11:01, James Greenhalgh > > wrote: > > > On Wed, Dec 09, 2015 at 01:13:20PM +, Marcus Shawcroft wrote: > > >> On 27 November 2015

Re: [AARCH64][ACLE] Implement __ARM_FP_FENV_ROUNDING in aarch64 backend.

2016-01-11 Thread Marcus Shawcroft
On 11 January 2016 at 10:46, Alan Lawrence wrote: > However, the test doesn't really look at whether we're using glibc vs > musl/bionic/uclibc, only at whether we are targeting -linux-gnu or > -none-elf. Fair point, the test case is not aligned with the implementation. Rather than hang the test

Re: [gomp4] merge ptx changes

2016-01-11 Thread Thomas Schwinge
Hi! On Tue, 5 Jan 2016 09:22:46 -0500, Nathan Sidwell wrote: > This patch merges my most recent sequence of ptx backend changes to the > gomp4 > branch. I suppose it's not been intentional that during that, you dropped some of the changes present on gomp-4_0-branch, once installed for "[gomp4

[Commited, PR69069] Add missing phi args in create_parallel_loop

2016-01-11 Thread Tom de Vries
Hi, when doing an ftree-parallelize-loops=2 build (PR68967), I ran into an ICE building gcc/ada/g-debpoo.adb. The problem occurs when handling a loop with header bb 109, latch bb 108 and exit bb 110: ... ;; basic block 109 # ivtmp_520 = PHI <0(129), ivtmp_151(108)> # RANGE [0, 1022] NONZERO

Re: [PATCH 3/2] S/390 test case fixes.

2016-01-11 Thread Dominik Vogt
On Mon, Jan 11, 2016 at 11:46:21AM +0100, Dominik Vogt wrote: > The following two patches fix some test cases for S/390. Patch 3: Disable g++.dg/init/const9.C on S/390 as discussed here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56194 Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany

Re: [PATCH] Remove PTX link option

2016-01-11 Thread Alexander Monakov
On Mon, 11 Jan 2016, Jakub Jelinek wrote: > This patch is ok for trunk with proper attribution in the ChangeLog. I went ahead and applied the patch myself. Thanks. Alexander

[PATCH] S/390: Better help text for -mmvcle.

2016-01-11 Thread Dominik Vogt
The attached patch improves the help text of the -mmvcle option on S/390. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany gcc/ChangeLog * config/s390/s390.opt (mmvcle): More verbose help text. >From 817358341388950641967d709ca2945bc8305998 Mon Sep 17 00:00:00 2001 From: Dominik Vogt

Re: [PATCH] Fix PR68707

2016-01-11 Thread Christophe Lyon
On 10 January 2016 at 13:15, Thomas Schwinge wrote: > Hi! > > On Fri, 8 Jan 2016 11:30:16 +, Alan Lawrence > wrote: >> Here's an alternative patch, [...] > >> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use >> load/store-lanes" { target { vect_perm && vect_load_lanes }

Re: [PATCH 3/2] S/390 test case fixes.

2016-01-11 Thread Dominik Vogt
On Mon, Jan 11, 2016 at 01:28:36PM +0100, Dominik Vogt wrote: > On Mon, Jan 11, 2016 at 11:46:21AM +0100, Dominik Vogt wrote: > > The following two patches fix some test cases for S/390. > > Patch 3: > > Disable g++.dg/init/const9.C on S/390 as discussed here: > https://gcc.gnu.org/bugzilla/s

Re: [PATCH] Fix math transformation on targets without c99 math functions

2016-01-11 Thread Christophe Lyon
On 9 January 2016 at 17:48, Jakub Jelinek wrote: > On Thu, Dec 31, 2015 at 12:52:21PM -0500, John David Anglin wrote: >> On 2015-12-30, at 6:46 PM, Joseph Myers wrote: >> >> > On Mon, 28 Dec 2015, John David Anglin wrote: >> > >> >> The attach change fixes PR middle-end/68743 on hppa*-*-hpux*. In

Re: [PATCH] Fix math transformation on targets without c99 math functions

2016-01-11 Thread Jakub Jelinek
On Mon, Jan 11, 2016 at 02:16:31PM +0100, Christophe Lyon wrote: > >> In any case, we have no_c99_libc_has_function on hpux and everything on > >> linux. So, I > >> don't think testing with function_c99_misc on hppa will show any > >> difference. > >> > >> Okay with function_c99_misc? > > > > Ok

RE: [PATCH 1/4] [MIPS] Add support for MIPS SIMD Architecture (MSA)

2016-01-11 Thread Matthew Fortune
Hi Robert, Thanks for the update and detailed comments. There are a couple of things which I think still need addressing based solely on your comments but generally the changes seem to have simplified things which is nice to see. I haven't read the patch again yet and given the changes it looks l

Re: [AArch64] Remove AARCH64_EXTRA_TUNE_RECIP_SQRT from Cortex-A57 tuning

2016-01-11 Thread Dr. Philipp Tomsich
James, ok from our side—good to see that this also benefits the A57. Best, Philipp. > On 11 Jan 2016, at 13:04, James Greenhalgh wrote: > > > Hi, > > I've seen a couple of large performance issues caused by expanding > the high-precision reciprocal square root for Cortex-A57, so I'd like > t

RE: [PATCH 3/4] Add support to run auto-vectorization tests for multiple effective targets

2016-01-11 Thread Matthew Fortune
Hi Robert, Do you have an updated version of this patch? It no longer applies cleanly. Thanks, Matthew > -Original Message- > From: Robert Suchanek > Sent: 05 January 2016 16:17 > To: catherine_mo...@mentor.com; Matthew Fortune > Cc: gcc-patches@gcc.gnu.org > Subject: RE: [PATCH 3/4] Add

[PATCH] Cleanup vect testsuite includes

2016-01-11 Thread Alan Lawrence
This was an attempt to make more of the vect testsuite compilable with a stage-1 compiler, i.e. without standard header files like stdlib.h, to ease looking for differences in assembly output. (It is still necessary to comment out most of tree-vect.h to do this, but at least such temporary/local ch

Re: [gomp4] merge ptx changes

2016-01-11 Thread Nathan Sidwell
On 01/11/16 07:18, Thomas Schwinge wrote: Hi! On Tue, 5 Jan 2016 09:22:46 -0500, Nathan Sidwell wrote: This patch merges my most recent sequence of ptx backend changes to the gomp4 branch. I suppose it's not been intentional that during that, you dropped some of the changes present on gomp-

Re: [PATCH, ARM] Fox target/69180] #pragma GCC target should not warn about redefined macros

2016-01-11 Thread Kyrill Tkachov
On 11/01/16 12:54, Christian Bruel wrote: Hi Kyrill, On 01/11/2016 12:32 PM, Kyrill Tkachov wrote: Hi Christian, On 07/01/16 15:40, Christian Bruel wrote: as discussed with Kyrill (https://gcc.gnu.org/ml/gcc-patches/2016-01/msg00307.html), this patch avoids confusing (for the testsuite) ma

Re: [PATCH][AArch64] PR rtl-optimization/68796: Add patterns for QImode and HImode comparison with zero

2016-01-11 Thread James Greenhalgh
On Thu, Jan 07, 2016 at 03:39:42PM +, Kyrill Tkachov wrote: > Hi all, > > This is an aarch64-specific approach to fixing the issue I raised in the > thread at: > https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01779.html > > The guidance there was to define aarch64 patterns for comparing QImod

[PATCH] S/390: Reduce accuracy of bessel_6.f90.

2016-01-11 Thread Dominik Vogt
Another patch reducing the accuracy required in the bessel_6 test. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany gcc/testsuite/ChangeLog * gfortran.dg/bessel_6.f90: Reduce accuracy for S/390. >From 70a35dd6f6bf906d8e5907667ad0f04f981a61ac Mon Sep 17 00:00:00 2001 From: Dominik Vog

[PATCH] PR target/69225: gcc uses double precision instead of single float with -m32 -std=c99 -msoft-float

2016-01-11 Thread H.J. Lu
When FPU isn't used, there is no excess precision. We should set FLT_EVAL_METHOD to 0 if 387 is disabled. OK for trunk? Thanks. H.J. --- gcc/ PR target/69225 * config/i386/i386.h (TARGET_FLT_EVAL_METHOD): Set to 0 if TARGET_80387 is false. gcc/testsuite PR tar

Re: [gomp4] private reductions

2016-01-11 Thread Cesar Philippidis
On 01/11/2016 04:10 AM, Thomas Schwinge wrote: > On Wed, 6 Jan 2016 19:55:02 -0800, Cesar Philippidis > wrote: >> This patch updates the way that private reductions are handled in gomp4 >> to be more like trunk. > > Anything to commit to trunk (test cases at least?)? I could possibly apply the

Re: [gomp4] teach the lto driver to error for missing decls

2016-01-11 Thread Bernd Schmidt
On 01/08/2016 11:37 PM, Cesar Philippidis wrote: In openacc there are situations where a user may fail to mark a variable or function as offloadable (either using declare or routine). This patch makes the lto wrapper reduce the missing decl assertion to an error. Hmm, it might be good to have a

Re: [gomp4] teach the lto driver to error for missing decls

2016-01-11 Thread Cesar Philippidis
On 01/11/2016 07:34 AM, Bernd Schmidt wrote: > On 01/08/2016 11:37 PM, Cesar Philippidis wrote: >> In openacc there are situations where a user may fail to mark a variable >> or function as offloadable (either using declare or routine). This patch >> makes the lto wrapper reduce the missing decl as

Re: [gomp4] Fix use of declare'd vars by routine procedures.

2016-01-11 Thread James Norris
Hi! On 01/11/2016 05:55 AM, Thomas Schwinge wrote: Hi! On Thu, 7 Jan 2016 12:57:32 -0600, James Norris wrote: The checking of variables declared by OpenACC declare directives used within an OpenACC routine procedure was not being done correctly. This fix adds the checking required and also a

Re: [PATCH] PR c++/68795: fix uninitialized close_paren_loc in cp_parser_postfix_expression (v2)

2016-01-11 Thread Bernd Schmidt
On 12/18/2015 08:05 PM, David Malcolm wrote: On Thu, 2015-12-17 at 19:21 +0100, Bernd Schmidt wrote: On 12/17/2015 07:32 PM, David Malcolm wrote: + if (close_paren_loc) close_paren_loc != UNKNOWN_LOCATION - it's very confusing otherwise. Bernd Here's an updated version; the on

[PATCH] Fix PR69173

2016-01-11 Thread Richard Biener
The following fixes PR69173. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2016-01-11 Richard Biener PR tree-optimization/69173 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Only fixup the cycle if all stmts are in a pattern.

Re: [PATCH] Fix math transformation on targets without c99 math functions

2016-01-11 Thread John David Anglin
On 2016-01-11 8:24 AM, Jakub Jelinek wrote: On Mon, Jan 11, 2016 at 02:16:31PM +0100, Christophe Lyon wrote: In any case, we have no_c99_libc_has_function on hpux and everything on linux. So, I don't think testing with function_c99_misc on hppa will show any difference. Okay with function_c99

Re: [PATCH, testsuite] Fix g++.dg/pr67989.C test failure when running with -march or -mcpu

2016-01-11 Thread Bernd Schmidt
On 01/08/2016 10:33 AM, Thomas Preud'homme wrote: 2016-01-08 Thomas Preud'homme * g++.dg/pr67989.C: Remove ARM-specific option. * gcc.target/arm/pr67989.C: New file. I checked some other arm tests and they have things like /* { dg-skip-if "avoid conflicting multilib optio

Re: prevent "undef var" errors on gcc --help or --version

2016-01-11 Thread Bernd Schmidt
On 01/08/2016 02:23 PM, Olivier Hainque wrote: + /* Undefined variable references in specs are harmless if + we're running for --help or --version alone, or together. */ + spec_undefvar_allowed = +(((print_version || print_help_list) + && decoded_options_count == 2) + || +

Re: [PATCH] Fix math transformation on targets without c99 math functions

2016-01-11 Thread Christophe Lyon
On 11 January 2016 at 16:56, John David Anglin wrote: > On 2016-01-11 8:24 AM, Jakub Jelinek wrote: >> >> On Mon, Jan 11, 2016 at 02:16:31PM +0100, Christophe Lyon wrote: > > In any case, we have no_c99_libc_has_function on hpux and everything on > linux. So, I > don't think testi

[PATCH PR68911]Check overflow when computing range information from loop niter bound

2016-01-11 Thread Bin Cheng
Hi, A wrong code bug is reported in PR68911, which GCC generates infinite loop for below example after loop niter analysis changes. After that change, scev_probably_wraps_p identifies that e_1 in below case never overflow/wrap: : e_15 = e_1 + 1; : # e_1 = PHI if (e_1 <= 93)

Re: [PATCH] PR target/69225: gcc uses double precision instead of single float with -m32 -std=c99 -msoft-float

2016-01-11 Thread Uros Bizjak
On Mon, Jan 11, 2016 at 3:52 PM, H.J. Lu wrote: > When FPU isn't used, there is no excess precision. We should set > FLT_EVAL_METHOD to 0 if 387 is disabled. > > OK for trunk? > > Thanks. > > H.J. > --- > gcc/ > > PR target/69225 > * config/i386/i386.h (TARGET_FLT_EVAL_METHOD): Se

Re: [PR tree-optimization/64946] Push integer type conversion to ABS_EXPR argument when possible.

2016-01-11 Thread Matthew Wahab
On 08/01/16 22:24, Joseph Myers wrote: On Fri, 8 Jan 2016, Matthew Wahab wrote: Hello, The C/C++ front-ends apply type conversions to expressions using ABS with integral arguments of type smaller than int. This means that, for short x, ABS(x) becomes something like (short)ABS((int)x)). When th

Re: [PR tree-optimization/64946] Push integer type conversion to ABS_EXPR argument when possible.

2016-01-11 Thread Bernd Schmidt
On 01/11/2016 05:33 PM, Matthew Wahab wrote: The case I'm trying to fix has (short)abs((int)short_var). I'd thought that if abs(short_var) was undefined because the result couldn't be represented then the type conversion from int to short would also be undefined. In fact, it's implementation def

[PATCH] PR target/69225: Set FLT_EVAL_METHOD to 2 only if 387 FPU is used

2016-01-11 Thread H.J. Lu
On Mon, Jan 11, 2016 at 8:15 AM, Uros Bizjak wrote: > On Mon, Jan 11, 2016 at 3:52 PM, H.J. Lu wrote: >> When FPU isn't used, there is no excess precision. We should set >> FLT_EVAL_METHOD to 0 if 387 is disabled. >> >> OK for trunk? >> >> Thanks. >> >> H.J. >> --- >> gcc/ >> >> PR targe

Re: C PATCH to rectify warning for character types (PR c/23087)

2016-01-11 Thread Martin Sebor
On 01/08/2016 06:21 PM, Martin Sebor wrote: The point of this warning is that there are certain cases of incompatible types that are less serious than others - namely, those where the only aspect of the type that is different is its signedness. Those get a more specific warning, which is given u

Re: [patch] Avoid an unwanted decl re-map in copy_gimple_seq_and_replace_locals

2016-01-11 Thread Jakub Jelinek
On Mon, Jan 11, 2016 at 09:41:31AM +0100, Richard Biener wrote: > Hum. Can't you check id->remapping_type_depth? That said, how do > we end up recursing into remap_decl when copying the variable length > decl/type? Can't we avoid the recursion (basically avoid remapping > variable-size types at

[PATCH, testsuite]: Do not compile gcc.target/i386/pr66232-{10,11,12,13}.c on ia32 target

2016-01-11 Thread Uros Bizjak
Hello! With older binutils, dg-require-effective-target maybe_x32 works correctly only on 64bit targets. 2016-01-11 Uros Bizjak * gcc.target/i386/pr66232-10.c: Do not compile on ia32 target. * gcc.target/i386/pr66232-11.c: Ditto. * gcc.target/i386/pr66232-12.c: Ditto. * gcc.ta

Re: [PATCH] Fix math transformation on targets without c99 math functions

2016-01-11 Thread Jakub Jelinek
On Mon, Jan 11, 2016 at 05:11:21PM +0100, Christophe Lyon wrote: > I tested a similar version on my side. It just makes the test become > UNSUPPORTED for arm/aarch64 + newlib. They used to pass, though. Is anything bad on that? The test tests functions that newlib does not implement, so it is not

[PATCH][AArch64] Handle CSEL of zero_extended operands in rtx costs

2016-01-11 Thread Kyrill Tkachov
Hi all, This patch fixes the test gcc.target/aarch64/pr66776.c for -mcpu=cortex-a53. Currently we don't handle the (if_then_else (cond) (zero_extend r1) (zero_extend r2)) form of CSEL, so we end up recursing into the operands of the if_then_else and for some CPUs reject the combination. We end

[patch] libstdc++/60976 allocator_traits> partial specialization

2016-01-11 Thread Jonathan Wakely
This adds a specialization of std::allocator_traits> in order to avoid doing all the heavy SFINAE work to detect which members are present in the allocator. We don't need to check for them because we know the exact properties of std::allocator so can just hard-code them. This helps reduce some of

[PATCH][AArch64] Handle compare of zero_extract form of TST-immediate in rtx costs

2016-01-11 Thread Kyrill Tkachov
Hi all, The test gcc.target/aarch64/tst_3.c fails for an explicit -mcpu=cortex-a53 because we don't handle the recent compare with zero_extract pattern properly in rtx costs, so we end up recursing into its operands and end up rejecting the combination for some CPUs, generating an AND-immediat

[PATCH] Don't test ifcvt-3.c on 32-bit i?86 (PR target/67462)

2016-01-11 Thread Jakub Jelinek
Hi! As mentioned in the PR, this is a test new in GCC 6, that relies on rtx costs to be right to succeed, and on i?86 (32-bit) they are not right. While the costs look weird on i?86, it is cost code in generic code, and I'm afraid changing those is too risky now so late in stage3, so I'm just prop

[PATCH] Fix up my recent change to vect_get_constant_vectors (PR tree-optimization/69207)

2016-01-11 Thread Jakub Jelinek
Hi! Based on discussions on IRC, I'm submitting following fix for a regression on aarch64 - partial reversion (the case where VCE works too, just I thought using NOP_EXPR would be nicer) and change in the assert - op better be some integral value if converting it to VECTOR_BOOLEAN_TYPE_P's element

[PATCH] Fix up fold_convert{,ible_p}

2016-01-11 Thread Jakub Jelinek
Hi! Related to the PR69207 changes, the problem there has been that fold_convertible_p allowed conversion from a vector type to same sized integral type, and fold_convert used NOP_EXPR in that case. But, such an operation is much better handled using VCE. Bootstrapped/regtested on x86_64-linux a

Re: [PATCH] OpenACC documentation for libgomp

2016-01-11 Thread Bernd Schmidt
On 01/05/2016 04:47 PM, James Norris wrote: I've updated the original patch after some very helpful comments from Sandra (thank you, thank you). OK to commit to trunk? I'm probably not fully qualified to review the contents either, but few people are and it looks reasonable enough that I gues

[C++ PATCH] Fix ICE due to Cilk+ related cp_gimplify_expr bug (PR objc++/68511, PR c++/69213)

2016-01-11 Thread Jakub Jelinek
Hi! If errors are reported in unrelated functions, then due to recent Cilk+ related change in cp_gimplify_expr basically all gimplification results in almost no statements to be added to the IL, while returning SSA_NAMEs set by the missing code, because for INIT_EXPRs cp_gimplify_expr would just r

Re: [PATCH] Fix math transformation on targets without c99 math functions

2016-01-11 Thread Szabolcs Nagy
On 11/01/16 16:39, Jakub Jelinek wrote: On Mon, Jan 11, 2016 at 05:11:21PM +0100, Christophe Lyon wrote: I tested a similar version on my side. It just makes the test become UNSUPPORTED for arm/aarch64 + newlib. They used to pass, though. Is anything bad on that? The test tests functions that

Re: [PATCH] OpenACC documentation for libgomp

2016-01-11 Thread Jakub Jelinek
On Tue, Jan 05, 2016 at 09:47:59AM -0600, James Norris wrote: > I've updated the original patch after some very helpful > comments from Sandra (thank you, thank you). I'd prefer if OpenMP * Enabling OpenMP::How to enable OpenMP for your applications. * Runtime Library Routines:: The

Re: [PATCH] Don't test ifcvt-3.c on 32-bit i?86 (PR target/67462)

2016-01-11 Thread Jeff Law
On 01/11/2016 10:10 AM, Jakub Jelinek wrote: Hi! As mentioned in the PR, this is a test new in GCC 6, that relies on rtx costs to be right to succeed, and on i?86 (32-bit) they are not right. While the costs look weird on i?86, it is cost code in generic code, and I'm afraid changing those is to

[PATCH] Avoid VRP from propagating (ab) SSA_NAMEs into conditions (PR tree-optimization/69214)

2016-01-11 Thread Jakub Jelinek
Hi! As the testcase shows, simplify_cond_using_ranges has one place where it can extend range of SSA_NAME_OCCURS_IN_ABNORMAL_PHI ssa names and cause SSA corruption by that. Fixed by only optimizing that if it is not (ab). The optimized statements are GIMPLE_CONDs with SSA_NAME cmp INTEGER_CST, s

Re: [PR tree-optimization/64946] Push integer type conversion to ABS_EXPR argument when possible.

2016-01-11 Thread Richard Biener
On January 11, 2016 5:36:33 PM GMT+01:00, Bernd Schmidt wrote: >On 01/11/2016 05:33 PM, Matthew Wahab wrote: >> >> The case I'm trying to fix has (short)abs((int)short_var). I'd >thought >> that if >> abs(short_var) was undefined because the result couldn't be >represented >> then the type >> con

Re: [PATCH] Fix up fold_convert{,ible_p}

2016-01-11 Thread Richard Biener
On January 11, 2016 6:15:48 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >Related to the PR69207 changes, the problem there has been that >fold_convertible_p allowed conversion from a vector type to same sized >integral type, and fold_convert used NOP_EXPR in that case. But, >such an operation is m

[C++ PATCH] Fix delayed folding caused ICE (PR c++/69211)

2016-01-11 Thread Jakub Jelinek
Hi! Seems since delayed C++ folding fold_* can sometimes be called with operand(s) that are NOP_EXPR of INTEGER_CST. Unfortunately the folder is heavily unprepared to deal with that, I think it is not dozens but hundreds of places where it assumes that if argN (result of STRIP_NOPS) is INTEGER_CS

Re: [PATCH] Don't test ifcvt-3.c on 32-bit i?86 (PR target/67462)

2016-01-11 Thread Jakub Jelinek
On Mon, Jan 11, 2016 at 10:39:58AM -0700, Jeff Law wrote: > On 01/11/2016 10:10 AM, Jakub Jelinek wrote: > >Hi! > > > >As mentioned in the PR, this is a test new in GCC 6, that relies on rtx > >costs to be right to succeed, and on i?86 (32-bit) they are not right. > >While the costs look weird on i

Re: [PATCH] Avoid VRP from propagating (ab) SSA_NAMEs into conditions (PR tree-optimization/69214)

2016-01-11 Thread Richard Biener
On January 11, 2016 6:40:28 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >As the testcase shows, simplify_cond_using_ranges has one place where >it can extend range of SSA_NAME_OCCURS_IN_ABNORMAL_PHI ssa names and >cause SSA corruption by that. > >Fixed by only optimizing that if it is not (ab). Th

[PING][PATCH 5/6] [DJGPP] gcc/config/i386: update DJGPP configuration related files

2016-01-11 Thread Andris Pavenis
I posted last version of patch where I took review comments into account month ago: https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01328.html Andris

libgo patch committed: Make ps use more portable

2016-01-11 Thread Ian Lance Taylor
This patch from Andrew Wilkins makes the use of ps in the libgo testsuite more portable. This should fix GCC PR 68980. Committed to mainline. Ian Index: libgo/testsuite/gotest === --- libgo/testsuite/gotest (revision 231693) ++

Re: [C++ PATCH] Fix delayed folding caused ICE (PR c++/69211)

2016-01-11 Thread Jason Merrill
OK. Jason

Re: [PATCH] PR c++/68795: fix uninitialized close_paren_loc in cp_parser_postfix_expression (v2)

2016-01-11 Thread David Malcolm
On Mon, 2016-01-11 at 16:51 +0100, Bernd Schmidt wrote: > On 12/18/2015 08:05 PM, David Malcolm wrote: > > On Thu, 2015-12-17 at 19:21 +0100, Bernd Schmidt wrote: > >> On 12/17/2015 07:32 PM, David Malcolm wrote: > >>> + if (close_paren_loc) > >> > >> close_paren_loc != UNKNOWN_LOCATION

Re: [PATHCH] Disable inline asm for in-tree mpfr (PR69134)

2016-01-11 Thread Bernd Schmidt
On 01/05/2016 07:43 PM, Richard Biener wrote: IIRC the logic at some point at least used host CPU detection to select asm. That's undesirable if you want to run binaries on different hosts. Not sure if this is still the case with newer gmp/mpfr, but as long as we allow the ancient ones we shoul

Re: [patch] libsanitizer

2016-01-11 Thread Bernd Schmidt
On 11/10/2015 11:00 PM, Andreas Tobler wrote: the attached patch removes the hard-coded requirement for the link operation with -ldl. On FreeBSD we do not need that, it breaks compilation. # Common libraries that we need to link against for all sanitizer libs. -link_sanitizer_common='-lpthrea

Re: [patch] libsanitizer

2016-01-11 Thread Andreas Tobler
Hi Bernd, On 11.01.16 19:28, Bernd Schmidt wrote: On 11/10/2015 11:00 PM, Andreas Tobler wrote: the attached patch removes the hard-coded requirement for the link operation with -ldl. On FreeBSD we do not need that, it breaks compilation. # Common libraries that we need to link against for

Re: [PATCH], PowerPC IEEE 128-bit fp, #11-rev3 (enable libgcc conversions)

2016-01-11 Thread Michael Meissner
I fixed the #ifdef to use __NO_FPRS__ (thanks for the heads up on that). I also believe I fixed the various formatting issues. These two patches build on a big endian power7 host and little endian power8 host with no regressions in the testsuite (the gcc patch is included here, but it hasn't chan

  1   2   >