This removes the Y constraint from the tabort pattern definition. In
this case it is easier without using substitutions.
gcc/ChangeLog:
2016-03-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.md ("*tabort_1"): Change predicate to
nonmemory_operand. Add a second alternative to cover
register as well as const int operands.
("*tabort_1_plus"): New pattern definition.
From-SVN: r233846
patterns.
The arithmetic shift patterns set also the condition code. This adds
more substitution potential. Depending on whether the actual result
or the CC output will be used 3 different variants of each of these
patterns are needed. This multiplied with the PLUS and the AND
operands from the earlier substitutions enables a lot of folding.
2016-03-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.md ("*ashrdi3_cc_31")
("*ashrdi3_cconly_31""*ashrdi3_cc_31_and")
("*ashrdi3_cconly_31_and", "*ashrdi3_31_and", "*ashrdi3_31"):
Merge insn definitions into ...
("*ashrdi3_31<addr_style_op_cc><masked_op_cc><setcc><cconly>"):
New pattern definition.
("*ashr<mode>3_cc", "*ashr<mode>3_cconly", "ashr<mode>3", )
("*ashr<mode>3_cc_and", "*ashr<mode>3_cconly_and")
("*ashr<mode>3_and"): Merge insn definitions into ...
("*ashr<mode>3<addr_style_op_cc><masked_op_cc><setcc><cconly>"):
New pattern definition.
* config/s390/subst.md ("addr_style_op_cc_subst")
("masked_op_cc_subst", "setcc_subst", "cconly_subst"): New
substitutions patterns plus attributes.
Add ashiftrt to SUBST iterator.
From-SVN: r233845
shift patterns.
With this patch the substitution patterns added earlier are used for
the logical right shift and all the left shift patterns.
2016-03-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.md ("<shift><mode>3"): Change predicate of
op2 to nonmemory_operand.
("*<shift>di3_31", "*<shift>di3_31_and"):
Merge into single pattern definition ...
("*<shift>di3_31<addr_style_op><masked_op>"): New pattern.
("*<shift><mode>3", "*<shift><mode>3_and"): Merge into single
pattern definition ...
("*<shift><mode>3<addr_style_op><masked_op>"): New pattern.
* config/s390/subst.md: Add ashift and lshiftrt to SUBST
iterator.
From-SVN: r233844
This patch introduces substitution patterns to add PLUS const_int, and
AND operands to patterns and uses this to rewrite the existing rotate
pattern.
gcc/ChangeLog:
2016-03-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/predicates.md (const_int_6bitset_operand): New
predicates.
* config/s390/s390.md: Include subst.md.
("rotl<mode>3"): New expander.
("rotl<mode>3", "*rotl<mode>3_and"): Merge insn definitions into
...
("*rotl<mode>3<addr_style_op><masked_op>"): New insn definition.
* config/s390/subst.md: New file.
From-SVN: r233843
alternatives.
So far whenever we wanted to disable an alternative we have used mode
attributes emitting constraints matching an earlier alternative
assuming that due to this the later alternative will never be chosen.
With this patch the `enabled' attribute, which so far is only set from
`cpu_facility', is overridden to 0 to disable certain alternatives.
This comes handy when defining the substitutions later and while
adding it anyway I've used it for the existing cases as well.
gcc/ChangeLog:
2016-03-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.md ("op_type", "atype", "length" attributes):
Remove RRR type. It doesn't really exist.
("RRer", "f0", "v0", "vf", "vd", "op1", "Rf"): Remove mode
attributes.
("BFP", "DFP", "nDSF", "nDFDI"): Add mode attributes.
("*cmp<mode>_ccs", "floatdi<mode>2", "add<mode>3")
("*add<mode>3_cc", "*add<mode>3_cconly", "sub<mode>3")
("*sub<mode>3_cc", "*sub<mode>3_cconly", "mul<mode>3")
("fma<mode>4", "fms<mode>4", "div<mode>3", "*neg<mode>2")
("*abs<mode>2", "*negabs<mode>2", "sqrt<mode>2"): Override
`enabled' attribute.
From-SVN: r233842
When processing substitutions the operands are renumbered. To find a
free operand number the array used_operands_numbers is used.
Currently this array is used to assign new numbers before all the
RTXes in the vector have been processed. I did run into problems with
this for insns where a match_dup occurred in a later (use ...) operand
referring to an earlier operand (e.g. s390.md "setmem_long").
The patch splits the loop doing the processing into two in order to
have all the operand numbers collected already when assigning new
numbers.
gcc/ChangeLog:
2016-03-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gensupport.c (process_substs_on_one_elem): Split loop to
complete mark_operands_used_in_match_dup on all expressions in the
vector first.
(adjust_operands_numbers): Inline into process_substs_on_one_elem
and remove function.
From-SVN: r233841
gcc/testsuite/ChangeLog:
PR preprocessor/69985
* gcc.dg/cpp/pr69985.c: New test case.
libcpp/ChangeLog:
PR preprocessor/69985
(linemap_position_for_loc_and_offset): Rename param from "offset"
to "column_offset". Right-shift the column_offset by m_range_bits
of the pertinent ordinary map whenever offsetting a
source_location. For clarity, offset the column by the column
offset, rather than the other way around.
From-SVN: r233836
PR tree-optimization/70005
* tree-ssa-uncprop.c (associate_equivalences_with_edges): Handle case
where an object with a boolean range is compared against a value
outside [0..1].
PR tree-optimization/70005
* gcc.c-torture/execute/pr70005.c New test.
From-SVN: r233829
PR tree-optimization/69999
* gimple-ssa-split-paths.c (split_paths): When duplicating a block
with an outgoing edge marked with EDGE_IRREDUCIBLE_LOOP, schedule
loop cleanups.
PR tree-optimization/69999
* gcc.c-torture/compile/pr69999.c: New test.
From-SVN: r233824
2016-02-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/69994
* tree-ssa-reassoc.c (gimple_nop_conversion_p): New function.
(get_unary_op): Look through nop conversions.
(ops_equal_values_p): New function, look for equality diregarding
nop conversions.
(eliminate_plus_minus_pair): Use ops_equal_values_p
(repropagate_negates): Do not use get_unary_op here.
From-SVN: r233816
* hsa-gen.c (gen_body_from_gimple): Dump only if TDF_DETAILS
is presented in dump flags.
* hsa-regalloc.c (linear_scan_regalloc): Likewise.
(hsa_regalloc): Likewise.
From-SVN: r233814
2016-02-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/69980
* tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Update
permutation of those we need to keep.
* gfortran.dg/vect/pr69980.f90: New testcase.
From-SVN: r233809
PR target/69706
* config/sparc/sparc.c (ROUND_ADVANCE): Rename to...
(NWORDS_UP): ...this
(init_cumulative_args): Minor tweaks.
(sparc_promote_function_mode): Likewise.
(scan_record_type): Delete.
(traverse_record_type): New function template.
(classify_data_t): New structure type.
(classify_registers): New inline function.
(function_arg_slotno): In 64-bit mode, bail out early if FP slots are
exhausted. Instantiate traverse_record_type on classify_registers and
deal with the case of a structure passed in slot #15 with no FP field
in the first word.
(assign_data_t): New structure type.
(compute_int_layout): New static function.
(compute_fp_layout): Likewise.
(count_registers): New inline function.
(assign_int_registers): New static function.
(assign_fp_registers): Likewise.
(assign_registers): New inline function.
(function_arg_record_value_1): Delete.
(function_arg_record_value_2): Likewise.
(function_arg_record_value_3): Likewise.
(function_arg_record_value): Adjust to above changes. Instantiate
traverse_record_type on count_registers to first count the number of
registers to be used and then on assign_registers to assign them.
(function_arg_union_value): Adjust to above renaming.
(sparc_function_arg_1); Minor tweaks. Remove commented out code.
(sparc_arg_partial_bytes): Adjust to above renaming. Deal with the
case of a structure passed in slot #15
(sparc_function_arg_advance): Likewise.
(function_arg_padding): Minor tweak.
From-SVN: r233808
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
handling of unconstrained array types as designated types into common
processing. Also handle array types as incomplete designated types.
From-SVN: r233807
* gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
(build_return_expr): Likewise.
(Call_to_gnu): If this is a function call and there is no target,
create a temporary for the return value for all aggregate types,
but never create it for a return statement. Push a binding level
around the call in more cases. Remove obsolete code.
From-SVN: r233805
* gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
* gcc-interface/gigi.h (gigi): Remove useless attribute.
(gnat_gimplify_expr): Likewise.
(gnat_to_gnu_external): Declare.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
code dealing with the expression of external constants into...
Invoke gnat_to_gnu_external instead.
<E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
when not for a definition. Deal with COMPOUND_EXPR and variables with
DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
'reference to a function call in a renaming. Remove obsolete test and
adjust associated comment.
* gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
temporaries created to hold the return value, if any.
(gnat_to_gnu_external): ...this. New function.
* gcc-interface/utils.c (create_var_decl): Detect a constant created
to hold 'reference to function call.
* gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
From-SVN: r233804
2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
* dump-parse-tree.c (show_code_node): Print association
list of a block if present. Handle EXEC_END_BLOCK.
From-SVN: r233796
2016-02-28 Harald Anlauf <anlauf@gmx.de>
Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/56007
* match.c (gfc_match_iterator): Add diagnostic for array variable
as do loop index.
* gfortran.dg/coarray_8.f90: Adjust error message.
* gfortran.dg/pr56007.f90: New test.
* gfortran.dg/pr56007.f: New test.
Co-Authored-By: Jerry DeLisle <jvdelisle@gcc.gnu.org>
From-SVN: r233795
2016-02-26 Richard Biener <rguenther@suse.de>
Jeff Law <law@redhat.com>
PR tree-optimization/69740
* cfghooks.c (remove_edge): Request loop fixups if we delete
an edge that might turn an irreducible loop into a natural
loop.
Revert
2016-02-26 Richard Biener <rguenther@suse.de>
Jeff Law <law@redhat.com>
PR tree-optimization/69740
* gcc.c-torture/compile/pr69740-1.c: New test.
* gcc.c-torture/compile/pr69740-2.c: New test.
From-SVN: r233787
2016-02-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69110
* io.c (gfc_match_open): Check that open status is an expression
constant before comparing string to 'scratch' with NEWUNIT.
* gfortran.dg/newunit_4.f90: New test.
Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>
From-SVN: r233782
gcc/
* config/aarch64/aarch64-protos.h (aarch64_emit_swrsqrt): Rename
function to "aarch64_emit_approx_rsqrt".
* config/aarch64/aarch64-tuning-flags.def: Rename tuning flag to
AARCH64_EXTRA_TUNE_APPROX_RSQRT.
* config/aarch64/aarch64.c (exynosm1_tunigs): Use new flag name.
(xgene1_tunings): Likewise.
(use_rsqrt_p): Likewise.
(aarch64_emit_swrsqrt): Use new function name.
* config/aarch64/aarch64-simd.md (aarch64_rsqrts_*): Likewise.
* config/aarch64/aarch64.opt (mlow-precision-recip-sqrt): Reword the
text explaining this option.
* doc/invoke.texi (-mlow-precision-recip-sqrt): Likewise.
From-SVN: r233772
PR tree-optimization/15826 - don't use "if" to extract a single bit
bit-field
2016-02-26 Martin Sebor <msebor@redhat.com>
PR tree-optimization/15826
* gcc.dg/tree-ssa/pr15826.c: New test.
From-SVN: r233771
PR target/69969
* config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
complain about -mallow-movmisalign without -mvsx if
TARGET_ALLOW_MOVMISALIGN was not set explicitly.
* gcc.target/powerpc/pr69969.c: New test.
From-SVN: r233767