The code with an intermediate register is perfectly fine, but LRA
apparently cannot handle the resulting code, or perhaps something else
is wrong. In either case, making an extra temporary will not likely
help here, so let's just skip it.
PR rtl-optimization/87871
* combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
From-SVN: r265821
This re-applies r258525, and this time adds it to LOCAL_PATCHES.
libsanitizer/
* LOCAL_PATCHES: Add r258525.
* sanitizer_common/sanitizer_stacktrace.cc
(BufferedStackTrace::FastUnwindStack): Use the correct frame offset
for PowerPC SYSV ABI.
From-SVN: r265817
This increases the move costs for moves involving the CC
register which saves us some instructions in SPEC CPU2006.
gcc/ChangeLog:
2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
* config/s390/s390.c (s390_register_move_cost): Increase costs for
moves involving the CC reg.
From-SVN: r265814
RTL output now includes column numbers in addition to line numbers,
like this:
"gcc/testsuite/gcc.target/s390/md/andc-splitter-1.c":16:1
This confuses some S/390 tests.
gcc/testsuite/ChangeLog:
2018-11-05 Ilya Leoshkevich <iii@linux.ibm.com>
* gcc.target/s390/md/andc-splitter-1.c: Add colon to
expectations.
* gcc.target/s390/md/andc-splitter-2.c: Likewise.
* gcc.target/s390/md/setmem_long-1.c: Likewise.
From-SVN: r265813
2018-11-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/87873
* tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
argument.
* tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
* tree-vect-loop.c (vect_transform_loop): When splitting the
loop exit also create forwarder PHIs for constants.
* tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
Handle constant to_arg, add extra checking we match up the correct
PHIs.
* gcc.dg/pr87873.c: New testcase.
From-SVN: r265812
This adds QImode and HImode support to load on condition.
gcc/ChangeLog:
2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
* config/s390/s390.md: QImode and HImode for load on condition.
gcc/testsuite/ChangeLog:
2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
* gcc.target/s390/ifcvt-one-insn-bool.c: New test.
* gcc.target/s390/ifcvt-one-insn-char.c: New test.
From-SVN: r265808
This allows immediate operands for load on condition.
gcc/ChangeLog:
2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
* config/s390/predicates.md: Fix typo.
* config/s390/s390.md: Allow immediates for load on condition.
gcc/testsuite/ChangeLog:
2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
* gcc.dg/loop-8.c: On s390, always run the test with -march=zEC12.
From-SVN: r265804
PR tree-optimization/87859
* gimple-ssa-store-merging.c (struct merged_store_group): Add
only_constants and first_nonmergeable_order members.
(merged_store_group::merged_store_group): Initialize them.
(merged_store_group::do_merge): Clear only_constants member if
adding something other than INTEGER_CST store.
(imm_store_chain_info::coalesce_immediate_stores): Don't merge
stores with order >= first_nonmergeable_order. Use
merged_store->only_constants instead of always recomputing it.
Set merged_store->first_nonmergeable_order if we've skipped any
stores. Attempt to merge overlapping INTEGER_CST stores that
we would otherwise skip.
* gcc.dg/store_merging_24.c: New test.
* gcc.dg/store_merging_25.c: New test.
From-SVN: r265794
2018-11-05 Richard Biener <rguenther@suse.de>
PR rtl-optimization/87852
* fwprop.c (use_killed_between): Only consider single-defs of the
use whose definition statement dominates the use.
From-SVN: r265791
Implementing the UDL changes was pretty straightforward; I simplified
cp_parser_userdef_string_literal using the releasing_vec type from mangle.c.
While looking at this, I realized that the string UDL template taking a
character pack that we implemented for C++14 didn't actually make it into
C++14, so I've added a pedwarn for it and no longer suggest it in the
diagnostic about an invalid UDL template.
* cp-tree.h (struct releasing_vec): Move from mangle.c.
Add get_ref method.
* parser.c (cp_parser_userdef_string_literal): Use it. Handle
passing the string to a single template parameter of class type.
(cp_parser_template_declaration_after_parameters): Allow it.
Pedwarn about the character pack template that was proposed but not
accepted for C++14, and don't suggest it.
From-SVN: r265790
There is one significant piece of this that is not implemented yet: the
reliance on defaulted operator<=>, which someone else has been working on.
So, for the moment those lines are commented out of the testcases.
One tricky bit was treating template parameters of classtype as const
lvalues without making their decltype const; for this I used a
VIEW_CONVERT_EXPR wrapper, which previously could only appear in templates
as location wrappers.
The user-defined literal parts of P0732R2 are in the next patch.
gcc/cp/
* error.c (dump_simple_decl): Look through a template parm object.
* mangle.c (write_template_arg): Likewise.
(mangle_template_parm_object): New.
* pt.c (template_parm_object_p, get_template_parm_object): New.
(invalid_tparm_referent_p): Factor from convert_nontype_argument.
(convert_nontype_argument, invalid_nontype_parm_type_p): Handle
class-type template arguments.
* tree.c (lvalue_kind): Likewise.
gcc/c-family/
* c-cppbuiltin.c (c_cpp_builtins): Add
__cpp_nontype_template_parameter_class.
libiberty/
* cp-demangle.c (d_dump, d_make_comp, d_count_templates_scopes)
(d_print_comp_inner): Handle DEMANGLE_COMPONENT_TPARM_OBJ.
(d_special_name): Handle TA.
(d_expresion_1): Fix demangling of brace-enclosed initializer list.
include/
* demangle.h (enum demangle_component_type): Add
DEMANGLE_COMPONENT_TPARM_OBJ.
From-SVN: r265789
The initialized_type hunk fixes handling of void AGGR_INIT_EXPRs that call a
non-constructor; an AGGR_INIT_EXPR can have void type if its initialization
semantics are more complicated than just expanding the call.
The cxx_eval_vec_init_1 hunk corrects AGGR_INIT_EXPRs that were
nonsensically built to initialize an object of void type. And the
build_aggr_init_expr hunk makes sure we don't do that again.
The ocp_convert and cxx_eval_outermost_constant_expr hunks deal with making
sure that a constant CONSTRUCTOR has the right type.
* cvt.c (ocp_convert): Don't wrap a CONSTRUCTOR in a NOP_EXPR.
* constexpr.c (initialized_type): Fix AGGR_INIT_EXPR handling.
(cxx_eval_vec_init_1): Correct type of AGGR_INIT_EXPR.
(cxx_eval_outermost_constant_expr): Make sure a CONSTRUCTOR has the
right type. Don't wrap a CONSTRUCTOR if one was passed in.
* tree.c (build_aggr_init_expr): Check for void.
From-SVN: r265788
This patch fixes two issues with lambda attribute handling: First, it was in
the wrong place in the grammar. Second, it was treating attributes as
applying to the whole declaration rather than to the function type, as
specified by the standard.
* parser.c (cp_parser_lambda_declarator_opt): Fix attribute
handling.
From-SVN: r265787
2018-11-05 Martin Liska <mliska@suse.cz>
PR c/87811
* predict.c (expr_expected_value_1): Verify
that last argument is a real constants and emit
error.
2018-11-05 Martin Liska <mliska@suse.cz>
PR c/87811
* gcc.dg/pr87811.c: New test.
* gcc.dg/pr87811-2.c: Likewise.
* gcc.dg/pr87811-3.c: Likewise.
2018-11-05 Martin Liska <mliska@suse.cz>
PR c/87811
* doc/extend.texi: Update constrain about the last argument
of __builtin_expect_with_probability.
From-SVN: r265785
PR middle-end/58372
* cfgexpand.c (pass_expand::execute): Move the call to
finish_eh_generation in front of the call to expand_stack_alignment.
testsuite/ChangeLog:
PR middle-end/58372
* g++.target/i386/pr58372.C: New test.
From-SVN: r265776
Although there's no fundamental reason why shrink wrapping and
speculation tracking are incompatible, a phase-ordering requirement
(we need to do speculation tracking before the final basic block
clean-up) means that the shrink wrapping pass can undo some of the
changes the speculation tracking pass makes. The result is that the
tracking, while still safe is less comprehensive than we really want.
So to keep things simple, and because the tracking code is quite
expensive anyway, it seems best to just disable that pass when we are
tracking speculative execution.
* config/aarch64/aarch64.c (aarch64_override_options): Disable
shrink-wrapping when -mtrack-speculation.
From-SVN: r265747
2018-11-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/87776
* tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
executable when iterating but running into rpo-vn-max-loop-depth
and not eliding the iteration.
* gcc.dg/torture/pr87776.c: New testcase.
From-SVN: r265739