Re: [PATCH] Fix PR 91708

2019-09-11 Thread Jeff Law
On 9/11/19 10:38 AM, Wilco Dijkstra wrote: > Hi Jeff, > > Jeff wrote: >> Just to make sure I understand. Are you saying the addresses for the >> MEMs are equal or the contents of the memory location are equal. >> >> For the former the alignment has to be the same, plain and simple, even >> if

Re: [PATCH V6 09/11] bpf: adjust GCC testsuite to eBPF limitations

2019-09-11 Thread Mike Stump
On Aug 29, 2019, at 8:13 AM, Jose E. Marchesi wrote: > > This patch makes many tests in gcc.dg and gcc.c-torture to be skipped > in bpf-*-* targets. This is due to the many limitations imposed by > eBPF Ok. So, see my other comments about marking and automatically skipping tests in the

[30/32] Remove global call sets: sel-sched.c

2019-09-11 Thread Richard Sandiford
The main change here is to replace a crosses_call boolean with a bitmask of the ABIs used by the crossed calls. For space reasons, I didn't also add a HARD_REG_SET that tracks the set of registers that are actually clobbered, which means that this is the one part of the series that doesn't

[31/32] Remove global call sets: shrink-wrap.c

2019-09-11 Thread Richard Sandiford
This is a straight replacement of "calls we can clobber without saving them first". 2019-09-11 Richard Sandiford gcc/ * shrink-wrap.c: Include function-abi.h. (requires_stack_frame_p): Use crtl->abi to test whether the current function can use a register without

[00/32] Remove global call sets: rtlanal.c

2019-09-11 Thread Richard Sandiford
The reg_set_p part is simple, since the caller is asking about a specific REG rtx, with a known register number and mode. The find_all_hard_reg_sets part emphasises that the "implicit" behaviour was always a bit suspect, since it includes fully-clobbered registers but not partially-clobbered

[29/32] Remove global call sets: sched-deps.c

2019-09-11 Thread Richard Sandiford
This is a straight replacement of an existing "full or partial" call-clobber check. 2019-09-11 Richard Sandiford gcc/ * sched-deps.c (deps_analyze_insn): Use the ABI of the target function to test whether a register is fully or partly clobbered. Index: gcc/sched-deps.c

Re: [RFC PATCH] Add inlining growth bias flag

2019-09-11 Thread Graham Markall
Hi Jeff, On 09/09/2019 19:55, Jeff Law wrote: > I'm not sure if we really want to expose this as a first class option. > Perhaps a PARAM would be better. Jan would have the final call though > since he's done the most work on the IPA bits. Many thanks for the suggestion - I could turn it into a

Re: [Patch 0/X] [WIP][RFC][libsanitizer] Introduce HWASAN to GCC

2019-09-11 Thread Evgenii Stepanov via gcc-patches
On Wed, Sep 11, 2019 at 9:37 AM Matthew Malcomson wrote: > > On 11/09/19 12:53, Martin Liška wrote: > > On 9/9/19 5:54 PM, Matthew Malcomson wrote: > >> On 09/09/19 11:47, Martin Liška wrote: > >>> On 9/6/19 4:46 PM, Matthew Malcomson wrote: > Hello, > > >> As I understand it,

Re: [PATCH V6 03/11] testsuite: annotate c-torture/compile tests with dg-require-stack-size

2019-09-11 Thread Mike Stump
On Aug 29, 2019, at 8:13 AM, Jose E. Marchesi wrote: > > This patch annotates tests that make use of a significant a mount of > stack space. Ok. Future changes like this are now obvious to you and you can just maintain them as you see fit.

[17/32] Remove global call sets: gcse.c

2019-09-11 Thread Richard Sandiford
This is another case in which we can conservatively treat partial kills as full kills. Again this is in principle a bug fix for TARGET_HARD_REGNO_CALL_PART_CLOBBERED targets, but in practice it probably doesn't make a difference. 2019-09-11 Richard Sandiford gcc/ * gcse.c: Include

[18/32] Remove global call sets: haifa-sched.c

2019-09-11 Thread Richard Sandiford
The code patched here is counting how many registers the current function would need to save in the prologue before it uses them. The code is called per function, so using crtl is OK. 2019-09-11 Richard Sandiford gcc/ * haifa-sched.c: Include function-abi.h.

[15/32] Remove global call sets: early-remat.c

2019-09-11 Thread Richard Sandiford
This pass previously excluded rematerialisation candidates if they clobbered a call-preserved register, on the basis that it then wouldn't be safe to add new instances of the candidate instruction after a call. This patch instead makes the decision on a call-by-call basis. The second

[16/32] Remove global call sets: function.c

2019-09-11 Thread Richard Sandiford
Whatever the rights and wrongs of the way aggregate_value_p handles call-preserved registers, it's a de facto part of the ABI, so we shouldn't change it. The patch simply extends the current approach to whatever call-preserved set the function happens to be using. 2019-09-11 Richard Sandiford

