Re: [RFC, tentative patch] Adjust cost for conversion expression

2016-11-28 Thread Richard Biener
On Mon, 28 Nov 2016, Pitchumani Sivanupandi wrote: > On Thursday 24 November 2016 04:54 PM, Richard Biener wrote: > > On Thu, 24 Nov 2016, Pitchumani Sivanupandi wrote: > > > > > GCC inlines small functions if the code size after expansion is not > > > excedded. > > > For test case (inline.c,

Re: change initialization of ptrdiff_type_node

2016-11-28 Thread Richard Biener
On Sat, 26 Nov 2016, Prathamesh Kulkarni wrote: > On 25 November 2016 at 14:48, Richard Biener wrote: > > On Fri, 25 Nov 2016, Prathamesh Kulkarni wrote: > > > >> On 25 November 2016 at 13:43, Richard Biener wrote: > >> > On Fri, 25 Nov 2016, Jakub Jelinek

[PATCH] Fix PR78546

2016-11-28 Thread Richard Biener
The following fixes an optimization regression noted in PR78546 where moving patterns from forwprop to match.pd missed one variant. Bootstrap & regtest running on x86_64-unknown-linux-gnu. Richard. 2016-11-28 Richard Biener PR middle-end/78546 * match.pd:

Re: [PATCH] Fix -fcompare-debug issues in IPA-ICF (PR lto/78211)

2016-11-28 Thread Jan Hubicka
> On Mon, Nov 28, 2016 at 11:52:53AM +0100, Jan Hubicka wrote: > > > > IPA-ICF performs some code-generation visible changes from hash table > > > > traversal, where the hash values can be different between -g and -g0 > > > > (I bet it hashes DECL_UID in somewhere, perhaps other things). > > > >

[PATCH] Fix OpenMP offloading to NVPTX and correct location of

2016-11-28 Thread Hahnfeld, Jonas
Hi, find attached a patch that fixes OpenMP offloading to NVPTX for me. Without the changes, I got errors from the linker for affinity symbols. Kind regards, Jonas -- Jonas Hahnfeld, MATSE-Auszubildender IT Center Group: High Performance Computing Division: Computational Science and

Re: [PATCH] Fix OpenMP offloading to NVPTX and correct location of

2016-11-28 Thread Alexander Monakov
On Mon, 28 Nov 2016, Hahnfeld, Jonas wrote: > Hi, > > find attached a patch that fixes OpenMP offloading to NVPTX for me. Without > the changes, I got errors from the linker for affinity symbols. > 2016-11-28 Jonas Hahnfeld > > * config/linux/affinity.c:

Re: [RFC, tentative patch] Adjust cost for conversion expression

2016-11-28 Thread Pitchumani Sivanupandi
On Thursday 24 November 2016 04:54 PM, Richard Biener wrote: On Thu, 24 Nov 2016, Pitchumani Sivanupandi wrote: GCC inlines small functions if the code size after expansion is not excedded. For test case (inline.c, avr-gcc -Os -S inline.c) code size become higher if 'func2' is inlined. It

Re: [PATCH] improve folding of expressions that move a single bit around

2016-11-28 Thread Paolo Bonzini
On 27/11/2016 00:28, Marc Glisse wrote: > On Sat, 26 Nov 2016, Paolo Bonzini wrote: > >> --- match.pd(revision 242742) >> +++ match.pd(working copy) >> @@ -2554,6 +2554,19 @@ >> (cmp (bit_and@2 @0 integer_pow2p@1) @1) >> (icmp @2 { build_zero_cst (TREE_TYPE (@0)); }))) >> >> +/* If

Re: [PATCH 7/9] Add RTL-error-handling to host

2016-11-28 Thread Bernd Schmidt
Been looking at this off and on, and I'm still not sure I entirely get it - sorry. On 11/11/2016 10:15 PM, David Malcolm wrote: Implementing an RTL frontend by using the RTL reader from read -rtl.c means that we now need a diagnostics subsystem on the *host* for handling errors in RTL files,

RE: [PATCH] Fix OpenMP offloading to NVPTX and correct location of

2016-11-28 Thread Alexander Monakov
> > Thanks. This is in the #else branch of '#ifdef HAVE_PTHREAD_AFFINITY_NP' > > (so the ChangeLog entry should have [!HAVE_PTHREAD_AFFINITY_NP]) -- > > I'm curious why you don't have this defined. One reason I can think of is, > > if you're building libgomp against musl libc (I was mistaken

[PATCH] Fix PR78542

2016-11-28 Thread Richard Biener
The following fixes another issue with marrying the SSA propagator and match-and-simplify during propagation (which is tricky at best). Bootstrap and regtest running on x86_64-unknown-linux-gnu, I've applied the VRP patch below as well to see if the theory works out (VRP misses to handle

Re: [AArch64][GCC][PATCH] Add more Poly64_t intrinsics to GCC

2016-11-28 Thread James Greenhalgh
On Fri, Nov 25, 2016 at 10:46:49AM +, Tamar Christina wrote: > Hi all, > > This adds the following NEON intrinsics > to the Aarch64 back-end of GCC: > > * vsriq_n_p64 > * vsri_n_p64 > * vextq_p64 > * vext_p64 > * vceq_p64 > * vbslq_p64 > * vbsl_p64 > > Added new tests for these and ran

RE: [PATCH] Fix OpenMP offloading to NVPTX and correct location of

2016-11-28 Thread Hahnfeld, Jonas
> -Original Message- > From: Alexander Monakov [mailto:amona...@ispras.ru] > Sent: Monday, November 28, 2016 1:51 PM > To: Hahnfeld, Jonas > Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek (ja...@redhat.com) > Subject: Re: [PATCH] Fix OpenMP offloading to NVPTX and correct location of > > On

Re: [PATCH] Fix OpenMP offloading to NVPTX and correct location of

2016-11-28 Thread Jakub Jelinek
On Mon, Nov 28, 2016 at 03:50:54PM +0300, Alexander Monakov wrote: > > * config/nvptx/affinity.c: Delete to use fallback implementation. > > Right. This file was (correctly) deleted on the branch, but I missed the > deletion when writing the Changelog and then subsequently missed it again >

Re: [PATCH] Tree-level fix for PR 69526

2016-11-28 Thread Robin Dapp
>> + /* Sign-extend @1 to TYPE. */ >> + w1 = w1.from (w1, TYPE_PRECISION (type), SIGNED); >> >> not sure why you do always sign-extend. If the inner op is unsigned >> and we widen then that's certainly bogus considering your UINT_MAX >> example above. Does >> >>

