; 0);
STMT_VINFO_NUM_SLP_USES (vinfo_for_stmt (stmt))--;
}
But after transform this update is redundant even for statements that do
exist, so it seems better to skip this loop for the final teardown.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (vect_free_slp_insta
, new_stmt);
before creating new_stmt.
This method of creating statements probably needs cleaning up, but
that's for another day...
2018-07-24 Richard Sandiford
gcc/
* tree-vect-loop.c (vectorizable_reduction): Fix an instance in
which make_ssa_name was called with new
in a subroutine.
2018-07-24 Richard Sandiford
gcc/
* tree-vect-loop.c (vect_valid_reduction_input_p): New function,
split out from...
(vect_is_slp_reduction): ...here...
(vect_is_simple_reduction): ...and here. Remove repetition of tests
that are a
This patch adds a vec_info function for allocating and setting
stmt_vec_infos. It's the start of a long process of removing
the global stmt_vec_info array.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
(vec
t rid of most other calls to vinfo_for_stmt.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (vec_info::lookup_stmt): Declare.
* tree-vectorizer.c (vec_info::lookup_stmt): New function.
* tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
This patch adds a vec_info helper for checking whether an operand is an
SSA_NAME that is defined in the vectorisable region.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (vec_info::lookup_def): Declare.
* tree-vectorizer.c (vec_info::lookup_def): New function
This patch adds a helper function for seeing whether there is a single
user of an SSA name, and whether that user has a stmt_vec_info.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (vec_info::lookup_single_use): Declare.
* tree-vectorizer.c (vec_info
g any comments or tried to make it pretty.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (stmt_vec_info): Temporarily change from
a typedef to a wrapper class.
(NULL_STMT_VEC_INFO): New macro.
(vec_info::stmt_infos): Change to vec.
(stmt_vec_info::ope
tries to clean up how
operands are handled (with a view to allowing mixed vector sizes).
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (vect_is_simple_use): Add an optional
stmt_vec_info * parameter before the optional gimple **.
* tree-vect-stmts.c (vec
This patch changes STMT_VINFO_RELATED_STMT from a gimple stmt to a
stmt_vec_info.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
a gimple stmt to a stmt_vec_info.
(is_pattern_stmt_p): Update accordingly
hole for this series.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
(vect_finish_stmt_generation): Likewise.
* tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
(vect_finish
This patch changes STMT_VINFO_VEC_STMT from a gimple stmt to a
stmt_vec_info and makes the vectorizable_* routines pass back
a stmt_vec_info to vect_transform_stmt.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
a gimple
This patch changes LOOP_VINFO_REDUCTIONS from an auto_vec
to an auto_vec. It also changes the associated
vect_force_simple_reduction so that it takes and returns stmt_vec_infos
instead of gimple stmts.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (_loop_vec_info::reductions
This patch changes SLP_TREE_VEC_STMTS from a vec to a
vec. This involved making the same change to the
phis vector in vectorizable_reduction, since SLP_TREE_VEC_STMTS is
spliced into it here:
phis.splice (SLP_TREE_VEC_STMTS (slp_node_instance->reduc_phis));
2018-07-24 Richard Sandif
This patch changes STMT_VINFO_REDUC_DEF from a gimple stmt to a
stmt_vec_info.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
a gimple stmt to a stmt_vec_info.
* tree-vect-loop.c (vect_active_double_reduction_p
This patch changes {REDUC,DR}_GROUP_{FIRST,NEXT} element from a
gimple stmt to stmt_vec_info.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (_stmt_vec_info::first_element): Change from
a gimple stmt to a stmt_vec_info.
(_stmt_vec_info::next_element): Likewise
This patch changes SLP_TREE_SCALAR_STMTS from a vec to
a vec. It's longer than the previous conversions
but mostly mechanical.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (_slp_tree::stmts): Change from a vec
to a vec.
* tree-vect-slp.c (vect_free_slp
that are keyed off a data_reference would these days
be better keyed off a stmt_vec_info, but it's more convenient
to do that later in the series. The vect_dr_size calls that are
left over do still benefit from this patch.
2018-07-24 Richard Sandiford
gcc/
* tree-vectori
This patch changes STMT_VINFO_SAME_DR_STMT from a gimple stmt to a
stmt_vec_info.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
a gimple stmt to a stmt_vec_info.
* tree-vect-stmts.c (vectorizable_load): Update
This patch changes the SLP lists grouped_stores and reduction_chains
from auto_vec to auto_vec. It was easier
to do them together due to the way vect_analyze_slp is structured.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (vec_info::grouped_stores): Change from
an
This patch changes LOOP_VINFO_MAY_MISALIGN_STMTS from an
auto_vec to an auto_vec.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
from an auto_vec to an auto_vec.
* tree-vect-data-refs.c
This patch makes stmt_info_for_cost carry a stmt_vec_info instead
of a gimple stmt. The structure is internal to the vectoriser,
so targets aren't affected.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
(stmt_info_for
If we use stmt_vec_infos to represent statements in the vectoriser,
it's then more natural to use dyn_cast when processing the statement
as an assignment, call, etc. This patch does that in a few more places.
2018-07-24 Richard Sandiford
gcc/
* tree-vect-data-r
...and also make vect_find_last_scalar_stmt_in_slp return a stmt_vec_info.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
return stmt_vec_infos rather than gimple stmts. Do not accept
null arguments
Various places called vect_dr_stmt or vinfo_for_stmt multiple times
on the same input. This patch makes them reuse the earlier result.
It also splits a couple of single vinfo_for_stmt calls out into
separate statements so that they can be reused in later patches.
2018-07-24 Richard Sandiford
This second part handles the less mechnical cases, i.e. those that don't
just involve swapping a gimple stmt for an existing stmt_vec_info.
2018-07-24 Richard Sandiford
gcc/
* tree-vect-loop.c (vect_analyze_loop_operations): Look up the
statement before passing
This first part makes functions use stmt_vec_infos instead of
gimple stmts in cases where the stmt_vec_info was already available
and where the change is mechanical. Most of it is just replacing
"stmt" with "stmt_info".
2018-07-24 Richard Sandiford
gcc/
* t
2018-07-24 Richard Sandiford
gcc/
* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
of the worklist from a vector of gimple stmts to a vector of
stmt_vec_infos.
* tree-vect-stmts.c (vect_mark_relevant, process_use
This first (less mechanical) part handles cases that involve changes in
the callers or non-trivial changes in the functions themselves.
2018-07-24 Richard Sandiford
gcc/
* tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
a stmt_vec_info instead of a gcall
just use the original value.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
(vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
a vect_def_type for the first argument.
* tree-vect-st
This second part handles the mechanical change from a gimple stmt
argument to a stmt_vec_info argument. It updates the function
comments if they referred to the argument by name, but it doesn't
try to retrofit mentions to other functions.
2018-07-24 Richard Sandiford
gcc/
*
vect_pattern_recog_1 took a gimple_stmt_iterator as argument, but was
only interested in the gsi_stmt, not anything else. This patch makes
the associated routines operate directly on stmt_vec_infos.
2018-07-24 Richard Sandiford
gcc/
* tree-vect-patterns.c (vect_mark_pattern_stmts
This patch makes vect_record_max_nunits and vect_record_base_alignment
take a stmt_vec_info instead of a vec_info/gimple pair.
2018-07-24 Richard Sandiford
gcc/
* tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
and gimple stmt arguments with a
This patch adds a pattern_stmt_p field to stmt_vec_info, so that it's
possible to tell whether the statement is a pattern statement without
referring to other statements. The new field goes in what was
previously a hole in the structure, so the size is the same as before.
2018-07-24 Ri
data_references.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (STMT_VINFO_TARGET_ALIGNMENT): New macro.
(DR_VECT_AUX, DR_MISALIGNMENT, SET_DR_MISALIGNMENT)
(DR_TARGET_ALIGNMENT): Delete.
(set_dr_misalignment, dr_misalignment, aligned_access_p
the data_reference.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (vect_supportable_dr_alignment): Take
a stmt_vec_info rather than a data_reference.
* tree-vect-data-refs.c (vect_calculate_target_alignment)
(vect_compute_data_ref_alignment
After previous changes, it makes more sense to record which stmt's
access is going to be aligned via peeling, rather than the associated
scalar data reference.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (_loop_vec_info::unaligned_dr): Replace
Previous patches got rid of a lot of calls to vect_dr_stmt.
This patch replaces the remaining ones with calls to a new
vec_info::lookup_dr function, so that the lookup is relative
to a particular vec_info rather than to global state.
2018-07-24 Richard Sandiford
gcc/
* tree
This patch adds a new helper function for permanently removing a
statement and its associated stmt_vec_info.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (vec_info::remove_stmt): Declare.
* tree-vectorizer.c (vec_info::remove_stmt): New function.
* tree-vect
This patch adds a helper for replacing a stmt_vec_info's statement with
a new statement.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (vec_info::replace_stmt): Declare.
* tree-vectorizer.c (vec_info::replace_stmt): New function.
* tree-vect-
o the actual
freeing, since there's no longer a need to do it before resetting
the gimple_uids.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
rather than a gimple stmt.
* tree-vect-stmts.c (free_stmt_vec_info): Likewi
rid of:
- vinfo_for_stmt
- stmt_vec_info_vec
- set_stmt_vec_info_vec
since nothing now uses them. This was the main goal of the series.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
(vec_info::set_vinfo_for_stmt, vec_info
Unlike the old vinfo_for_stmt, vec_info::lookup_stmt can cope with
any statement, so there's no need to check beforehand that the statement
is part of the vectorisable region. This means that there are no longer
any calls to vect_stmt_in_region_p.
2018-07-24 Richard Sandiford
This patch removes the stmt_vec_info wrapper class added near the
beginning of the series and turns stmt_vec_info back into a typedef.
2018-07-24 Richard Sandiford
gcc/
* tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
(NULL_STMT_VEC_INFO): Delete
r262589 introduced another instance of the bug fixed in r258131.
Tested on aarch64-linux-gnu and applied as obvious.
Richard
2018-07-24 Richard Sandiford
gcc/
PR tree-optimization/86618
* tree-vect-stmts.c (vectorizable_call): Don't take the address
<< ceil_log2 (precision);
return MAX (precision, BITS_PER_UNIT);
}
ceil_log2 (0) returned 64 rather than 0, leading to 1 << 64, which is UB.
Tested on aarch64-linux-gnu, aarch64_be-elf and x86_64-linux-gnu.
OK to install?
Richard
2018-07-24 Richard Sandiford
gcc/
* hwint.
Richard Biener writes:
> On Tue, Jul 24, 2018 at 11:58 AM Richard Sandiford
> wrote:
>>
>> This patch changes STMT_VINFO_VEC_STMT from a gimple stmt to a
>> stmt_vec_info and makes the vectorizable_* routines pass back
>> a stmt_vec_info to vect_transform_stmt.
Richard Biener writes:
> On Tue, Jul 24, 2018 at 12:07 PM Richard Sandiford
> wrote:
>>
>> This patch adds a pattern_stmt_p field to stmt_vec_info, so that it's
>> possible to tell whether the statement is a pattern statement without
>> referring to other stat
Richard Biener writes:
> On Tue, Jul 24, 2018 at 12:08 PM Richard Sandiford
> wrote:
>>
>> This patch makes various routines (mostly in tree-vect-data-refs.c)
>> take stmt_vec_infos rather than data_references. The affected routines
>> are really dealing with the
Richard Biener writes:
> On Wed, Jul 25, 2018 at 1:09 PM Richard Sandiford
> wrote:
>>
>> Richard Biener writes:
>> > On Tue, Jul 24, 2018 at 12:07 PM Richard Sandiford
>> > wrote:
>> >>
>> >> This patch adds a pattern_stmt_p field t
Richard Biener writes:
> On Tue, Jul 24, 2018 at 12:08 PM Richard Sandiford
> wrote:
>>
>> Alignment information is really a property of a stmt_vec_info
>> (and the way we want to vectorise it) rather than the original scalar dr.
>> I think that was true eve
Richard Sandiford writes:
> Richard Biener writes:
>> On Tue, Jul 24, 2018 at 12:08 PM Richard Sandiford
>> wrote:
>>>
>>> This patch makes various routines (mostly in tree-vect-data-refs.c)
>>> take stmt_vec_infos rather than data_references. The aff
[Updated after new 37/46 and 38/46]
After previous changes, it makes more sense for STMT_VINFO_UNALIGNED_DR
to be dr_vec_info rather than a data_reference.
2018-07-26 Richard Sandiford
gcc/
* tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
dr_vec_info
[Updated after new 37/46 and 38/46. 41 onwards are unaffected.]
This patch replaces DR_VECT_AUX and vect_dr_stmt with a new
vec_info::lookup_dr function, so that the lookup is relative
to a particular vec_info rather than to global state.
2018-07-26 Richard Sandiford
gcc/
* tree
In r262961 I only updated the out-of-line copy of ceil_log2. This patch
applies the same change to the other (inline) one.
Tested on aarch64-linux-gnu and x86_64-linux-gnu. Applied as obvious.
Richard
2018-07-30 Richard Sandiford
gcc/
* hwint.h (ceil_log2): Resync with hwint.c
This series puts the statements that need to be vectorised into a
"vec_basic_block" structure of linked stmt_vec_infos, and then puts
pattern statements into this block rather than hanging them off the
original scalar statement.
Partly this is clean-up, since making pattern statements more like
fi
vect_transform_loop used to call vect_schedule_slp lazily when it
came across the first SLP statement, but it seems easier to do it
before the main loop.
2018-07-30 Richard Sandiford
gcc/
* tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
argument
Nothing now uses the vect_schedule_slp return value, so it's not worth
propagating the value through vect_schedule_slp_instance.
2018-07-30 Richard Sandiford
gcc/
* tree-vectorizer.h (vect_schedule_slp): Return void.
* tree-vect-slp.c (vect_schedule_slp_instance): Lik
Nothing now uses the grouped_store value passed back by
vect_transform_stmt, so we might as well remove it.
2018-07-30 Richard Sandiford
gcc/
* tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
argument.
* tree-vect-stmts.c (vect_transform_stmt): Likewise
This patch just adds a helper function for going from a potential
pattern statement to the original scalar statement.
2018-07-30 Richard Sandiford
gcc/
* tree-vectorizer.h (vect_orig_stmt): New function.
* tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it
pattern statements if appropriate.
2018-07-30 Richard Sandiford
gcc/
* tree-vectorizer.h (vect_stmt_to_vectorize): New function.
* tree-vect-loop.c (vect_update_vf_for_slp): Use it.
(vectorizable_reduction): Likewise.
* tree-vect-slp.c (vect_analyze_slp_instance
sue.
Richi's suggestion of using a vector of vector statements would
let us reuse one statement for all copies.
2018-07-30 Richard Sandiford
gcc/
* tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
parameter.
* tree-vect-data-refs.c (vect_create_data_ref_ptr)
Richard Sandiford
gcc/
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
result of dfs_enumerate_from when constructing stmt_vec_infos,
instead of additionally calling get_loop_body.
Index: gcc/tree-vect-loop.c
ng in its own right,
but it's a prerequisite for the next patch, which needs to update
the stmt_vec_infos of the hoisted statements.
2018-07-30 Richard Sandiford
gcc/
* tree-vect-stmts.c (hoist_defs_of_uses): Use vec_info::lookup_def
instead of gimple_nop_p and flow_b
of phis specially, and code
that does can still do so. Having a single list simplifies code that
wants to look at every scalar phi or stmt in isolation.
2018-07-30 Richard Sandiford
gcc/
* tree-vectorizer.h (vec_basic_block): New structure.
(vec_info::blocks, _stmt_vec_info::bl
ng the few
cases in which the vector code needs part of the original scalar code
to be kept around.
2018-07-30 Richard Sandiford
gcc/
* tree-vectorizer.h (_stmt_vec_info::used_by_vector_code_p): New
member variable.
(vect_mark_used_by_vector_code
The point of this patch is to put pattern statements in the same
vec_basic_block as the statements they replace, with the pattern
statements for S coming between S and S's original predecessor.
This removes the need to handle them specially in various places.
2018-07-30 Richard Sandiford
[Sorry, somehow missed this till now]
Richard Biener writes:
> On Mon, Jul 23, 2018 at 5:05 PM Richard Sandiford
> wrote:
>>
>> Marc Glisse writes:
>> > On Fri, 20 Jul 2018, Richard Sandiford wrote:
>> >
>> >> --- gcc/match.pd 2018-07-18
Christophe Lyon writes:
> On Mon, 30 Jul 2018 at 18:09, Segher Boessenkool
> wrote:
>>
>> On Tue, Jul 24, 2018 at 05:18:41PM +, Segher Boessenkool wrote:
>> > This patch allows combine to combine two insns into two. This helps
>> > in many cases, by reducing instruction path length, and also
Richard Biener writes:
> On Tue, Jul 24, 2018 at 12:01 PM Richard Sandiford
> wrote:
>>
>> This patch changes SLP_TREE_SCALAR_STMTS from a vec to
>> a vec. It's longer than the previous conversions
>> but mostly mechanical.
>
> OK. I don't remembe
Hi,
Thanks for submitting the patch.
Bogdan Harjoc writes:
> With fresh git sources and contrib/gcc_update the tests pass:
>
> === gcc Summary ===
>
> # of expected passes 133500
> # of expected failures 422
> # of unsupported tests 2104
>
> gcc-build/gcc/xgcc version 9.0.0 20180730 (experiment
-linux-gnu (with and without SVE), aarch64_be-elf
and x86_64-linux-gnu. OK to install?
Richard
2018-08-01 Richard Sandiford
gcc/
PR tree-optimization/86749
* tree-vect-patterns.c (vect_determine_min_output_precision_1):
If the lhs is used in a COND_EXPR, check t
independently of the rest of the series.
Sorry for the breakage. It looks like I compared the x86 results
with the wrong baseline. :-(
Tested on aarch64-linux-gnu (with and without SVE), aarch64_be-elf
and x86_64-linux-gnu. OK to install?
Richard
2018-08-01 Richard Sandiford
gcc
Richard Biener writes:
> On Mon, Jul 30, 2018 at 7:47 PM Richard Sandiford
> wrote:
>>
>> [Sorry, somehow missed this till now]
>>
>> Richard Biener writes:
>> > On Mon, Jul 23, 2018 at 5:05 PM Richard Sandiford
>> > wrote:
>> >>
>
Marc Glisse writes:
> On Tue, 31 Jul 2018, Richard Biener wrote:
>
Also, when @2 == @0 + (@1+1) then the original condition is true but
((sizetype) @0 - (sizetype) @2 + @1) > (@1 * 2) is not?
(sizetype) @0 - (sizetype) (@0 + @1 + 1) + @1 > @1 * 2
-> -1 > @1 * 2
whi
Manolis Tsamis writes:
> This is an extension of what was done in PR106590.
>
> Currently if a sequence generated in noce_convert_multiple_sets clobbers the
> condition rtx (cc_cmp or rev_cc_cmp) then only seq1 is used afterwards
> (sequences that emit the comparison itself). Since this applies on
Manolis Tsamis writes:
> Currently the operations allowed for if conversion of a basic block with
> multiple sets are few, namely REG, SUBREG and CONST_INT (as controlled by
> bb_ok_for_noce_convert_multiple_sets).
>
> This commit allows more operations (arithmetic, compare, etc) to participate
>
Tamar Christina writes:
> Hi All,
>
> copysign (x, -1) is effectively fneg (abs (x)) which on AArch64 can be
> most efficiently done by doing an OR of the signbit.
>
> The middle-end will optimize fneg (abs (x)) now to copysign as the
> canonical form and so this optimizes the expansion.
>
> If th
Tamar Christina writes:
> Hi All,
>
> This adds an implementation for masked copysign along with an optimized
> pattern for masked copysign (x, -1).
>
> Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.
>
> Ok for master?
>
> Thanks,
> Tamar
>
> gcc/ChangeLog:
>
> PR tree-optim
"Kewen.Lin" writes:
> Hi,
>
> As comments[1][2], this patch is to change the costing way
> on some adjacent vector loads/stores from costing one by
> one to costing them together with the total number once.
>
> It helps to fix the exposed regression PR111784 on aarch64,
> as aarch64 specific costi
"juzhe.zh...@rivai.ai" writes:
> Hi, this patch fix V4 issue:
>
> Previously as Richard S commented:
> https://gcc.gnu.org/pipermail/gcc-patches/2023-October/633178.html
>
> slp_op and mask_vectype are only initialised when mask_index >= 0.
> Shouldn't this code be under mask_index >= 0 too?
> Al
HAO CHEN GUI writes:
> Hi,
> Vector mode instructions are efficient for compare on some targets.
> This patch enables vector mode for compare_by_pieces. Two help
> functions are added to check if vector mode is available for certain
> by pieces operations and if if optabs exists for the mode and
Thanks for the context.
Robin Dapp writes:
>> Sorry for the slow review. TBH I was hoping someone else would pick
>> it up, since (a) I'm not very familiar with this code, and (b) I don't
>> really agree with the way that the current code works. I'm not sure the
>> current dependency checking i
Alex Coplan writes:
> Hi,
>
> This patch tweaks change_insns to also call ::remove_insn to ensure the
> underlying RTL insn gets removed from the insn chain in the case of a
> deletion.
>
> This avoids leaving NOTE_INSN_DELETED around after deleting insns.
>
> For movement, the RTL insn chain is u
Andrew Pinski writes:
> After r14-3110-g7fb65f10285, the canonical form for
> `a ? ~b : b` changed to be `-(a) ^ b` that means
> for aarch64 we need to add a few new insn patterns
> to be able to catch this and change it to be
> what is the canonical form for the aarch64 backend.
> A secondary pat
Richard Earnshaw writes:
> On 20/10/2023 13:13, Richard Sandiford wrote:
>>> +(define_insn_and_split "*cmov_insn_insv"
>>> + [(set (match_operand:GPI 0 "register_operand" "=r")
>>> +(xor:GPI
>>> +
The non-LSE pattern aarch64_atomic_exchange comes before the
LSE pattern aarch64_atomic_exchange_lse. From a recog
perspective, the only difference between the patterns is that
the non-LSE one clobbers CC and needs a scratch.
However, combine and RTL-SSA can both add clobbers to make a
pattern ma
This patch adds a bare-bones TARGET_INSN_COST. See the comment
in the patch for the rationale.
This change is needed to avoid a regression with a later change.
Tested on aarch64-linux-gnu & pushed.
Richard
gcc/
* config/aarch64/aarch64.cc (aarch64_insn_cost): New function.
(TA
I hit an ICE in aeswidekl_operation while testing the late-combine
pass on x86. The predicate tested REGNO without first testing REG_P.
Tested on x86_64-linux-gnu & pushed as obvious.
Richard
gcc/
* config/i386/predicates.md (aeswidekl_operation): Protect
REGNO check with REG_P
For the V2HI -> V2SI zero extension in:
typedef unsigned short v2hi __attribute__((vector_size(4)));
typedef unsigned int v2si __attribute__((vector_size(8)));
v2si f (v2hi x) { return (v2si) {x[0], x[1]}; }
ix86_expand_sse_extend would generate:
(set (reg:V2HI 102)
(const_vecto
The files changed in this patch had tests for masked and unmasked
popcnt. However, the mask inputs to the masked forms were undefined,
and would be set to zero by init_regs. Any combine-like pass that
ran after init_regs could then fold the masked forms into the
unmasked ones. I saw this while t
reload and constrain_operands had some old code to look through unary
operators. E.g. an operand could be (sign_extend (reg X)), and the
constraints would match the reg rather than the sign_extend.
This was previously used by the MIPS port. But relying on it was a
recurring source of problems, s
An inline asm with multiple output operands is represented as a
parallel set in which the SET_SRCs are the same (shared) ASM_OPERANDS.
insn_propgation didn't account for this, and instead propagated
into each ASM_OPERANDS individually. This meant that it could
apply a substitution X->Y to Y itself
This series contains some small fixes to RTL-SSA. Tested on
aarch64-linux-gnu & x86_64-linux-gnu, pushed as obvious.
Richard Sandiford (4):
rtl-ssa: Fix null deref in first_any_insn_use
rtl-ssa: Fix handling of deleted insns
rtl-ssa: Don't insert after insns that can throw
rtl-s
first_any_insn_use implicitly (but contrary to its documentation)
assumed that there was at least one use.
gcc/
* rtl-ssa/member-fns.inl (first_any_insn_use): Handle null
m_first_use.
---
gcc/rtl-ssa/member-fns.inl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
If make_uses_available was called twice for the same use,
we could end up trying to create duplicate definitions for
the same extended live range.
gcc/
* rtl-ssa/blocks.cc (function_info::create_degenerate_phi): Check
whether the requested phi already exists.
---
gcc/rtl-ssa/block
rtl_ssa::can_insert_after didn't handle insns that can throw.
Fixing that avoids a regression with a later patch.
gcc/
* rtl-ssa.h: Include cfgbuild.h.
* rtl-ssa/movement.h (can_insert_after): Replace is_jump with the
more comprehensive control_flow_insn_p.
---
gcc/rtl-ssa
RTL-SSA queues up some invasive changes for later. But sometimes
the insns involved in those changes can be deleted by later
optimisations, making the queued change unnecessary. This patch
checks for that case.
gcc/
* rtl-ssa/changes.cc (function_info::perform_pending_updates): Check
RTL-SSA mostly relies on DF for block-level register liveness
information, including artificial uses and defs at the beginning
and end of blocks. But one case was missing. DF does not add
artificial uses of global registers to the beginning or end
of a block. Instead it marks them as used within
Testing the late-combine pass showed a depressing number of
bugs in areas of RTL-SSA that hadn't been used much until now.
Most of them relate to doing things after RA.
Tested on aarch64-linux-gnu & x86_64-linux-gnu. OK to install?
Richard
Richard Sandiford (6):
rtl-ssa: Ensu
101 - 200 of 9415 matches
Mail list logo