[32/32] Hide regs_invalidated_by_call etc.

2019-09-11 Thread Richard Sandiford
The previous patches removed all target-independent uses of regs_invalidated_by_call, call_used_or_fixed_regs and call_used_or_fixed_reg_p. This patch therefore restricts them to target-specific code (and reginfo.c, which sets them up). 2019-09-11 Richard Sandiford gcc/ *

Re: [PATCH] Fix PR 91708

2019-09-11 Thread Wilco Dijkstra
Hi Jeff, > We're talking about two instructions where if the first executes, then > the second also executes.  If the memory addresses are the same, then > their alignment is the same. > > In your case the two instructions are on different execution paths and > are in fact mutually exclusive.

[09/32] Remove global call sets: cfgloopanal.c

2019-09-11 Thread Richard Sandiford
...or rather, make the use of the default ABI explicit. That seems OK if not ideal for this heuristic. In practical terms, the code patched here is counting GENERAL_REGS, which are treated in the same way by all concurrent ABI variants on AArch64. It might give bad results if used for interrupt

[08/32] Remove global call sets: cfgcleanup.c

2019-09-11 Thread Richard Sandiford
old_insns_match_p just tests whether two instructions are similar enough to merge. With call_insn_abi it makes more sense to compare the ABIs directly. 2019-09-11 Richard Sandiford gcc/ * cfgcleanup.c (old_insns_match_p): Compare the ABIs of calls instead of the

Re: [PATCH][ARM] Correctly set SLOW_BYTE_ACCESS

2019-09-11 Thread Wilco Dijkstra
Hi Paul, > > On Sep 11, 2019, at 11:48 AM, Wilco Dijkstra wrote: > > > > Contrary to all documentation, SLOW_BYTE_ACCESS simply means accessing > > bitfields by their declared type, which results in better codegeneration > > on practically any target.  So set it correctly to 1 on Arm. > > If

[23/32] Remove global call sets: postreload-gcse.c

2019-09-11 Thread Richard Sandiford
This is another case in which we should conservatively treat partial kills as full kills. 2019-09-11 Richard Sandiford gcc/ * postreload-gcse.c: Include regs.h and function-abi.h. (record_opr_changes): Use call_insn_abi to get the ABI of the call insn target.

[22/32] Remove global call sets: postreload.c

2019-09-11 Thread Richard Sandiford
The "|= fixed_regs" in reload_combine isn't necessary, since the set is only used to determine which values have changed (rather than, for example, which registers are available for use). In reload_cse_move2add we can be accurate about which registers are still available. BLKmode indicates a

[21/32] Remove global call sets: LRA

2019-09-11 Thread Richard Sandiford
lra_reg has an actual_call_used_reg_set field that is only used during inheritance. This in turn required a special lra_create_live_ranges pass for flag_ipa_ra to set up this field. This patch instead makes the inheritance code do its own live register tracking, using the same

[20/32] Remove global call sets: loop-iv.c

2019-09-11 Thread Richard Sandiford
Similar idea to the combine.c and gcse.c patches. 2019-09-11 Richard Sandiford gcc/ * loop-iv.c: Include regs.h and function-abi.h. (simplify_using_initial_values): Use call_insn_abi to get the ABI of the call insn target. Conservatively assume that

[24/32] Remove global call sets: recog.c

2019-09-11 Thread Richard Sandiford
2019-09-11 Richard Sandiford gcc/ * recog.c: Include function-abi.h. (peep2_find_free_register): Use crtl->abi when deciding whether a register is free for use after RA. Index: gcc/recog.c === ---

Re: [PATCH] Fix PR 91708

2019-09-11 Thread Bernd Edlinger
On 9/11/19 8:30 PM, Richard Biener wrote: > On September 11, 2019 7:41:22 PM GMT+02:00, Bernd Edlinger > wrote: >> On 9/11/19 6:08 PM, Jeff Law wrote: >>> On 9/11/19 7:49 AM, Bernd Edlinger wrote: On 9/11/19 9:23 AM, Richard Biener wrote: > On Tue, 10 Sep 2019, Bernd Edlinger wrote:

Re: [PATCH V6 04/11] testsuite: new require effective target indirect_calls

2019-09-11 Thread Jose E. Marchesi
Hi Mike. Thanks for the review. On Aug 29, 2019, at 8:13 AM, Jose E. Marchesi wrote: > > This patch adds a new dg_require_effective_target procedure to the > testsuite infrastructure: indirect_calls. This new function tells > whether a target supports calls to

[Committed] PR fortran/91553 -- simplification of constants needs to check for parenthesis

2019-09-11 Thread Steve Kargl
Committed as obvious (once the problem is identified). When simplification of an expression occurs, parenthesis can be inserted. When simplifying a constant expression, need to check for inserted parenthesis. 2019-09-11 Steven G. Kargl PR fortran/91553 * simplify.c

[03/32] Add a function for getting the ABI of a call insn target

