Re: [nvptx] fix some c++ tests

2015-10-08 Thread Thomas Schwinge
Hi Nathan! Thanks for looking into this. When I reported this, , quite a lot of testcases had been failing -- with recent GCC trunk, the number is smaller (because of other middle end/optimization changes, I supp

[PATCH] [5/n] Fix minor SSA_NAME leaks

2015-10-08 Thread Jeff Law
This set of leaks is a bit more interesting. value-prof just blindly clears the vdefs on certain statements. Of course that results in a leaked SSA_NAME. The first of the three instances was the one I hit, the others were found by inspection. Like prior patches, I've kept a minimized test

[PR67766] reorder return value copying from PARALLELs and CONCATs (was: Re: [PR64164] drop copyrename, integrate into expand)

2015-10-08 Thread Alexandre Oliva
This fixes fallout from the PR64164 expander revamp. On alpha, PARALLEL hard return values may be modeless, and this confuses the code that wants to copy the pseudo/s in the returned value to the return hard regs. It used to work because PARALLELs and CONCATs used to lead to DECL_RTL with the sam

[PR67828] don't unswitch loops on undefined SSA values (was: Re: [PR64164] drop copyrename, integrate into expand)

2015-10-08 Thread Alexandre Oliva
This patch fixes a latent bug in loop unswitching exposed by the PR64164 changes. We would move a test out of a loop that might never have been executed, and that accessed an uninitialized variable. The uninitialized SSA name, due to uncprop, now gets coalescesd with other SSA names, expanding th

Re: [PATCH] New attribute to create target clones

2015-10-08 Thread Jeff Law
On 10/08/2015 02:01 PM, Evgeny Stupachenko wrote: On Thu, Oct 8, 2015 at 10:00 PM, Jeff Law wrote: On 09/24/2015 04:28 PM, Evgeny Stupachenko wrote: I've fixed ICE and review issues. x86 make check and bootstrap passed. Thanks, Evgeny ChangeLog 2015-09-25 Evgeny Stupachenko gcc/

[PATCH] c/67882 - improve -Warray-bounds for invalid offsetof

2015-10-08 Thread Martin Sebor
Gcc attempts to diagnose invalid offsetof expressions whose member designator is an array element with an out-of-bounds index. The logic in the function that does this detection is incomplete, leading to false negatives. Since the result of the expression in these cases can be surprising, this pat

[PATCH] c/67882 - improve -Warray-bounds for invalid offsetof

2015-10-08 Thread Martin Sebor
Gcc attempts to diagnose invalid offsetof expressions whose member designator is an array element with an out-of-bounds index. The logic in the function that does this detection is incomplete, leading to false negatives. Since the result of the expression in these cases can be surprising, this pat

Re: [RFC, Patch]: Optimized changes in the register used inside loop for LICM and IVOPTS.

2015-10-08 Thread Bin.Cheng
On Thu, Oct 8, 2015 at 1:53 PM, Ajit Kumar Agarwal wrote: > > > -Original Message- > From: Bin.Cheng [mailto:amker.ch...@gmail.com] > Sent: Thursday, October 08, 2015 10:29 AM > To: Ajit Kumar Agarwal > Cc: GCC Patches; Vinod Kathail; Shail Aditya Gupta; Vidhumouli Hunsigida; > Nagaraju M

Re: [RFA 1/2]: Don't ignore target_header_dir when deciding inhibit_libc

2015-10-08 Thread Hans-Peter Nilsson
> From: Ulrich Weigand > Date: Thu, 8 Oct 2015 18:52:22 +0200 > Hans-Peter Nilsson wrote: > > > Let me ask you right back: after an installation, should > > installation of a newer gcc *not* automatically pick up the > > header files installed (copied to sys-include) by the previous > > installa

Re: Do not use TYPE_CANONICAL in useless_type_conversion

2015-10-08 Thread Jan Hubicka
> > Index: expr.c > === > --- expr.c(revision 228604) > +++ expr.c(working copy) > @@ -6703,7 +6704,7 @@ store_field (rtx target, HOST_WIDE_INT b > emit_group_store (temp_target, temp, TREE_TYPE (exp), size); >

Fix use of availability in ipa-icf

2015-10-08 Thread Jan Hubicka
Hi, this is a bug I noticed while reading the code. We can not assume interposable objects to be equivalent unless they are actually the same symbols. Bootstrapped/regtested x86_64-linux, comitted. Honza * ipa-icf.c (sem_item::compare_symbol_references): Fix use of availability.

Re: [PATCH] [4/n] Fix minor SSA_NAME leaks

2015-10-08 Thread Jeff Law
On 10/08/2015 05:18 PM, Jeff Law wrote: Another, this time in tree-ssa-loop-im. In this case it's just a missing release_defs for a statement we know won't have virtual operands. As with the others, I've got a reduced testcase and will be trying to figure out how to best utilize it. Bootstrapp

[PATCH] [4/n] Fix minor SSA_NAME leaks

2015-10-08 Thread Jeff Law
Another, this time in tree-ssa-loop-im. In this case it's just a missing release_defs for a statement we know won't have virtual operands. As with the others, I've got a reduced testcase and will be trying to figure out how to best utilize it. Bootstrapped & regression tested on x86_64-linux

Re: Do not use TYPE_CANONICAL in useless_type_conversion

2015-10-08 Thread Jan Hubicka
> Eric Botcazou writes: > > >> Thank you! I commited the patch. > > > > It breaks the Ada build on x86-64 though: > > Also on ia64: Sorry to hear that :( > > /usr/local/gcc/test/Build/./prev-gcc/xgcc > -B/usr/local/gcc/test/Build/./prev-gcc/ -B/usr/ia64-suse-linux/bin/ > -B/usr/ia64-suse-lin

Re: [PATCH] New attribute to create target clones

2015-10-08 Thread Jan Hubicka
> > > >Yes, here you have different names for different variants of the function > >body. Basically this pass takes ctarget attribute and creates bunch of > >verisons > >of the functions and assigns them the proper target attributes, right? > Right. Given a single function in the source tree with

Re: [Patch] PowerPC IEEE 128-bit patch #7 (revised #2)

2015-10-08 Thread Joseph Myers
Question: what happens if you mix __float128 and __ibm128 in an arithmetic or conditional expression? __float128 a; __ibm128 b; int x; /* ... */ a + b; x ? a : b; (And likewise if one or both are the corresponding complex types.) As I suggested in

[PATCH] [3/n] Fix minor SSA_NAME leaks

2015-10-08 Thread Jeff Law
And other minor leak. This time in tree-stdarg. Unlike other cases, we're dropping just the virtual definition, other definitions on the statement need to be preserved (they're going to be re-used). Additionally, this one is missing the call to unlink_stmt_vdef. Like other cases, I've got a

Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack

2015-10-08 Thread Matthias Klose
On 08.10.2015 20:56, Lynn A. Boger wrote: I think my original fix with linux.h doing the #undef on TARGET_CAN_SPLIT_STACK_64BIT is the right fix at least for powerpc-linux-gnu 32 bit only. It works for powerpc-linux-gnu without multilib and doesn't break powerpc64-linux-gnu or powerpc64le-linux-

Re: Do not use TYPE_CANONICAL in useless_type_conversion

2015-10-08 Thread Jan Hubicka
> On Thu, 8 Oct 2015, Jan Hubicka wrote: > > > > > > > && TREE_CODE (outer_type) == OFFSET_TYPE > > > > > > Ok with those changes. > > > > Thank you! I commited the patch. > > At a hike today it appeared to me that for ipa-icf and other calling > > convetions > > checks we should not rely on u

[PATCH] [2/n] Fix minor SSA_NAME leaks

2015-10-08 Thread Jeff Law
Another fairly obvious leak, this time in tree-ssa-dse.c where we again call gsi_remove without an associated release_defs. The only thing of note here is this time we have virtual operations on the statement. So before we call gsi_remove and release_defs, we have to call unlink_stmt_vdef to

Re: [PATCH] New attribute to create target clones

2015-10-08 Thread Evgeny Stupachenko
On Thu, Oct 8, 2015 at 10:00 PM, Jeff Law wrote: > On 09/24/2015 04:28 PM, Evgeny Stupachenko wrote: >> >> I've fixed ICE and review issues. >> x86 make check and bootstrap passed. >> >> Thanks, >> Evgeny >> >> ChangeLog >> >> 2015-09-25 Evgeny Stupachenko >> >> gcc/ >> * Makefile.in (OB

Re: [PATCH] New attribute to create target clones

2015-10-08 Thread Jeff Law
On 10/08/2015 01:23 PM, Jan Hubicka wrote: Sorry this has taken so long to come back to... As I mentioned a couple months ago, I'd hoped Jan would chime in on the IPA/symtab requirements. But that didn't happen. Sorry for that. I had bit too many real life things this summer and I am still t

Re: FW: [PATCH] Target hook for disabling the delay slot filler.

2015-10-08 Thread Jeff Law
On 09/18/2015 05:10 AM, Simon Dardis wrote: Are you trying to say that you have the option as to what kind of branch to use? ie, "ordinary", presumably without a delay slot or one with a delay slot? Is the "ordinary" actually just a nullified delay slot or some form of likely/not likely stati

Re: [PATCH] New attribute to create target clones

2015-10-08 Thread Jan Hubicka
> Sorry this has taken so long to come back to... As I mentioned a > couple months ago, I'd hoped Jan would chime in on the IPA/symtab > requirements. But that didn't happen. Sorry for that. I had bit too many real life things this summer and I am still trying to catch up. > > > SO I went bac

Re: [PATCH][committed] Fix PR67652: wrong sizeof calculation in liboffloadmic

2015-10-08 Thread Ilya Verbin
On Mon, Sep 28, 2015 at 18:15:14 +0200, Jakub Jelinek wrote: > > -char * env_var = (char*) > > malloc(sizeof("COI_DMA_CHANNEL_COUNT=2" + 1)); > > +char * env_var = (char*) > > malloc(sizeof("COI_DMA_CHANNEL_COUNT=2")); > > sprintf(env_var, "COI_DMA_CHANNEL_COU

[Patch] PowerPC IEEE 128-bit patch #7 (revised #2)

2015-10-08 Thread Michael Meissner
This is the revised patch #7 for the IEEE 128-bit software floating point support in the PowerPC. I have tested this on big endian power7 (both 32/64 bit) and little endian power8 with no regressions. Is this ok to install in the trunk? This patch should allow __float128 support on VSX systems, bu

Re: [PATCH] New attribute to create target clones

2015-10-08 Thread Jeff Law
On 09/24/2015 04:28 PM, Evgeny Stupachenko wrote: I've fixed ICE and review issues. x86 make check and bootstrap passed. Thanks, Evgeny ChangeLog 2015-09-25 Evgeny Stupachenko gcc/ * Makefile.in (OBJS): Add multiple_target.o. * multiple_target.c (make_attribute): New.

Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack

2015-10-08 Thread Lynn A. Boger
I think my original fix with linux.h doing the #undef on TARGET_CAN_SPLIT_STACK_64BIT is the right fix at least for powerpc-linux-gnu 32 bit only. It works for powerpc-linux-gnu without multilib and doesn't break powerpc64-linux-gnu or powerpc64le-linux-gnu. Can you tell me how you are config

Re: [PATCH v6][aarch64] Implemented reciprocal square root (rsqrt) estimation in -ffast-math

2015-10-08 Thread Evandro Menezes
LGTM -- Evandro Menezes On 01/02/1970 09:27 PM, Benedikt Huber wrote: This sixth revision of the patch: * Cleans up style issues. * Makes test conform to standards. Ok for check in. Benedikt Huber (1): 2015-10-02 Benedikt Huber Philipp Tomsich gcc/ChangeLog

Re: PATC: Round up the SSE register save area only if needed

2015-10-08 Thread Uros Bizjak
On Thu, Oct 8, 2015 at 8:29 PM, H.J. Lu wrote: > There is is no point to round up the SSE register save area to 16 bytes if > the incoming stack boundary is less than 16 bytes. > > OK for trunk? OK, with the improved comment: /* The only ABI that has saved SSE registers (Win64) also has a

PATC: Round up the SSE register save area only if needed

2015-10-08 Thread H.J. Lu
There is is no point to round up the SSE register save area to 16 bytes if the incoming stack boundary is less than 16 bytes. OK for trunk? H.J. --- * config/i386/i386.c (ix86_compute_frame_layout): Round up the SSE register save area to 16 bytes only if the incoming stack

Re: Move some bit and binary optimizations in simplify and match

2015-10-08 Thread Bernd Schmidt
On 10/08/2015 08:03 PM, Joseph Myers wrote: On Thu, 8 Oct 2015, Bernd Schmidt wrote: On 10/07/2015 11:54 AM, Hurugalawadi, Naveen wrote: Move Fold X & (X ^ Y) as X & ~Y to match.pd. Move Fold X & (Y ^ X) as ~Y & X to match.pd. I wonder if we shouldn't try to autogenerate patt

Re: Move some bit and binary optimizations in simplify and match

2015-10-08 Thread Joseph Myers
On Thu, 8 Oct 2015, Bernd Schmidt wrote: > On 10/07/2015 11:54 AM, Hurugalawadi, Naveen wrote: > > Move Fold X & (X ^ Y) as X & ~Y to match.pd. > > Move Fold X & (Y ^ X) as ~Y & X to match.pd. > > I wonder if we shouldn't try to autogenerate patterns such as these. I did > something like

[PATCH] [1/n] Fix minor SSA_NAME leaks

2015-10-08 Thread Jeff Law
This is the first of several patches to fix various SSA_NAME leaks throughout the compiler. I'm hoping we'll get to the point where they're all plugged and we institute a no-leak policy in the SSA_NAME manager. Until then, I'll be plugging leaks. This one is pretty obvious. We call gsi_rem

[nvptx] fix some c++ tests

2015-10-08 Thread Nathan Sidwell
I've committed this to trunk. The C++ ABI now returns a pointer to the passed-in artificial arg that points to the return area. consequently return-in-mem and type_mode(return_type) == VOIDmode are not tautologies. nathan 2015-10-08 Nathan Sidwell * config/nvptx/nvptx.h (struct machine_

[PATCH, i386, AVX512] PR target/67895: Fix position of embedded rounding/SAE mode in AVX512 vrangep* and vcvt?si2s* instructions.

2015-10-08 Thread Alexander Fomin
Hi All, This patch addresses PR target/67895. For some AVX512 instructions we've used to emit embedded rounding/SAE specifier in a wrong place. The patch fixes its position for vrange* and vcvt?si2s* instructions. I've also updated regular expressions for corresponding assembly in i386 testsuite,

[hsa] Fix segfault in fixup_child_record_type

2015-10-08 Thread Martin Jambor
Hi, I have committed the following patch to the hsa branch, toput the bail-out test in fixup_child_record_type all the way to the top where it should be, otherwise we get segfaults when gridifying kernels with variable-sized variables. Martin 2015-10-08 Martin Jambor * omp-low.c (fi

Re: Move some bit and binary optimizations in simplify and match

2015-10-08 Thread Bernd Schmidt
On 10/07/2015 11:54 AM, Hurugalawadi, Naveen wrote: Move Fold X & (X ^ Y) as X & ~Y to match.pd. Move Fold X & (Y ^ X) as ~Y & X to match.pd. I wonder if we shouldn't try to autogenerate patterns such as these. I did something like that for a different project a long time ago.

[PATCH] bb-reorder: Improve the simple algorithm for -Os (PR67864)

2015-10-08 Thread Segher Boessenkool
As the PR points out, the "simple" reorder algorithm makes bigger code than the STC algorithm did, for -Os, for x86. I now tested it for many different targets and it turns out to be worse everywhere. This simple patch tunes "simple" a bit; this makes it better than STC almost everywhere. The on

Re: Add -foffload-abi support for PPC

2015-10-08 Thread Thomas Schwinge
Hi! On Thu, 8 Oct 2015 11:19:05 -0500, James Norris wrote: > On 10/07/2015 08:51 AM, David Edelsohn wrote: > > On Wed, Oct 7, 2015 at 4:02 AM, Thomas Schwinge > > wrote: > > > >> From a quick look at the *_TYPE_SIZE definitions in > >> gcc/config/rs6000/rs6000.h as well as > >>

Re: Move sqrt and cbrt simplifications to match.pd

2015-10-08 Thread Richard Sandiford
Marc Glisse writes: > On Mon, 5 Oct 2015, Richard Sandiford wrote: > >> + /* cbrt(sqrt(x)) -> pow(x,1/6). */ >> + (simplify >> + (sqrts (cbrts @0)) >> + (pows @0 { build_real_truncate (type, dconst<1, 6> ()); })) >> + /* sqrt(cbrt(x)) -> pow(x,1/6). */ >> + (simplify >> + (cbrts (sqrts

Re: [RFA 1/2]: Don't ignore target_header_dir when deciding inhibit_libc

2015-10-08 Thread Ulrich Weigand
Hans-Peter Nilsson wrote: > Let me ask you right back: after an installation, should > installation of a newer gcc *not* automatically pick up the > header files installed (copied to sys-include) by the previous > installation when using the same prefix, *without* any > --with-headers specified in

Re: Add -foffload-abi support for PPC

2015-10-08 Thread David Edelsohn
On Thu, Oct 8, 2015 at 12:19 PM, James Norris wrote: > I've revised the patch from the review comments (thank you) and > is attached. > > Regtested on x86_64 and powerpcle64. > > OK for trunk? What is the goal? Do you want this to return the correct value or only the value for the supported 64 b

[HSA] Introduce support for shared libraries and host fallback

2015-10-08 Thread Martin Liška
Hello. Following patch set introduces HSA support for BRIG shared libraries. Apart from that, it adds new warning option (-Whsa) that pops up when HSA code generation cannot expand a function. Moreover, remaining of patches are follow-up of previous big changes. Thanks, Martin >From 89d0a81c84

Re: [PR c/64765, c/64880] Support OpenACC Combined Directives in C, C++

2015-10-08 Thread Joseph Myers
The C front-end changes are OK, but please follow up with fixes for any issues Jakub identifies. -- Joseph S. Myers jos...@codesourcery.com

[PR c/64765, c/64880] Support OpenACC Combined Directives in C, C++

2015-10-08 Thread Thomas Schwinge
Hi! Some bits extracted out of gomp-4_0-branch, and some other bits rewritten; here is a patch to support OpenACC Combined Directives in C, C++. (The Fortran front end already does support these.) As far as I know, Jakub is not available at this time, so maybe the C (Joseph) and C++ (Jason, Nath

Re: [PATCH] New attribute to create target clones

2015-10-08 Thread Jeff Law
On 09/22/2015 03:09 PM, Bernd Schmidt wrote: On 09/22/2015 09:41 PM, Jeff Law wrote: Essentially it allows us to more easily support per-microarchitecture-optimized versions of functions. You list just have to list the microarchitectures and the compiler handles the rest. Very simple, very eas

[DOC PATCH]: Mention that x86-64 now supports stack realignment from word-aligned stack pointer

2015-10-08 Thread Uros Bizjak
Hello! Attached patch documents new functionality in gcc-6 release notes. OK for GCC docs? Uros. Index: htdocs/gcc-6/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/changes.html,v retrieving revision 1.34 diff -r1.34 change

Re: [PATCH] Cleanup of IPA-CP alignment lattices

2015-10-08 Thread Martin Jambor
Hi, On Thu, Oct 08, 2015 at 12:08:15AM +0200, Jan Hubicka wrote: > > > This patch broke Solaris bootstrap in stage 1 with g++ 4.9: > > > > > > /vol/gcc/src/hg/trunk/solaris/gcc/ipa-cp.c: In member function 'bool > > > ipcp_alignment_lattice::meet_with_1(unsigned int, unsigned int)': > > > /vol/g

Re: [patch 4/3] Header file reduction - Tools for contrib

2015-10-08 Thread David Malcolm
On Tue, 2015-10-06 at 14:02 +0200, Bernd Schmidt wrote: [...] > > No commenting on the quality of python code... :-) I was > > learning python on the fly.Im sure some things are QUITE awful., [...] > > + def ii_base (iinfo): > > + return iinfo[0] > > + > > + def ii_path (iinfo): > > + ret

Re: Do not use TYPE_CANONICAL in useless_type_conversion

2015-10-08 Thread Jan Hubicka
> > Heh, we need a calling convention checker in > gimple_builtin_call_types_compatible_p and friends! Yep, i will try to play with this. So far I did not managed to create a testcase that would expose a wrong code in ICF. > > Btw, with the TYPE_CANONICAL changes I wonder whether we can make

Re: Add -foffload-abi support for PPC

2015-10-08 Thread James Norris
Hi! On 10/07/2015 08:51 AM, David Edelsohn wrote: On Wed, Oct 7, 2015 at 4:02 AM, Thomas Schwinge wrote: From a quick look at the *_TYPE_SIZE definitions in gcc/config/rs6000/rs6000.h as well as , "3-1 Fundamental Types", and

Re: Fix more of C/fortran canonical type issues

2015-10-08 Thread Jan Hubicka
> On Thu, 8 Oct 2015, Jan Hubicka wrote: > > > Hello, > > here is updated version of the patch, this time without need to modify > > useless_type_conversion. Just to recall the issue, Fortran C > > interoperability > > requires size_t to interoperate with signed version produced by Fortran FE. >

Small C++ PATCH to add SIMPLE_TARGET_EXPR_P macro

2015-10-08 Thread Jason Merrill
While working on 67557 I noticed that this pattern was checked in a few places and decided to make it a macro, even though I didn't end up using it in the fix for that bug. Tested x86_64-pc-linux-gnu, applying to trunk. commit 853122e015d3f20f80161bd820f616a34d3d5c16 Author: Jason Merrill Date

Re: Use OEP_ADDRESS_OF in emit-rtl.c

2015-10-08 Thread Jan Hubicka
> On Wed, 7 Oct 2015, Jan Hubicka wrote: > > > > > > > Did you audit all callers of mem_attrs_eq_p to see if they really > > > only care about that? After all MEM_EXPR, via access paths, encode > > > type-based alias info and thus replacing one with the other (cse.c use > > > or ifcvt.c use) is

Re: Do not use TYPE_CANONICAL in useless_type_conversion

2015-10-08 Thread Andreas Schwab
Eric Botcazou writes: >> Thank you! I commited the patch. > > It breaks the Ada build on x86-64 though: Also on ia64: /usr/local/gcc/test/Build/./prev-gcc/xgcc -B/usr/local/gcc/test/Build/./prev-gcc/ -B/usr/ia64-suse-linux/bin/ -B/usr/ia64-suse-linux/bin/ -B/usr/ia64-suse-linux/lib/ -isystem

Re: Do not use TYPE_CANONICAL in useless_type_conversion

2015-10-08 Thread Jan Hubicka
-nostdinc s-regpat.adb -o s-regpat.o > +===GNAT BUG DETECTED==+ > | 6.0.0 20151008 (experimental) [trunk revision 228597] (x86_64-suse-linux) > GCC error:| > | in gen_lowpart_common, at emit-rtl.c:1399

[mask-vec_cond, patch 2/2, i386] Add patterns for vcond_mask_optab

2015-10-08 Thread Ilya Enkovich
Hi, This patch add patterns for vcond_mask_optab. No new expand code is required, existing ix86_expand_sse_movcc is used. Thanks, Ilya -- gcc/ChangeLog: 2015-10-08 Ilya Enkovich * config/i386/i386-protos.h (ix86_expand_sse_movcc): New. * config/i386/i386.c (ix86_expand_sse_

[mask-vec_cond, patch 1/2] Support vectorization of VEC_COND_EXPR with no embedded comparison

2015-10-08 Thread Ilya Enkovich
Hi, This patch allows COND_EXPR with no embedded comparison to be vectorized. It's applied on top of vectorized comparison support series. New optab vcond_mask_optab is introduced for such statements. Bool patterns now avoid comparison in COND_EXPR in case vector comparison is supported by t

Re: [patch 0/3] Header file reduction.

2015-10-08 Thread Michael Matz
Hi, On Wed, 7 Oct 2015, Richard Biener wrote: > > I'm probably the last person in the world that still generally prefers > > -cp :-) I'm getting to the point where I can tolerate -u. > > No, I prefer -cp too - diff just too easily makes a mess out of diffs > with -u, esp. if you have re-inden

[mask-load, patch 2/2, i386] Add/modify mask load/store patterns

2015-10-08 Thread Ilya Enkovich
Hi, This patch reflects changes in maskload and maskstore optabs and adds patterns for AVX-512. Thanks, Ilya -- 2015-10-08 Ilya Enkovich * config/i386/sse.md (maskload): Rename to ... (maskload): ... this. (maskstore): Rename to ... (maskstore): ... this.

[mask-load, patch 1/2] Use boolean predicate for masked loads and store

2015-10-08 Thread Ilya Enkovich
Hi, This patch replaces integer mask argument for MASK_LOAD ans MASK_STORE calls with a boolean one. To allow various boolean vector modes assigned by a target maskload and maskstore optabs were transformed into convert_optab to get mask mode as a second operand. Patch applies on top of boole

[PR 67794] Also remap SSA_NAMEs defined in ASMs in IPA-SRA

2015-10-08 Thread Martin Jambor
Hi, the following fixes PR 67794 by properly remapping SSA_NAMEs which are based on PARM_DECLs which are about to be removed as unnecessary. And by "properly" I mean also when they are defined by a GIMPL_ASM statement. In fact, it switches to using an iterator over definitions to make sure it al

[vec-cmp, patch 6/6, i386] Add i386 support for vector comparison

2015-10-08 Thread Ilya Enkovich
Hi, This patch adds patterns for vec_cmp optabs. Vector comparison expand code was moved from VEC_COND_EXPR expanders into a separate functions. AVX-512 patterns use more simple masked versions. Thanks, Ilya -- gcc/ 2015-10-08 Ilya Enkovich * config/i386/i386-protos.h (ix86_expan

Re: [patch] header file re-ordering.

2015-10-08 Thread Jeff Law
On 10/08/2015 07:37 AM, Andrew MacLeod wrote: On 10/07/2015 06:02 PM, Jeff Law wrote: On 10/01/2015 08:33 PM, Andrew MacLeod wrote: these are all in the main gcc directory. 297 files total. Everything bootstraps on x86_64-pc-linux-gnu and powerpc64le-unknown-linux-gnu. All targets in config-l

[PING*2][PATCH, rs6000] Add memory barriers to tbegin, tend, etc.

2015-10-08 Thread Peter Bergner
Ping*2. Torvald, David approved the code portion of the patch. How does the documentation part you asked for look to you? https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00315.html Peter

New Chinese (traditional) PO file for 'cpplib' (version 5.2.0)

2015-10-08 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'cpplib' has been submitted by the Chinese (traditional) team of translators. The file is available at: http://translationproject.org/latest/cpplib/zh_TW.po (This file, 'cpp

Contents of PO file 'cpplib-5.2.0.zh_TW.po'

2015-10-08 Thread Translation Project Robot
cpplib-5.2.0.zh_TW.po.gz Description: Binary data The Translation Project robot, in the name of your translation coordinator.

[vec-cmp, patch 5/6] Disable bool patterns when possible

2015-10-08 Thread Ilya Enkovich
Hi, This patch disables transformation of boolean computations into integer ones in case target supports vector comparison. Pattern still applies to transform resulting boolean value into integer or avoid COND_EXPR with SSA_NAME as condition. Thanks, Ilya -- 2015-10-08 Ilya Enkovich

[vec-cmp, patch 4/6] Support vector mask invariants

2015-10-08 Thread Ilya Enkovich
Hi, This patch adds a special handling of boolean vector invariants. We need additional code to determine type of generated invariant. For VEC_COND_EXPR case we even provide this type directly because statement vectype doesn't allow us to compute it. Separate code is used to generate and exp

[vec-cmp, patch 3/6] Vectorize comparison

2015-10-08 Thread Ilya Enkovich
Hi, This patch supports comparison statements vectrization basing on introduced optabs. Thanks, Ilya -- gcc/ 2015-10-08 Ilya Enkovich * tree-vect-data-refs.c (vect_get_new_vect_var): Support vect_mask_var. (vect_create_destination_var): Likewise. * tree-vect-stmts.c

[vec-cmp, patch 2/6] Vectorization factor computation

2015-10-08 Thread Ilya Enkovich
Hi, This patch handles statements with boolean result in vectorization factor computation. For comparison its operands type is used instead of restult type to compute VF. Other boolean statements are ignored for VF. Vectype for comparison is computed using type of compared values. Computed

[vec-cmp, patch 1/6] Add optabs for vector comparison

2015-10-08 Thread Ilya Enkovich
Hi, This series introduces autogeneration of vector comparison and its support on i386 target. It lets comparison statements to be vectorized into vector comparison instead of VEC_COND_EXPR. This allows to avoid some restrictions implied by boolean patterns. This series applies on top of bol

C++ PATCH for c++/67557 (copy elision clobbering tail padding)

2015-10-08 Thread Jason Merrill
In this testcase, the FontTag constructor was storing the result of fontToStartTag into a stack temporary and then bitwise copying the temporary into the StartTag base subobject, which is broken for a class with a non-trivial copy constructor. This bogus copy turns out to have been introduced

Re: [PATCH ARM]: PR67745: Fix function alignment after __attribute__ 2/2

2015-10-08 Thread Bernd Schmidt
On 10/08/2015 03:50 PM, Christian Bruel wrote: Humm, I don't know what kind of alignment optimization for functions we have based on a declaration only. greping DECL_ALIGN on functions there are some bits in the ipa-icf code that seems to merge code using this information, but I think we have a d

[PATCH] Disable AIX DWARF debug frame section

2015-10-08 Thread David Edelsohn
The standard DWARF2 unwind information is not compatible with AIX DWARF debug unwind section, so this patch disables that section completely. bootstrapped on powerpc-ibm-aix7.1.2.0 Thanks, David * config/rs6000/rs6000.c (rs6000_xcoff_debug_unwind_info): Always return UI_NONE. Index: config/rs60

Re: [gomp4.1] Doacross library implementation

2015-10-08 Thread Aldy Hernandez
On 10/08/2015 05:48 AM, Torvald Riegel wrote: On Thu, 2015-09-24 at 20:32 +0200, Jakub Jelinek wrote: Torvald, can you please have a look at it, if I got all the atomics / memory models right? More detailed comments below, but in general, I'd really suggest to add more code comments for the sy

[Patch PR target/67366 2/2] [gimple-fold.c] Support movmisalign optabs in gimple-fold.c

2015-10-08 Thread Ramana Radhakrishnan
This patch by Richard allows for movmisalign optabs to be supported in gimple-fold.c. This caused a bit of pain in the testsuite with strlenopt-8.c in conjunction with the ARM support for movmisalign_optabs as the test was coded up to do different things depending on whether the target supported mi

[Patch PR target/67366 1/2] [ARM] - Add movmisalignhi / si patterns

2015-10-08 Thread Ramana Radhakrishnan
This adds movmisalignhi and movmisalignsi expanders when unaligned access is allowed by the architecture. This allows the mid-end to expand to misaligned loads and stored. Compared code generated for the Linux kernel and it changes code generation for a handful of files all for the better basicall

[Patch PR target/67366 0/2] Handle misaligned loads and stores for scalars on STRICT_ALIGNMENT targets

2015-10-08 Thread Ramana Radhakrishnan
This set of 2 patches attempts to fix PR target/67366 by introducing use of the movmisalign optabs in gimple-fold.c to allow detecting memcpys of the form shown in the testcase in the PR. Patch 1/2 fixes the ARM backend to produce movmisalign patterns when unaligned access is supported. Patch 2/2

Re: [PATCH ARM]: PR67745: Fix function alignment after __attribute__ 2/2

2015-10-08 Thread Bernd Schmidt
On 10/08/2015 04:01 PM, Christian Bruel wrote: OK, Similar pattern occurs at many other places, that changed also in the attached proposal. Not fully tested (in particular the java part) and no ChangeLog. Just to make sure that we agree on the interface first. That looks like a plain diff rath

Re: [PATCH] Simple 2-lines fix for outer-loop vectorization.

2015-10-08 Thread Richard Biener
On Thu, Oct 8, 2015 at 3:52 PM, Yuri Rumyantsev wrote: > Hi All, > > Here is a simple patch which allows to have phi with virtual operands > in inner-loop loop-closed exit phi in outer-loop vectorization (i.e. a > phi in the tail of the outer-loop). > > Bootstrap and regression testing did not sho

[PATCH] Simple 2-lines fix for outer-loop vectorization.

2015-10-08 Thread Yuri Rumyantsev
Hi All, Here is a simple patch which allows to have phi with virtual operands in inner-loop loop-closed exit phi in outer-loop vectorization (i.e. a phi in the tail of the outer-loop). Bootstrap and regression testing did not show any new failures. Is it OK for trunk? ChangeLog: 2015-10-08 Yu

Re: Generalize gimple_val_nonnegative_real_p

2015-10-08 Thread Richard Biener
On Thu, Oct 8, 2015 at 12:10 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Mon, Oct 5, 2015 at 5:02 PM, Richard Sandiford >> wrote: >>> The upcoming patch to move sqrt and cbrt simplifications to match.pd >>> caused a regression because the (abs @0)->@0 simplification didn't >>> tr

Re: using scratchpads to enhance RTL-level if-conversion: revised patch

2015-10-08 Thread Bernd Schmidt
On 10/08/2015 01:29 AM, Abe wrote: Attached please find my revised patch to the RTL if converter. This patch enables the if-conversion of half-hammocks with a store in them that the internal GCC machinery otherwise considers too hazardous to if-convert. This is made safe by using the "scratchpa

Re: Move some bit and binary optimizations in simplify and match

2015-10-08 Thread Richard Biener
On Wed, Oct 7, 2015 at 11:54 AM, Hurugalawadi, Naveen wrote: > Hi, > > Please find attached the patch that moves some more patterns from > fold-const using simplify and match. > > Please review the patch and let me know if any modifications are required. +/* Fold X + (X / CST) * -CST to X % CST.

[patch] header file re-ordering.

2015-10-08 Thread Andrew MacLeod
G DETECTED==+ | 6.0.0 20151008 (experimental) (x86_64-pc-linux-gnu) GCC error: | | in gen_lowpart_common, at emit-rtl.c:1399| | Error detected around s-regpat.adb:1029:22 | <...> raised TYPES.UNR

[PATCH] Random shuffle moveable: container size

2015-10-08 Thread Aurelio Remonda
This patch reduces the size of the array A (the array that contains the values being shuffled) so the test can pass while running the stdlibc++ testsuite. It also make some minor changes such as: *Deleting a useless call to fill_ascending function on test02. *Changing N from const int to const unsi

Re: using scratchpads to enhance RTL-level if-conversion: revised patch

2015-10-08 Thread Bernd Schmidt
+ /* We must copy the insns between the start of the THEN block + and the set of 'a', if they exist, since they may be needed + for the converted code as well, but we must not copy a + start-of-BB note if one is present, nor debug "insn"s. */ + + for (rtx_insn* insn = BB_HEAD (then_bb); ins

Re: [PATCH ARM]: PR67745: Fix function alignment after __attribute__ 2/2

2015-10-08 Thread Bernd Schmidt
On 10/08/2015 03:14 PM, Christian Bruel wrote: Probably at the time of start_decl, because DECL_ALIGN will have the boundary given by the global target_flags at that time. But this shouldn't be a problem since what matters is the DECL_ALIGN recomputed with the definition when there is something

Re: using scratchpads to enhance RTL-level if-conversion: revised patch

2015-10-08 Thread Sebastian Pop
Abe, please avoid comments that are not needed. + /* We must copy the insns between the start of the THEN block + and the set of 'a', if they exist, since they may be needed + for the converted code as well, but we must not copy a + start-of-BB note if one is present, nor debug "insn"s. */

[PATCH][AArch64] Update patterns to support FP zero

2015-10-08 Thread Wilco Dijkstra
This patch improves support for instructions that allow FP zero immediate. All FP compares generated by various patterns should use aarch64_fp_compare_operand. LDP/STP uses aarch64_reg_or_fp_zero. Passes regression on AArch64. OK for commit? ChangeLog: 2015-10-08 Wilco Dijkstra * gc

Re: using scratchpads to enhance RTL-level if-conversion: revised patch

2015-10-08 Thread Sebastian Pop
Hi Abe, could you please avoid double negations, and please use early returns rather than huge right indentations: + if (! not_a_scratchpad_candidate) + { +if (MEM_SIZE_KNOWN_P (orig_x)) +{ + const size_t size_of_MEM = MEM_SIZE (orig_x); + + if (size_of_MEM <= SCRATCHPAD_MAX_S

Re: [gomp4.1] Doacross library implementation

2015-10-08 Thread Torvald Riegel
On Thu, 2015-09-24 at 20:32 +0200, Jakub Jelinek wrote: > Torvald, can you please have a look at it, if I got all the atomics / memory > models right? More detailed comments below, but in general, I'd really suggest to add more code comments for the synchronization parts. In the end, the level of

Re: [PATCH] Unswitching outer loops.

2015-10-08 Thread Richard Biener
On Wed, Oct 7, 2015 at 5:26 PM, Yuri Rumyantsev wrote: > Richard, > > I noticed that 'gimple' type was changed and send you updated patch. Ok. Thanks, Richard. > Thanks. > Yuri. > > 2015-10-07 12:53 GMT+03:00 Yuri Rumyantsev : >> Richard, >> >> I've fixed adding virtual phi argument and add che

Re: [PATCH V3][GCC] Algorithmic optimization in match and simplify

2015-10-08 Thread Richard Biener
On Wed, Oct 7, 2015 at 10:21 AM, Andre Vieira wrote: > On 25/09/15 12:42, Richard Biener wrote: >> >> On Fri, Sep 25, 2015 at 1:30 PM, Andre Vieira >> wrote: >>> >>> On 17/09/15 10:46, Richard Biener wrote: On Thu, Sep 3, 2015 at 1:11 PM, Andre Vieira wrote: > > >

PING: [PATCH] PR target/35514: Gcc shoud generate symbol type for undefined symbol

2015-10-08 Thread H.J. Lu
On Wed, Jul 8, 2015 at 1:35 PM, H.J. Lu wrote: > On Sun, Jul 5, 2015 at 2:54 PM, H.J. Lu wrote: >> On Sun, Jul 5, 2015 at 11:14 AM, H.J. Lu wrote: >>> Update default_elf_asm_output_external to also output symbol type to >>> help ELF linker to properly issue diagnostic message. We don't output >

Re: [ARM] Use vector wide add for mixed-mode adds

2015-10-08 Thread Kyrill Tkachov
Hi Michael, On 01/10/15 11:05, Michael Collison wrote: Kyrill, I have modified the patch to address your comments. I also modified check_effective_target_vect_widen_sum_hi_to_si_pattern in target-supports.exp to indicate that arm neon supports vector widen sum of HImode to SImode. This resolved

Re: [ARM] Add ARMv8.1 command line options.

2015-10-08 Thread Matthew Wahab
Ping. Updated patch attached, I've broken the over-long lines added to arm-arches.def and arm-fpus.def. Matthew On 17/09/15 18:54, Matthew Wahab wrote: Hello, ARMv8.1 is a set of architectural extensions to ARMv8. Support has been enabled in binutils for ARMv8.1 for the architechure, using

Re: Do not use TYPE_CANONICAL in useless_type_conversion

2015-10-08 Thread Eric Botcazou
ux/lib/ -isystem /home/eric/install/gcc/x86_64-suse-linux/include -isystem /home/eric/install/gcc/x86_64-suse-linux/sys-include-c -g -O2 -fpic -W - Wall -gnatpg -nostdinc s-regpat.adb -o s-regpat.o +===GNAT BUG DETECTED==+ | 6.0.0 20

  1   2   >