[Patch, Fortran, OOP] PR 58175: Incorrect warning message on scalar finalizer

2016-11-28 Thread Janus Weil
Hi all, the attached patch was posted on bugzilla by Tobias three years ago, but left unattended since then. It is simple, works well (fixing a bogus warning) and regtests cleanly on x86_64-linux-gnu. If no one objects, I will commit this to trunk by tomorrow. Cheers, Janus 2016-11-28

[PATCH, rs6000] Fix PR78556 - left shift of negative values

2016-11-28 Thread Markus Trippelsdorf
Running bootstrap-ubsan on ppc64le shows many instances of e.g.: config/rs6000/rs6000.c:6217:36: runtime error: left shift of negative value -12301 The attached patch fixes the issue and was tested on ppc64le. OK for trunk? Thanks. PR target/78556 * config/rs6000/rs6000.h

Re: [C++ PATCH] Fix ICE with scoped enums and -g (PR c++/72808)

2016-11-28 Thread Jason Merrill
On Fri, Nov 25, 2016 at 12:31 PM, Jakub Jelinek wrote: > * decl.c (build_enumerator): Call fixup_type_variants on > current_class_type after finish_member_declaration. Let's do this in finish_enum_value_list, in the block controlled by if (at_class_scope_p ()

Re: [RFC] Assert DECL_ABSTRACT_ORIGIN is different from the decl itself

2016-11-28 Thread Jeff Law
On 11/28/2016 07:27 AM, Martin Jambor wrote: Hi, one of a number of symptoms of an otherwise unrelated HSA bug I've been debugging today is gcc crashing or hanging in the C++ pretty printer when attempting to emit a warning because dump_decl() ended up in an infinite recursion calling itself on

Re: [C++ PATCH] Fix -Wreturn-local-addr regression (PR c++/77591)

2016-11-28 Thread Jason Merrill
OK. On Thu, Nov 24, 2016 at 4:47 PM, Jakub Jelinek wrote: > Hi! > > Delayed folding caused following regression where we no longer warn about > returning reference to local variable. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for > trunk? > >

Re: [C++ PATCH] Fix ICE with scoped enums and -g (PR c++/72808)

2016-11-28 Thread Jakub Jelinek
On Mon, Nov 28, 2016 at 09:44:30AM -0500, Jason Merrill wrote: > On Fri, Nov 25, 2016 at 12:31 PM, Jakub Jelinek wrote: > > * decl.c (build_enumerator): Call fixup_type_variants on > > current_class_type after finish_member_declaration. > > Let's do this in

[RFC] Assert DECL_ABSTRACT_ORIGIN is different from the decl itself

2016-11-28 Thread Martin Jambor
Hi, one of a number of symptoms of an otherwise unrelated HSA bug I've been debugging today is gcc crashing or hanging in the C++ pretty printer when attempting to emit a warning because dump_decl() ended up in an infinite recursion calling itself on the DECL_ABSTRACT_ORIGIN of the decl it was

Re: [PATCH, vec-tails] Support loop epilogue vectorization

2016-11-28 Thread Richard Biener
On Thu, 24 Nov 2016, Yuri Rumyantsev wrote: > Hi All, > > Here is the second patch which supports epilogue vectorization using > masking without cost model. Currently it is possible > only with passing parameter "--param vect-epilogues-mask=1". > > Bootstrapping and regression testing did not

RE: [PATCH] MIPS MSA: Fix ICE when using out-of-range values to intrinsics

2016-11-28 Thread Matthew Fortune
Robert Suchanek writes: > The patch primarily fixes an ICE with out-of-range values to the > __builtin_msa_insve* intrinsics. > > The compiler segfaults in mips_legitimize_const_move () as it tries to > split symbol that has NULL_RTX value and gets here because the

Re: [PATCH] Fix PR78546