2019-09-11 Thread Richard Sandiford
This patch replaces get_call_reg_set_usage with call_insn_abi, which returns the ABI of the target of a call insn. The ABI's full_reg_clobbers corresponds to regs_invalidated_by_call, whereas many callers instead passed call_used_or_fixed_regs, i.e.: (regs_invalidated_by_call | fixed_reg_set)

[04/32] [x86] Robustify vzeroupper handling across calls

2019-09-11 Thread Richard Sandiford
One of the effects of the function_abi series is to make -fipa-ra work for partially call-clobbered registers. E.g. if a call preserves only the low 32 bits of a register R, we handled the partial clobber separately from -fipa-ra, and so treated the upper bits of R as clobbered even if we knew

[05/32] Pass an ABI identifier to hard_regno_call_part_clobbered

2019-09-11 Thread Richard Sandiford
This patch replaces the rtx_insn argument to targetm.hard_regno_call_part_clobbered with an ABI identifier, since call insns are now just one possible way of getting an ABI handle. This in turn allows predefined_function_abi::initialize to do the right thing for non-default ABIs. The horrible ?:

[06/32] Pass an ABI to choose_hard_reg_mode

2019-09-11 Thread Richard Sandiford
choose_hard_reg_mode previously took a boolean saying whether the mode needed to be call-preserved. This patch replaces it with an optional ABI pointer instead, so that the function can use that to test whether a value is call-saved. default_dwarf_frame_reg_mode uses eh_edge_abi because that's

[07/32] Remove global call sets: caller-save.c

2019-09-11 Thread Richard Sandiford
All caller-save.c uses of "|= fixed_reg_set" added in a previous patch were redundant, since the sets are later ANDed with ~fixed_reg_set. 2019-09-11 Richard Sandiford gcc/ * caller-save.c (setup_save_areas): Remove redundant |s of fixed_reg_set.

Re: [PATCH] Fix PR 91708

2019-09-11 Thread Bernd Edlinger
On 9/11/19 6:08 PM, Jeff Law wrote: > On 9/11/19 7:49 AM, Bernd Edlinger wrote: >> On 9/11/19 9:23 AM, Richard Biener wrote: >>> On Tue, 10 Sep 2019, Bernd Edlinger wrote: >>> Hi! This ICE happens when compiling real_nextafter in real.c. CSE sees this: (insn 179 178

Re: [PATCH V6 05/11] bpf: new GCC port

2019-09-11 Thread Mike Stump
On Sep 5, 2019, at 3:50 PM, Jose E. Marchesi wrote: > I guess I should wait for acceptance of the remaining patches not having > an explicit ack? > > This leaves the following patches that still need explicit approval: > > - [PATCH V6 03/11] testsuite: annotate c-torture/compile tests with >

[12/32] Remove global call sets: cselib.c

2019-09-11 Thread Richard Sandiford
cselib_invalidate_regno is a no-op if REG_VALUES (i) is null, so we can check that first. Then, if we know what mode the register currently has, we can check whether it's clobbered in that mode. Using GET_MODE (values->elt->val_rtx) to get the mode of the last set is taken from

[13/32] Remove global call sets: DF (EH edges)

2019-09-11 Thread Richard Sandiford
The DF dense_invalidated_by_call and sparse_invalidated_by_call sets are actually only used on EH edges, and so are more the set of registers that are invalidated by a taken EH edge. Under the new order, that means that they describe eh_edge_abi. 2019-09-11 Richard Sandiford gcc/ *

[11/32] Remove global call sets: cse.c

2019-09-11 Thread Richard Sandiford
Like with the combine.c patch, this one keeps things simple by invalidating values in partially-clobbered registers, rather than trying to tell whether the value in a partially-clobbered register is actually clobbered or not. Again, this is in principle a bug fix, but probably never matters in

[10/32] Remove global call sets: combine.c

2019-09-11 Thread Richard Sandiford
There shouldn't be many cases in which a useful hard register is live across a call before RA, so we might as well keep things simple and invalidate partially-clobbered registers here, in case the values they hold leak into the call-clobbered part. In principle this is a bug fix for

[14/32] Remove global call sets: DF (entry/exit defs)

2019-09-11 Thread Richard Sandiford
The code patched here is seeing whether the current function needs to save at least part of a register before using it. 2019-09-11 Richard Sandiford gcc/ * df-scan.c (df_get_entry_block_def_set): Use crtl->abi to test whether the current function needs to save at least part

Re: [PATCH V6 03/11] testsuite: annotate c-torture/compile tests with dg-require-stack-size

2019-09-11 Thread Jose E. Marchesi
On Aug 29, 2019, at 8:13 AM, Jose E. Marchesi wrote: > > This patch annotates tests that make use of a significant a mount of > stack space. Ok. Future changes like this are now obvious to you and you can just maintain them as you see fit. Ok thanks.

Re: [Patch, fortran] PR91717 - ICE on concatenating deferred-length character and character literal

2019-09-11 Thread Steve Kargl
On Wed, Sep 11, 2019 at 11:27:56PM +0100, Paul Richard Thomas wrote: > Hi Steve, > > Being an allocatable component, this code appears on entry into scope: > > my_core.msg = 0B; > my_core._msg_length = 0; > { > > Thus, according to the standard, my_core%msg is defined. > I'll politely

Re: [PATCH V6 04/11] testsuite: new require effective target indirect_calls

2019-09-11 Thread Mike Stump
On Aug 29, 2019, at 8:13 AM, Jose E. Marchesi wrote: > > This patch adds a new dg_require_effective_target procedure to the > testsuite infrastructure: indirect_calls. This new function tells > whether a target supports calls to non-constant call targets. Ok. I'll let people contemplate some

[01/32] Add function_abi.{h,cc}

2019-09-11 Thread Richard Sandiford
This patch adds new structures and functions for handling multiple ABIs in a translation unit. The structures are: - predefined_function_abi: describes a static, predefined ABI - function_abi: describes either a predefined ABI or a local variant of one (e.g. taking -fipa-ra into account) The

[00/32] Support multiple ABIs in the same translation unit

2019-09-11 Thread Richard Sandiford
This series of patches introduces some classes and helpers for handling multiple ABIs in the same translation unit. At the moment "ABI" maans specifically the choice of call-clobbered registers, but I'm hoping the structures could be used for other ABI properties in future. The main point of the

[02/32] Add a target hook for getting an ABI from a function type

2019-09-11 Thread Richard Sandiford
This patch adds a target hook that allows targets to return the ABI associated with a particular function type. Generally, when multiple ABIs are in use, it must be possible to tell from a function type and its attributes which ABI it is using. 2019-09-11 Richard Sandiford gcc/ *

[testsuite, obvious] Remove explicit "dg-do run" from more gcc.dg/vect tests

2019-09-11 Thread Sandra Loosemore
This patch is a followup to PR testsuite/83889, in which it was noted that "The failures in this PR were from forcing { dg-do run } even when vect.exp chooses options that are incompatible with the runtime. The default vect.exp behaviour is to execute when possible, so there's no need for a

C++ PATCH for c++/91740 - ICE with constexpr call and ?: in ARRAY_REF

2019-09-11 Thread Marek Polacek
This ICEs since r267272 - more location wrapper nodes, but not because we can't cope with new location wrappers, but because that commit introduced a call to maybe_constant_value in cp_build_array_ref. In this testcase we call it with f (VIEW_CONVERT_EXPR("BAR")) ? 1 : 0 argument and that

Re: Fix for type confusion bug on microblaze

2019-09-11 Thread Jeff Law
On 9/11/19 5:28 AM, Jonas Pfeil wrote: > The Microblaze target confuses unsigned long with HOST_WIDE_INT. > > This works fine for many architectures, but fails on ARM (HOST_WIDE_INT is 8 > bytes, unsigned long is 4 bytes). Leading to print a uninitialized register > instead of the desired number,

Re: [PATCH V6 08/11] bpf: make target-supports.exp aware of eBPF

2019-09-11 Thread Mike Stump
On Aug 29, 2019, at 8:13 AM, Jose E. Marchesi wrote: > > This patch makes the several effective target checks in > target-supports.exp to be aware of eBPF targets. Ok. These sort of updates will now be obvious to you, now that you have gotten your feet wet. This applies to the indirect calls

[26/32] Remove global call sets: regrename.c

2019-09-11 Thread Richard Sandiford
This patch makes regrename use a similar mask-and-clobber-set pair to IRA when tracking whether registers are clobbered by calls in a region. Testing for a nonzero ABI mask is equivalent to testing for a register that crosses a call. Since AArch64 and c6x use regrename.h, they need to be updated

[27/32] Remove global call sets: reload.c

2019-09-11 Thread Richard Sandiford
The inheritance code in find_equiv_reg can use clobbers_reg_p to test whether a call clobbers either of the equivalent registers. reload and find_reg use crtl->abi to test whether a register needs to be saved in the prologue before use. reload_as_needed can use full_and_partial_reg_clobbers and

[25/32] Remove global call sets: regcprop.c

2019-09-11 Thread Richard Sandiford
This is a direct replacement of an existing test for fully and partially clobbered registers. 2019-09-11 Richard Sandiford gcc/ * regcprop.c (copyprop_hardreg_forward_1): Use the recorded mode of the register when deciding whether it is no longer available after a

Re: [PATCH][ARM] Correctly set SLOW_BYTE_ACCESS

2019-09-11 Thread Paul Koning
> On Sep 11, 2019, at 11:48 AM, Wilco Dijkstra wrote: > > Contrary to all documentation, SLOW_BYTE_ACCESS simply means accessing > bitfields by their declared type, which results in better codegeneration > on practically any target. So set it correctly to 1 on Arm. If the documentation is

Re: [PATCH] Fix PR 91708

2019-09-11 Thread Richard Biener
On September 11, 2019 7:41:22 PM GMT+02:00, Bernd Edlinger wrote: >On 9/11/19 6:08 PM, Jeff Law wrote: >> On 9/11/19 7:49 AM, Bernd Edlinger wrote: >>> On 9/11/19 9:23 AM, Richard Biener wrote: On Tue, 10 Sep 2019, Bernd Edlinger wrote: > Hi! > > This ICE happens when

[Committed] PR fortran/91642 -- NULL() cannot be in iolength inquire

2019-09-11 Thread Steve Kargl
Committed as obvious. 2019-09-11 Steven G. Kargl PR fortran/91642 * io.c (gfc_match_inquire): null() cannot be in an iolength inquire list. 2019-09-11 Steven G. Kargl PR fortran/91642 * gfortran.dg/pr91642.f90: New test. -- Steve Index:

[19/32] Remove global call sets: IRA

2019-09-11 Thread Richard Sandiford
For -fipa-ra, IRA already keeps track of which specific registers are call-clobbered in a region, rather than using global information. The patch generalises this so that it tracks which ABIs are used by calls in the region. We can then use the new ABI descriptors to handle partially-clobbered

Re: [PATCH] Sync MIPS support from libffi master repository

2019-09-11 Thread Aurelien Jarno
On 2019-08-08 16:22, Jeff Law wrote: > On 8/8/19 4:18 PM, Aurelien Jarno wrote: > > > > It is used by libgo, but it seems to be the last user. > Ah, yes, I should have remembered libgo. And it links via > ../../blahblah. Thanks for digging into it. > > So, yea, we need it. So I think the best

Re: [Patch, fortran] PR91717 - ICE on concatenating deferred-length character and character literal

2019-09-11 Thread Paul Richard Thomas
Hi Steve, Being an allocatable component, this code appears on entry into scope: my_core.msg = 0B; my_core._msg_length = 0; { Thus, according to the standard, my_core%msg is defined. If you follow the backtrace from the ICE, you will see that something like the patch is required. It is

[PATCH V6 08/11] bpf: make target-supports.exp aware of eBPF

2019-09-11 Thread Mike Stump
On Aug 29, 2019, at 8:13 AM, Jose E. Marchesi wrote: > > This patch makes the several effective target checks in > target-supports.exp to be aware of eBPF targets. Ok. These sort of updates will now be obvious to you, now that you have gotten your feet wet. This applies to the indirect calls

Re: [10/32] Remove global call sets: combine.c

2019-09-11 Thread Segher Boessenkool
On Wed, Sep 11, 2019 at 08:08:38PM +0100, Richard Sandiford wrote: >hard_reg_set_iterator hrsi; > - EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call, 0, i, hrsi) > + EXECUTE_IF_SET_IN_HARD_REG_SET (abi.full_and_partial_reg_clobbers (), > +

Re: Patch to support extended characters in C/C++ identifiers

2019-09-11 Thread Joseph Myers
On Wed, 11 Sep 2019, Lewis Hyatt wrote: > things that may be a little surprising. For instance, you can take a > UTF-8 encoded file and insert a backslash line continuation in the > middle of a multibyte sequence, and gcc will happily paste it back > together and then interpret the resulting

Re: Fix PR rtl-optimization/89795

2019-09-11 Thread Segher Boessenkool
On Wed, Sep 11, 2019 at 02:18:36PM +0200, Eric Botcazou wrote: > > What does it mean for > > (set (reg:QI) (const_int -128)) > > for example? This is the canonical form of moving positive 128 into a > > register as well, of course. > > Nothing, since word_register_operation_p returns false on

Re: [PATCH V6 04/11] testsuite: new require effective target indirect_calls

2019-09-11 Thread Mike Stump
On Sep 11, 2019, at 1:47 PM, Jose E. Marchesi wrote: > > I am working on a new compilation mode for what I call xbpf, which is > basically eBPF plus extensions to eliminate the current restrictions to > C. The purpose of -mxbpf is mainly to test the compiler. Once the > support is in, I will

Re: [gofrontend-dev] Re: libgo: Update to Go 1.13beta1 release

2019-09-11 Thread Andreas Schwab
On Sep 10 2019, Ian Lance Taylor wrote: > On Mon, Sep 9, 2019 at 2:00 PM Andreas Schwab wrote: >> >> ../../../libgo/go/golang.org/x/sys/cpu/cpu.go:17:30: error: reference to >> undefined name ‘cacheLineSize’ >>17 | type CacheLinePad struct{ _ [cacheLineSize]byte } >> |

Re: [PATCH] Allow useless type changes between vectype of builtin arguments (PR tree-optimization/91723)

2019-09-11 Thread Richard Biener
On Wed, 11 Sep 2019, Jakub Jelinek wrote: > Hi! > > This testcase used to be vectorized before r260348, but isn't any longer. > The problem is that while we check with types_compatible_p: > /* We can only handle calls with arguments of the same type. */ > if (rhs_type > &&

Re: [PATCH 3/5] Rewrite part of and_comparisons_1 into match.pd.

2019-09-11 Thread Martin Liška
On 9/10/19 1:19 PM, Marc Glisse wrote: > (some quick comments, I didn't check in details) Thanks for them. > > +    (and:c (code1 @0 INTEGER_CST@1) (code2 @0 INTEGER_CST@2)) > [...] > +   (if (code1 == NE_EXPR && !val) (code2 @0 @2 > > How about > > (and:c (code1 @0 INTEGER_CST@1)

Re: [PATCH] Fix PR 91708

2019-09-11 Thread Richard Biener
On Tue, 10 Sep 2019, Bernd Edlinger wrote: > Hi! > > This ICE happens when compiling real_nextafter in real.c. > CSE sees this: > > (insn 179 178 180 11 (set (reg:SI 319) > (reg/v/f:SI 273 [ rD.73757 ])) "../../gcc-trunk-1/gcc/real.c":120:10 > 643 {*thumb2_movsi_vfp} > (nil)) >

[PATCH] Allow useless type changes between vectype of builtin arguments (PR tree-optimization/91723)

2019-09-11 Thread Jakub Jelinek
Hi! This testcase used to be vectorized before r260348, but isn't any longer. The problem is that while we check with types_compatible_p: /* We can only handle calls with arguments of the same type. */ if (rhs_type && !types_compatible_p (rhs_type, TREE_TYPE (op))) we

Re: [PATCH] Fix up match.pd ICE on kernel build (PR middle-end/91725)

2019-09-11 Thread Richard Biener
On Wed, 11 Sep 2019, Jakub Jelinek wrote: > Hi! > > My recent change broke Linux kernel build, where we ICE in get_nonzero_bits > which apparently assumes it must be called only on INTEGER_CSTs or > SSA_NAMEs, while during generic folding it can be called say with PLUS_EXPR > etc. > >

Re: [PATCH v6 3/3] PR80791 Consider doloop cmp use in ivopts

2019-09-11 Thread Kewen.Lin
Hi, Sorry for the late update. I've updated the words of target hooks part. Could someone help to review it? Thanks in advance! By the way, as previous emails in this thread, Bin has approved the IVOPTs part, while Segher has approved the rs6000 part. Thanks, Kewen - gcc/ChangeLog

Re: [PATCH 3/5] Rewrite part of and_comparisons_1 into match.pd.

2019-09-11 Thread Martin Liška
On 9/10/19 10:52 AM, Bernhard Reutner-Fischer wrote: > On 9 September 2019 15:41:05 CEST, "Martin Liška" wrote: >> On 9/9/19 2:24 PM, Martin Liška wrote: >>> Hi. >>> >>> The patch is about transition of and_comparisons_1 matching >>> into match.pd. >>> >>> Patch can bootstrap on x86_64-linux-gnu

[PATCH] Fix up match.pd ICE on kernel build (PR middle-end/91725)

2019-09-11 Thread Jakub Jelinek
Hi! My recent change broke Linux kernel build, where we ICE in get_nonzero_bits which apparently assumes it must be called only on INTEGER_CSTs or SSA_NAMEs, while during generic folding it can be called say with PLUS_EXPR etc. tree_nonzero_bits apparently can be called on any tree code, as it

[committed] MAINTAINERS - update email address (and, hence, affiliation)

2019-09-11 Thread Tobias Burnus
Update my email address; the old one is my private one and still valid. Cheers, Tobias Index: ChangeLog === --- ChangeLog (revision 275630) +++ ChangeLog (working copy) @@ -1,6 +1,10 @@ +2019-09-10 Tobias Burnus + + *

Re: [PATCH] Rename Deprecated to IgnoreWarn in *.opt files.

2019-09-11 Thread Martin Liška
On 9/10/19 6:48 PM, Jakub Jelinek wrote: > On Tue, Sep 10, 2019 at 05:46:14PM +0100, Richard Sandiford wrote: >> Jakub Jelinek writes: >>> On Tue, Sep 10, 2019 at 06:14:11PM +0200, Martin Liška wrote: On 9/9/19 11:14 PM, Joseph Myers wrote: > On Mon, 9 Sep 2019, Jakub Jelinek wrote:

Re: [PATCH] Allow useless type changes between vectype of builtin arguments (PR tree-optimization/91723)

2019-09-11 Thread Richard Sandiford
Jakub Jelinek writes: > Hi! > > This testcase used to be vectorized before r260348, but isn't any longer. > The problem is that while we check with types_compatible_p: > /* We can only handle calls with arguments of the same type. */ > if (rhs_type > && !types_compatible_p

Fix PR rtl-optimization/89795

2019-09-11 Thread Eric Botcazou
This fixes a wrong code generation on the ARM in very peculiar circumstances ( -O2 -fno-dce -fno-forward-propagate -fno-sched-pressure) present on all active branches in the form of a missing zero-extension. It turns out that not all parts of the RTL middle-end agree on the assumptions valid

[patch, libgomp] Fix segfault with plugin-hsa

2019-09-11 Thread Tobias Burnus
Hi all, hi Jakub, when playing around with offloading, I got an hsa initialization error (/dev/... lacked write permission) and the library call returned with an error status – but hsa_fns.hsa_status_string_fn didn't set the message to the string variable. Hence, the string variable was

Re: [patch, libgomp] Fix segfault with plugin-hsa

2019-09-11 Thread Jakub Jelinek
On Wed, Sep 11, 2019 at 11:30:17AM +0200, Tobias Burnus wrote: > when playing around with offloading, I got an hsa initialization error > (/dev/... lacked write permission) and the library call returned with an > error status – but hsa_fns.hsa_status_string_fn didn't set the message to > the

[PATCH] Fix PR90387

2019-09-11 Thread Richard Biener
The following gets rid of __builtin_constant_p earlier to avoid array-bound diagnostics on dead code. There's been enough optimization on the fully inlined bodies so we can do that at the time of array-bound diagnostics. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-11 Thread Martin Liška
On 9/11/19 10:22 AM, Li Jia He wrote: > Hi, > > On 2019/9/10 3:40 PM, Martin Liška wrote: >> On 9/9/19 3:55 PM, Richard Biener wrote: >>> On Mon, 9 Sep 2019, Martin Liška wrote: >>> On 9/9/19 3:42 PM, Richard Biener wrote: > There is no newly created GIMPLE? Hm, I thought from

[PATCH][MSP430] Don't generate 430X insns when handling data in the lower memory region

2019-09-11 Thread Jozef Lawrynowicz
The MSP430 target has a "430X" extension which increases the directly addressable memory range from 64KB (16-bit) to 1MB (20-bit). This 1MB memory range is split into a "lower" region (below address 0x1) and "upper" region (at or above address 0x1). When data in the upper region is

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-11 Thread Martin Liška
Hello. One another updated version of the patch. Changes from the previous version: - I fixed: gimple *stmt1 = (gimple *) XALLOCAVEC (char, gimple_size (GIMPLE_ASSIGN, 2)); into gimple_size (GIMPLE_ASSIGN, 3) - I simplified condition in gimple_simplified_result_is_gimple_val -

Re: [PATCH 3/5] Rewrite part of and_comparisons_1 into match.pd.

2019-09-11 Thread Martin Liška
I'm sending updated version of the patch where I changed from previous version: - more compact matching is used (note @3 and @4): (and (code1:c@3 @0 INTEGER_CST@1) (code2:c@4 @0 INTEGER_CST@2)) Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed?

[PATCH] Fix libstdc++ tests for -Wvolatile warnings in C++2a mode

2019-09-11 Thread Jonathan Wakely
* testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests. * testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile for C++2a and up. Tested x86_64-linux, committed to trunk.

[PATCH] Fix Xmethod for shared_ptr::use_count()

2019-09-11 Thread Jonathan Wakely
This was reported in https://bugzilla.redhat.com/show_bug.cgi?id=1749578 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__): Fix syntax error. Tested x86_64-linux (although I can't get tests for the use_count() or unique() Xmethods to actually work ...)

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-11 Thread Richard Biener
On Wed, 11 Sep 2019, Martin Liška wrote: > Hello. > > One another updated version of the patch. > Changes from the previous version: > - I fixed: > gimple *stmt1 = (gimple *) XALLOCAVEC (char, gimple_size (GIMPLE_ASSIGN, > 2)); > into gimple_size (GIMPLE_ASSIGN, 3) > - I simplified

[PATCH] Builtin fadd variants folding implementation

2019-09-11 Thread Tejas Joshi
Hi. This patch includes implementation of fadd, faddl, daddl functions. The patch boostraps on x86_64-linux-gnu and passes regression tests. Thanks, Tejas gcc/ChangeLog: 2019-09-11 Tejas Joshi * builtin-types.def: Define narrowing function types. * builtins.def: Define fadd variants

Re: [PATCH] Fix PR 91708

2019-09-11 Thread Richard Biener
On Wed, 11 Sep 2019, Bernd Edlinger wrote: > On 9/11/19 12:43 AM, Jeff Law wrote: > > On 9/10/19 1:51 PM, Bernd Edlinger wrote: > >> Hi! > >> > >> This ICE happens when compiling real_nextafter in real.c. > >> CSE sees this: > >> > >> (insn 179 178 180 11 (set (reg:SI 319) > >>

Re: [patch, libgomp] Fix segfault with plugin-hsa

2019-09-11 Thread Martin Jambor
Hi, On Wed, Sep 11 2019, Jakub Jelinek wrote: > On Wed, Sep 11, 2019 at 11:30:17AM +0200, Tobias Burnus wrote: >> when playing around with offloading, I got an hsa initialization error >> (/dev/... lacked write permission) and the library call returned with an >> error status – but

Re: Fix PR rtl-optimization/89795

2019-09-11 Thread Segher Boessenkool
Hi Eric, On Wed, Sep 11, 2019 at 12:39:51PM +0200, Eric Botcazou wrote: > This fixes a wrong code generation on the ARM in very peculiar circumstances > ( > -O2 -fno-dce -fno-forward-propagate -fno-sched-pressure) present on all > active > branches in the form of a missing zero-extension. It

libgo patch committed: Force test package to be imported first

2019-09-11 Thread Ian Lance Taylor
When running libgo tests, when compiling the x_test package, this patch forces the test package to be imported first. That ensures that we will see the types defined in the test package before the types defined in the non-test version of the package. This matters if the types differ in some way,

Re: [PATCH 3/5] Rewrite part of and_comparisons_1 into match.pd.

2019-09-11 Thread Richard Biener
On Wed, 11 Sep 2019, Martin Liška wrote: > I'm sending updated version of the patch where I changed > from previous version: > - more compact matching is used (note @3 and @4): > (and (code1:c@3 @0 INTEGER_CST@1) (code2:c@4 @0 INTEGER_CST@2)) > > Patch can bootstrap on x86_64-linux-gnu and

Re: [PATCH 3/5] Rewrite part of and_comparisons_1 into match.pd.

2019-09-11 Thread Martin Liška
On 9/11/19 2:43 PM, Richard Biener wrote: > On Wed, 11 Sep 2019, Martin Liška wrote: > >> I'm sending updated version of the patch where I changed >> from previous version: >> - more compact matching is used (note @3 and @4): >> (and (code1:c@3 @0 INTEGER_CST@1) (code2:c@4 @0 INTEGER_CST@2)) >>

Re: [PATCH] Fix PR 91708

2019-09-11 Thread Bernd Edlinger
On 9/11/19 12:43 AM, Jeff Law wrote: > On 9/10/19 1:51 PM, Bernd Edlinger wrote: >> Hi! >> >> This ICE happens when compiling real_nextafter in real.c. >> CSE sees this: >> >> (insn 179 178 180 11 (set (reg:SI 319) >> (reg/v/f:SI 273 [ rD.73757 ])) "../../gcc-trunk-1/gcc/real.c":120:10 >>

Re: [PATCH 4/5] Rewrite first part of or_comparisons_1 into match.pd.

2019-09-11 Thread Martin Liška
Hi. There's slightly updated version of the patch where I use @3 and @4 in match.pd. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin >From 997ed7390bb2897cf880b29d14d0e28e5f8873c2 Mon Sep 17 00:00:00 2001 From: Martin Liska Date:

Re: [PATCH 5/5] Rewrite second part of or_comparisons_1 into match.pd.

2019-09-11 Thread Martin Liška
Hi. There's slightly updated version of the patch where I use @3 and @4 in match.pd. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin >From 00f3638c4ecf711edba9a92931a0835ab476c28c Mon Sep 17 00:00:00 2001 From: Martin Liska Date:

Re: [PATCH] Prevent LTO section collision for a symbol name starting with '*'.

2019-09-11 Thread Martin Liška
On 9/9/19 4:33 PM, Jan Hubicka wrote: >> PING^1 >> >> On 8/26/19 12:04 PM, Martin Liška wrote: >>> Ok. I have a semi-working patch that has issues for inline clones. >>> When we call cgraph_node::get_untransformed_body for an inline clone, >>> then one needs to use clone_of->order to find proper

Re: [Patch 0/X] [WIP][RFC][libsanitizer] Introduce HWASAN to GCC

2019-09-11 Thread Martin Liška
On 9/9/19 5:54 PM, Matthew Malcomson wrote: > On 09/09/19 11:47, Martin Liška wrote: >> On 9/6/19 4:46 PM, Matthew Malcomson wrote: >>> Hello, >>> >>> This patch series is a WORK-IN-PROGRESS towards porting the LLVM hardware >>> address sanitizer (HWASAN) in GCC. The document describing HWASAN

Re: Fix PR rtl-optimization/89795

2019-09-11 Thread Eric Botcazou
> What does it mean for > (set (reg:QI) (const_int -128)) > for example? This is the canonical form of moving positive 128 into a > register as well, of course. Nothing, since word_register_operation_p returns false on CONST_INTs . > W_R_O needs many more restrictions if it can work at all,

Re: [PATCH 2/9] operand_equal_p: add support for FIELD_DECL

2019-09-11 Thread Martin Liška
On 8/16/19 2:09 PM, Jan Hubicka wrote: >> On Thu, Aug 15, 2019 at 4:17 PM Jan Hubicka wrote: >>> On Tue, Aug 6, 2019 at 5:44 PM Martin Liska wrote: > > > gcc/ChangeLog: So I suppose this isn't to call operand_equal_p on two FIELD_DECLs but to make two

Fix for type confusion bug on microblaze

2019-09-11 Thread Jonas Pfeil
The Microblaze target confuses unsigned long with HOST_WIDE_INT. This works fine for many architectures, but fails on ARM (HOST_WIDE_INT is 8 bytes, unsigned long is 4 bytes). Leading to print a uninitialized register instead of the desired number, fix by using the correct printf-specifier.

  1   2   >