2016-11-28 Thread Bernd Edlinger
Hi Richard, I am just wondering if this might be a mistake, because this looks somehow odd: > + /* CST - (CST - A) -> CST - A */ > + (simplify > + (minus CONSTANT_CLASS_P@1 (minus CONSTANT_CLASS_P@2 @0)) > + (with { tree cst = const_binop (MINUS_EXPR, type, @1, @2); } > +(if

Re: [PATCH] eliminate calls to snprintf(0, 0, ...) with known return value (pr78476)

2016-11-28 Thread Martin Sebor
OK. I was initially a little surprised you didn't just delete the call from the IL and emit the trivial constant assignment. Then I realized you probably would need to update the vuse/vdefs that were on the original call. Using update_call_from_tree seems to take care of that for you. I

Re: [PATCH, ARM/testsuite 6/7, ping4] Force soft float in ARMv6-M and ARMv8-M Baseline options

2016-11-28 Thread Thomas Preudhomme
Hi Richard, Ping? Best regards, Thomas On 17/11/16 20:42, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 08/11/16 13:35, Thomas Preudhomme wrote: Ping, Best regards, Thomas On 02/11/16 10:04, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 28/10/16 10:49, Thomas

Re: [PATCH, vec-tails] Support loop epilogue vectorization

2016-11-28 Thread Yuri Rumyantsev
Richard! I attached vect dump for hte part of attached test-case which illustrated how vectorization of epilogues works through masking: #define SIZE 1023 #define ALIGN 64 extern int posix_memalign(void **memptr, __SIZE_TYPE__ alignment, __SIZE_TYPE__ size) __attribute__((weak)); extern void

[PATCH, i386]: Separate operations with mask registers from operations with general registers

2016-11-28 Thread Uros Bizjak
On Fri, Nov 25, 2016 at 10:51 AM, Uros Bizjak wrote: > Attached patch tries to fix the mess with operations where register > allocator is free to use either mask or general registers. There are > plenty of problems with this approach: > a) missing operations wth general

Re: [PING][PATCH][2/2] Early LTO debug -- main part

2016-11-28 Thread Jason Merrill
On Thu, Nov 24, 2016 at 8:50 AM, Richard Biener wrote: >> > + /* ??? We can't annotate types late, but for LTO we may not >> > +generate a location early either (gfortran.dg/save_5.f90). >> > +The proper way is to handle it like VLAs though it is told >> > +

Re: [C++ PATCH] Fix ICE with scoped enums and -g (PR c++/72808)

2016-11-28 Thread Jason Merrill
OK. On Mon, Nov 28, 2016 at 10:38 AM, Jakub Jelinek wrote: > On Mon, Nov 28, 2016 at 09:44:30AM -0500, Jason Merrill wrote: >> On Fri, Nov 25, 2016 at 12:31 PM, Jakub Jelinek wrote: >> > * decl.c (build_enumerator): Call fixup_type_variants on >> >

Re: [RFC] Assert DECL_ABSTRACT_ORIGIN is different from the decl itself

2016-11-28 Thread Martin Jambor
Hi Jeff, On Mon, Nov 28, 2016 at 08:46:05AM -0700, Jeff Law wrote: > On 11/28/2016 07:27 AM, Martin Jambor wrote: > > Hi, > > > > one of a number of symptoms of an otherwise unrelated HSA bug I've > > been debugging today is gcc crashing or hanging in the C++ pretty > > printer when attempting

[PATCH] Fix neg_const_int (PR rtl-optimization/78546)

2016-11-28 Thread Jakub Jelinek
Hi! For TImode and wider, neg_const_int returns wrong value for (const_int 0x8000) - the argument unmodified. The function comment above the function kind of suggests that it truncates, but I fail to see which caller might benefit from such behavior, it would mean having to guard

[committed] Fix ICE with nested fns and OpenMP (PR fortran/78298)

2016-11-28 Thread Jakub Jelinek
Hi! If we add shared (FRAME.NN) clause to some parallel/task OpenMP construct or map (tofrom: FRAME.NN) clause to some target construct, we need to add one of those to all outer parallel/task/target constructs too. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to

Re: [0/3] Fix PR78120, in ifcvt/rtlanal/i386.

2016-11-28 Thread Bernd Schmidt
On 11/28/2016 07:50 PM, Jeff Law wrote: So how would you suggest this be fixed right now? I'd really like to get the regression addressed. The regression is still fixed. That wasn't the case at all stages while I was working on it, but the i386 patch seems to suffice now. I would claim

Re: [PATCH, rs6000] Fix PR78556 - left shift of negative values

2016-11-28 Thread Segher Boessenkool
Hi Markus, On Mon, Nov 28, 2016 at 02:58:19PM +0100, Markus Trippelsdorf wrote: > Running bootstrap-ubsan on ppc64le shows many instances of e.g.: > config/rs6000/rs6000.c:6217:36: runtime error: left shift of negative value > -12301 > > The attached patch fixes the issue and was tested on

Re: [PATCH, ARM] Further improve stack usage on sha512 (PR 77308)

2016-11-28 Thread Bernd Edlinger
On 11/25/16 12:30, Ramana Radhakrishnan wrote: > On Sun, Nov 6, 2016 at 2:18 PM, Bernd Edlinger > wrote: >> Hi! >> >> This improves the stack usage on the sha512 test case for the case >> without hardware fpu and without iwmmxt by splitting all di-mode >> patterns right

Re: [PATCH] simplify-rtx: Handle truncate of extract

2016-11-28 Thread Jeff Law
On 11/26/2016 04:19 PM, Segher Boessenkool wrote: simplify_truncation changes the truncation of many operations into the operation on the truncation. This patch makes this code also handle extracts. Tested on powerpc64-linux. With this patch the rlwimi testcases work. Is this okay for trunk?

Pretty printers for versioned namespace

2016-11-28 Thread François Dumont
Hi Here is a patch to fix pretty printers when versioned namespace is activated. You will see that I have hesitated in making the fix independant of the version being used. In source files you will find (__7::)? patterns while in xmethods.py I chose (__\d+::)? making it ready for

[RFA] Handle target with no length attributes sanely in bb-reorder.c

2016-11-28 Thread Jeff Law
I was digging into issues around the patches for 78120 when I stumbled upon undesirable bb copying in bb-reorder.c on the m68k. The core issue is that the m68k does not define a length attribute and therefore generic code assumes that the length of all insns is 0 bytes. That in turn

Re: [PATCH] libgcc/config/bfin: use the generic linker version information (PR74748)

2016-11-28 Thread Jeff Law
On 11/06/2016 09:39 AM, Waldemar Brodkorb wrote: Hi, This commit makes the Blackfin platform use the generic linker version information, rather than a completely duplicated file, specific for the Blackfin architecture. This is made possible using the newly introduced skip_underscore variable

Re: [PATCH v2] libgcc/mkmap-symver: support skip_underscore (PR74748)

2016-11-28 Thread Jeff Law
On 11/26/2016 02:42 AM, Waldemar Brodkorb wrote: Hi, Some platforms, such as Blackfin, have a special prefix for assembly symbols as opposed to C symbols. For this reason, a function named "foo()" in C will in fact be visible as a symbol called "_foo" in the ELF binary. The current linker

Re: [PATCH] correct handling of non-constant width and precision (pr 78521)

2016-11-28 Thread Jeff Law
On 11/27/2016 08:34 PM, Martin Sebor wrote: PR 78521 notes that the gimple-ssa-sprintf pass doesn't do the right thing (i.e., the -Wformat-length and -fprintf-return-value options behave incorrectly) when a conversion specification includes a width or precision with a non-constant value. The

Re: [PATCH] Fix neg_const_int (PR rtl-optimization/78546)

2016-11-28 Thread Jeff Law
On 11/28/2016 10:30 AM, Jakub Jelinek wrote: Hi! For TImode and wider, neg_const_int returns wrong value for (const_int 0x8000) - the argument unmodified. The function comment above the function kind of suggests that it truncates, but I fail to see which caller might benefit from

Re: [PATCH, rs6000] Fix PR78556 - left shift of negative values

2016-11-28 Thread Segher Boessenkool
On Mon, Nov 28, 2016 at 07:12:40PM +0100, Markus Trippelsdorf wrote: > > Can't you just make small_val an unsigned WIDE_INT, instead? > > No, it doesn't work. First of all you'll get -Wsign-compare warnings. > And gcc.target/powerpc/altivec-11.c also starts failing. Yuck. Let's go with your

Re: [PATCH] improve folding of expressions that move a single bit around

2016-11-28 Thread Jeff Law
On 11/28/2016 06:10 AM, Paolo Bonzini wrote: On 27/11/2016 00:28, Marc Glisse wrote: On Sat, 26 Nov 2016, Paolo Bonzini wrote: --- match.pd(revision 242742) +++ match.pd(working copy) @@ -2554,6 +2554,19 @@ (cmp (bit_and@2 @0 integer_pow2p@1) @1) (icmp @2 { build_zero_cst

[PATCH] Postreload DF fix (PR middle-end/78540)

2016-11-28 Thread Jakub Jelinek
Hi! On the following case we ICE in DF checking, because reload_combine_recognize_pattern starts with apply_change_group that in the end on success calls df_insn_rescan, but if it is successful, we then remove_reg_equal_equiv_notes and nothing rescans the notes. Fixed by rescanning just the

Re: [PATCH, ARM/testsuite 6/7, ping4] Force soft float in ARMv6-M and ARMv8-M Baseline options

2016-11-28 Thread Mike Stump
On Nov 28, 2016, at 8:52 AM, Thomas Preudhomme wrote: > > Ping? Ok. > On 17/11/16 20:42, Thomas Preudhomme wrote: >> Ping? >> >> Best regards, >> >> Thomas >> >> On 08/11/16 13:35, Thomas Preudhomme wrote: >>> Ping, >>> >>> Best regards, >>> >>> Thomas >>>

Re: [PATCH, rs6000] Fix PR78556 - left shift of negative values

2016-11-28 Thread Markus Trippelsdorf
On 2016.11.28 at 12:02 -0600, Segher Boessenkool wrote: > Hi Markus, > > On Mon, Nov 28, 2016 at 02:58:19PM +0100, Markus Trippelsdorf wrote: > > Running bootstrap-ubsan on ppc64le shows many instances of e.g.: > > config/rs6000/rs6000.c:6217:36: runtime error: left shift of negative > > value

Re: PING! [PATCH, Fortran, accaf, v1] Add caf-API-calls to asynchronously handle allocatable components in derived type coarrays.

2016-11-28 Thread Andre Vehreschild
PING! I know it's a lengthy patch, but comments would be nice anyway. - Andre On Tue, 22 Nov 2016 20:46:50 +0100 Andre Vehreschild wrote: > Hi all, > > attached patch addresses the need of extending the API of the caf-libs to > enable allocatable components asynchronous

Re: [0/3] Fix PR78120, in ifcvt/rtlanal/i386.

2016-11-28 Thread Jeff Law
On 11/24/2016 09:14 AM, Segher Boessenkool wrote: On Thu, Nov 24, 2016 at 08:48:04AM -0700, Jeff Law wrote: On 11/24/2016 07:53 AM, Segher Boessenkool wrote: That we compare different kinds of costs (which really has no meaning at all, it's a heuristic at best) in various places is a known

Re: [PATCH] simplify-rtx: Handle truncate of extract

2016-11-28 Thread Jeff Law
On 11/28/2016 02:55 PM, Segher Boessenkool wrote: On Mon, Nov 28, 2016 at 01:56:10PM -0700, Jeff Law wrote: On 11/26/2016 04:19 PM, Segher Boessenkool wrote: simplify_truncation changes the truncation of many operations into the operation on the truncation. This patch makes this code also

Re: [PATCH, rfc] combine: Make code after a new trap unreachable (PR78432)

2016-11-28 Thread David Malcolm
On Mon, 2016-11-28 at 14:44 -0700, Jeff Law wrote: > On 11/23/2016 04:55 PM, Segher Boessenkool wrote: > > Combine can turn a conditional trap into an unconditional trap. If > > it > > does that it should make the code after it unreachable (an > > unconditional > > trap should be the last insn in

Re: [PATCH 1/2 v3] PR77822

2016-11-28 Thread Jeff Law
On 11/25/2016 01:29 AM, Dominik Vogt wrote: On Thu, Nov 24, 2016 at 08:33:32AM -0700, Jeff Law wrote: On 11/24/2016 02:59 AM, Dominik Vogt wrote: On Wed, Nov 23, 2016 at 01:22:31PM -0700, Jeff Law wrote: PR target/77822 * system.h (SIZE_POS_IN_RANGE): New. OK. Though

Re: [PATCH] Postreload DF fix (PR middle-end/78540)

2016-11-28 Thread Jeff Law
On 11/28/2016 12:35 PM, Jakub Jelinek wrote: Hi! On the following case we ICE in DF checking, because reload_combine_recognize_pattern starts with apply_change_group that in the end on success calls df_insn_rescan, but if it is successful, we then remove_reg_equal_equiv_notes and nothing

Re: [PATCH v4] gcc/config/tilegx/tilegx.c (tilegx_function_profiler): Save r10 to stack before call mcount

2016-11-28 Thread Jeff Law
On 11/05/2016 02:46 PM, cheng...@emindsoft.com.cn wrote: From: Chen Gang r10 may also be as parameter stack pointer for the nested function, so need save it before call mcount. Also clean up code: use '!' instead of "== 0" for checking static_chain_decl and

Re: [libstdc++, testsuite] Add dg-require-thread-fence

2016-11-28 Thread Christophe Lyon
Ping? On 16 November 2016 at 22:18, Christophe Lyon wrote: > On 15 November 2016 at 12:50, Jonathan Wakely wrote: >> On 14/11/16 14:32 +0100, Christophe Lyon wrote: >>> >>> On 20 October 2016 at 19:40, Jonathan Wakely wrote:

Re: [PATCH] simplify-rtx: Handle truncate of extract

2016-11-28 Thread Segher Boessenkool
On Mon, Nov 28, 2016 at 01:56:10PM -0700, Jeff Law wrote: > On 11/26/2016 04:19 PM, Segher Boessenkool wrote: > >simplify_truncation changes the truncation of many operations into > >the operation on the truncation. This patch makes this code also > >handle extracts. > > > >Tested on

Re: [Patch] Don't expand targetm.stack_protect_fail if it's NULL_TREE

2016-11-28 Thread Jeff Law
On 11/24/2016 07:11 AM, Jiong Wang wrote: gcc/ 2016-11-11 Jiong Wang * function.c (expand_function_end): Guard stack_protect_epilogue with ENABLE_DEFAULT_SSP_RUNTIME. * cfgexpand.c (pass_expand::execute): Likewise guard for

Re: [PATCH] have __builtin_object_size handle POINTER_PLUS with non-const offset (pr 77608)

2016-11-28 Thread Jeff Law
On 11/24/2016 05:11 AM, Richard Biener wrote: where CST is unsigned implying that the lower bound of the offset is the greater of CST and MIN. For instance, in the following it determines that bos(p, 0) is 4 (and if the 3 were greater than 7 and overflowed the addition the result would be

Re: [PATCH, rfc] combine: Make code after a new trap unreachable (PR78432)

2016-11-28 Thread Segher Boessenkool
On Mon, Nov 28, 2016 at 05:09:50PM -0500, David Malcolm wrote: > Segher: it looks like the "PR78432" in the Subject line is a typo; that > bug number appears to relate to go-dump.c and is marked as RESOLVED > FIXED. It's PR78342, oops. Thanks, Segher

Re: [RFC, tentative patch] Adjust cost for conversion expression

2016-11-28 Thread Jeff Law
On 11/24/2016 03:58 AM, Pitchumani Sivanupandi wrote: GCC inlines small functions if the code size after expansion is not excedded. For test case (inline.c, avr-gcc -Os -S inline.c) code size become higher if 'func2' is inlined. It happens because the CONVERT_EXPR/ NOP_EXPR are considered as

Re: [Darwin, configury] No longer expect to find cross-target headers on the host.

2016-11-28 Thread Jeff Law
On 11/06/2016 10:17 AM, Iain Sandoe wrote: Hi Folks, This might make some configuration modes easier on modern Darwin (although hitting the problem used to be an unusual circumstance, it will likely become more common if we need to use build-sysroots - e.g. targeting a minimum OS X version

Re: [PATCH] Fix ICE with -Wuninitialized (PR tree-optimization/78455)

2016-11-28 Thread Aldy Hernandez
On 11/28/2016 04:51 PM, Jeff Law wrote: On 11/25/2016 07:02 AM, Andreas Schwab wrote: On Nov 23 2016, Christophe Lyon wrote: Since you committed this patch (r242733), I've noticed a regression: gcc.dg/uninit-pred-6_c.c warning (test for warnings, line 43) now

Re: [Patch, testsuite] Fix bogus uninit-19.c failure for avr

2016-11-28 Thread Jeff Law
On 11/24/2016 12:24 AM, Senthil Kumar Selvaraj wrote: Jeff Law writes: On 11/23/2016 02:54 AM, Senthil Kumar Selvaraj wrote: Hi, The below patch fixes uninit-19.c for avr by adding -finline-small-functions for avr. The test fails for avr because fn1 does not get inlined into fn2.

Re: [PATCH] Fix ICE with -Wuninitialized (PR tree-optimization/78455)

2016-11-28 Thread Jeff Law
On 11/25/2016 07:02 AM, Andreas Schwab wrote: On Nov 23 2016, Christophe Lyon wrote: Since you committed this patch (r242733), I've noticed a regression: gcc.dg/uninit-pred-6_c.c warning (test for warnings, line 43) now fails on some arm targets, for instance

Re: [Patch, tentative] Use MOVE_MAX_PIECES instead of MOVE_MAX in gimple_fold_builtin_memory_op

2016-11-28 Thread Jeff Law
On 11/25/2016 01:04 AM, Richard Biener wrote: On Thu, 24 Nov 2016, Senthil Kumar Selvaraj wrote: Richard Biener writes: On Thu, 24 Nov 2016, Richard Biener wrote: On Thu, 24 Nov 2016, Senthil Kumar Selvaraj wrote: Hi, I've been analyzing a failing regtest (gcc.dg/strlenopt-8.c) for

Re: Ping: Re: [PATCH 1/2] gcc: Remove unneeded global flag.

2016-11-28 Thread Jeff Law
On 11/24/2016 02:40 PM, Andrew Burgess wrote: * Christophe Lyon [2016-11-21 13:47:09 +0100]: On 20 November 2016 at 18:27, Mike Stump wrote: On Nov 19, 2016, at 1:59 PM, Andrew Burgess wrote: So, your new test

Re: [PATCH] simplify-rtx: Handle truncate of extract

2016-11-28 Thread Segher Boessenkool
On Mon, Nov 28, 2016 at 03:00:16PM -0700, Jeff Law wrote: > On 11/28/2016 02:55 PM, Segher Boessenkool wrote: > >On Mon, Nov 28, 2016 at 01:56:10PM -0700, Jeff Law wrote: > >>On 11/26/2016 04:19 PM, Segher Boessenkool wrote: > >>>simplify_truncation changes the truncation of many operations into >

Re: [PATCH] shrink-wrap: New spread_components

2016-11-28 Thread Jeff Law
On 11/09/2016 02:46 PM, Segher Boessenkool wrote: This patch changes spread_components to use a simpler algorithm that puts prologue components as early as possible, and epilogue components as late as possible. This allows better scheduling, and also saves a bit of code size. The blocks that

Re: [PATCH, rfc] combine: Make code after a new trap unreachable (PR78432)

2016-11-28 Thread Jeff Law
On 11/23/2016 04:55 PM, Segher Boessenkool wrote: Combine can turn a conditional trap into an unconditional trap. If it does that it should make the code after it unreachable (an unconditional trap should be the last insn in its bb, and that bb has no successors). This patch seems to work. It

Re: [PATCH, rfc] combine: Make code after a new trap unreachable (PR78432)

2016-11-28 Thread Jeff Law
On 11/28/2016 03:00 PM, David Malcolm wrote: On Mon, 2016-11-28 at 14:44 -0700, Jeff Law wrote: On 11/23/2016 04:55 PM, Segher Boessenkool wrote: Combine can turn a conditional trap into an unconditional trap. If it does that it should make the code after it unreachable (an unconditional trap

[PATCH, i386]: Macroize and cleanup some AND patterns

2016-11-28 Thread Uros Bizjak
No functional changes. 2016-11-28 Uros Bizjak * config/i386/i386.md (*and_1): Merge insn pattern from *andsi_1 and *andhi_1 using SWI24 mode iterator. Use multi-line output template string. (*anddi_1): Use multi-line output template string. (*andqi_1):

Re: [PATCH] simplify-rtx: Transform (xor (and (xor A B) C) B) with C const

2016-11-28 Thread Jeff Law
On 11/10/2016 03:43 AM, Richard Biener wrote: On Thu, Nov 10, 2016 at 12:05 AM, Segher Boessenkool wrote: On Wed, Nov 09, 2016 at 11:29:45PM +0100, Marc Glisse wrote: This patch makes RTL simplify transform (xor (and (xor A B) C) B) back to (ior (and A C) (and B

Re: [PATCH, rfc] combine: Make code after a new trap unreachable (PR78432)

2016-11-28 Thread David Malcolm
On Mon, 2016-11-28 at 15:02 -0700, Jeff Law wrote: > On 11/28/2016 03:00 PM, David Malcolm wrote: > > On Mon, 2016-11-28 at 14:44 -0700, Jeff Law wrote: > > > On 11/23/2016 04:55 PM, Segher Boessenkool wrote: > > > > Combine can turn a conditional trap into an unconditional trap. > > > > If > >

Re: [PATCH] spellcheck bugfixes: don't offer the goal string as a suggestion

2016-11-28 Thread Jeff Law
On 11/15/2016 02:52 PM, David Malcolm wrote: This patch addresses various bugs in the spellcheck code in which the goal string somehow makes it into the candidate list. The goal string will always have an edit distance of 0 to itself, and thus is the "closest" string to the goal, but offering it

Re: [PATCH] Fix PR78306

2016-11-28 Thread Jeff Law
On 11/15/2016 07:58 AM, Richard Biener wrote: Appearantly for some unknown reason we refuse to inline anything into functions calling cilk_spawn. That breaks fortified headers and all other always-inline function calls (intrinsics come to my mind as well). Bootstrapped and tested on

Re: [PATCH] correct handling of non-constant width and precision (pr 78521)

2016-11-28 Thread Joseph Myers
On Sun, 27 Nov 2016, Martin Sebor wrote: > Finally, the patch also tightens up the constraint on the upper bound > of bounded functions like snprintf to be INT_MAX. The functions cannot > produce output in excess of INT_MAX + 1 bytes and some implementations > (e.g., Solaris) fail with EINVAL

Re: [PATCH] simplify-rtx: Handle truncate of extract

2016-11-28 Thread Segher Boessenkool
On Mon, Nov 28, 2016 at 01:56:10PM -0700, Jeff Law wrote: > On 11/26/2016 04:19 PM, Segher Boessenkool wrote: > >simplify_truncation changes the truncation of many operations into > >the operation on the truncation. This patch makes this code also > >handle extracts. > I'm OK with this for the

Re: [PATCH] correct handling of non-constant width and precision (pr 78521)

2016-11-28 Thread David Edelsohn
Martin, I am seeing a number of new failures with the testcases on AIX. FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-1.c (test for excess errors) Excess errors: /nasfarm/edelsohn/src/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-1.c:1485:3: warning: specified destination size 2147483647

Re: [PATCH, rfc] combine: Make code after a new trap unreachable (PR78432)

2016-11-28 Thread Segher Boessenkool
On Mon, Nov 28, 2016 at 02:44:44PM -0700, Jeff Law wrote: > On 11/23/2016 04:55 PM, Segher Boessenkool wrote: > >Combine can turn a conditional trap into an unconditional trap. If it > >does that it should make the code after it unreachable (an unconditional > >trap should be the last insn in its

[PATCH] remove %p handling from gimple-ssa-sprintf (pr78512)

2016-11-28 Thread Martin Sebor
PR 78512 - r242674 miscompiles Linux kernel observes that the Linux kernel fails to boot as a result of enabling the -fprintf-return-value optimization in GCC. This is likely because the kernel has its own sprintf with a large set of extensions to the %p directive that conflict with the

Re: [PATCH] correct handling of non-constant width and precision (pr 78521)

2016-11-28 Thread Martin Sebor
On 11/28/2016 06:35 PM, David Edelsohn wrote: Martin, I am seeing a number of new failures with the testcases on AIX. FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-1.c (test for excess errors) Excess errors: /nasfarm/edelsohn/src/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-1.c:1485:3:

[PATCH/VRP] Fix type of EQ_EXPR

2016-11-28 Thread Andrew Pinski
While rewriting PHI-OPT to use match and simplify infrastructure, I ran into a problem where VRP pass would create a EQ_EXPR which has a non boolean type inside the VRP pass. This currently works on accident as it seems we don't check the type of the argument of COND_EXPR gimple to be boolean

Re: [PATCH] rs6000: Make deallocation of a large frame work (PR77687)

2016-11-28 Thread Segher Boessenkool
On Tue, Nov 15, 2016 at 09:06:23AM -0500, David Edelsohn wrote: > > * config/rs6000/rs6000.c (rs6000_emit_stack_reset): Emit the > > stack_restore_tie insn instead of stack_tie, for the SVR4 and > > SPE ABIs. > > * config/rs6000/rs6000.md (stack_restore_tie): New

[PATCH] add common CPP_SPECS for bfin

2016-11-28 Thread Waldemar Brodkorb
Hi, add common defines _REENTRANT and _POSIX_SOURCE for bfin. Patch is used in Buildroot for a while to fix issues compiling some software. See here, why this should be always enabled: https://lists.gnu.org/archive/html/autoconf-archive-maintainers/2016-06/msg1.html 2016-11-29 Waldemar

Re: [PATCH] Fix PR78306

2016-11-28 Thread Richard Biener
On Mon, 28 Nov 2016, Jeff Law wrote: > On 11/15/2016 07:58 AM, Richard Biener wrote: > > > > Appearantly for some unknown reason we refuse to inline anything into > > functions calling cilk_spawn. That breaks fortified headers and > > all other always-inline function calls (intrinsics come to

Re: [PATCH] Fix PR78546

2016-11-28 Thread Richard Biener
On Mon, 28 Nov 2016, Richard Biener wrote: > > The following fixes an optimization regression noted in PR78546 where > moving patterns from forwprop to match.pd missed one variant. > > Bootstrap & regtest running on x86_64-unknown-linux-gnu. The following is what I have applied (note the fix,

Re: [PATCH] Fix PR78343

2016-11-28 Thread Christophe Lyon
Hi Richard, On 25 November 2016 at 11:20, Richard Biener wrote: > On Thu, 24 Nov 2016, Richard Biener wrote: > >> >> I am testing the following patch for an optimization regression where >> a loop made dead by final value replacement was made used again by >> DOM 20 passes

[Patch, committed] Fix bootstrap on freeBSD and hppa64

2016-11-28 Thread Iain Sandoe
Hi, I used a non-portable shell idiom in the second patch for pr71767. This caused configuration issues resulting in bootstrap fails for FreeBSD and hppa64-*-*. Fix tested by Andreas and John (and re-checked on Darwin and Linux by me). Applied as 242912. Iain gcc/ 2016-11-28 Iain Sandoe

Re: [Patch, committed] Fix bootstrap on freeBSD and hppa64

2016-11-28 Thread Iain Sandoe
> On 28 Nov 2016, at 10:34, Iain Sandoe wrote: > > Hi, > > I used a non-portable shell idiom in the second patch for pr71767. This > caused configuration issues resulting in bootstrap fails for FreeBSD and > hppa64-*-*. > > Fix tested by Andreas and John (and

Re: [PATCH] Fix -fcompare-debug issues in IPA-ICF (PR lto/78211)

2016-11-28 Thread Jan Hubicka
> Hi! > > IPA-ICF performs some code-generation visible changes from hash table > traversal, where the hash values can be different between -g and -g0 > (I bet it hashes DECL_UID in somewhere, perhaps other things). It should not - the hash is stable for LTO streaming. I think ICF merging -g and

Re: [PATCH] Fix PR78343

2016-11-28 Thread Richard Biener
On Mon, 28 Nov 2016, Christophe Lyon wrote: > Hi Richard, > > > On 25 November 2016 at 11:20, Richard Biener wrote: > > On Thu, 24 Nov 2016, Richard Biener wrote: > > > >> > >> I am testing the following patch for an optimization regression where > >> a loop made dead by

Re: [0/3] Fix PR78120, in ifcvt/rtlanal/i386.

2016-11-28 Thread Bernd Schmidt
On 11/25/2016 04:55 PM, Segher Boessenkool wrote: So IMNSHO this rtx costing change belongs in early stage 1, and should be reverted. Done. Bernd

Re: [0/3] Fix PR78120, in ifcvt/rtlanal/i386.

2016-11-28 Thread Bernd Schmidt
On 11/25/2016 04:55 PM, Segher Boessenkool wrote: So IMNSHO this rtx costing change belongs in early stage 1, and should be reverted. Done. Bernd

Re: [PATCH] Fix -fcompare-debug issues in IPA-ICF (PR lto/78211)

2016-11-28 Thread Richard Biener
On Fri, 25 Nov 2016, Jakub Jelinek wrote: > Hi! > > IPA-ICF performs some code-generation visible changes from hash table > traversal, where the hash values can be different between -g and -g0 > (I bet it hashes DECL_UID in somewhere, perhaps other things). > The following patch fixes it by

Re: [PATCH] Fix a couple of issues in gimple-ssa-sprintf.c

2016-11-28 Thread Richard Biener
On Sat, 26 Nov 2016, Martin Sebor wrote: > On 11/25/2016 10:20 AM, Jakub Jelinek wrote: > > Hi! > > > > Here is an attempt to fix a couple of bugs in gimple-ssa-sprintf.c. > > First of all, it assumes size_t is always the same as uintmax_t, which > > is not necessarily the case. > > Second, it

Re: [PATCH] Fix a couple of issues in gimple-ssa-sprintf.c

2016-11-28 Thread Richard Biener
On Fri, 25 Nov 2016, Jakub Jelinek wrote: > Hi! > > Here is an attempt to fix a couple of bugs in gimple-ssa-sprintf.c. > First of all, it assumes size_t is always the same as uintmax_t, which > is not necessarily the case. > Second, it uses static tree {,u}intmax_type_node; variables for

[patch,avr,committed] Small improvement loading 16-bit values.

2016-11-28 Thread Georg-Johann Lay
http://gcc.gnu.org/r242909 This patch adds treatment of reg_unused_after for *(X+const) that only restores X if X is known to be used. Applied as obvious. Johann * config/avr/avr.c (out_movhi_r_mr) [REG_X + PLUS]: Only SBIW if X is not unused after. Index: config/avr/avr.c

RE: [PATCH] arc: Avoid store/load pipeline hazard

2016-11-28 Thread Claudiu Zissulescu
Hi Andrew, Approved, but ... > +/* Return true if a load instruction (CONSUMER) uses the same address > + as a store instruction (PRODUCER). This function is used to avoid > + st/ld address hazard in ARC700 cores. */ Missing space after dot. > + /* Peel the producer and the consumer for

  1   2   >