2019-04-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/90020
* tree-ssa-sccvn.c (vn_reference_may_trap): New function.
* tree-ssa-sccvn.h (vn_reference_may_trap): Declare.
* tree-ssa-pre.c (compute_avail): Use it to not put
possibly trapping references after a call that might not
return into EXP_GEN.
* gcse.c (compute_hash_table_work): Do not elide
marking a block containing a call if the call might not
return.
* gcc.dg/torture/pr90020.c: New testcase.
From-SVN: r270275
2019-04-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/90018
* tree-vect-data-refs.c (vect_preserves_scalar_order_p):
Test both SLP and interleaving variants.
* gcc.dg/vect/pr90018.c: New testcase.
From-SVN: r270273
2018-04-10 Steve Ellcey <sellcey@marvell.com>
PR rtl-optimization/87763
* gcc.target/aarch64/combine_bfxil.c: Change some bfxil checks
to bfi.
* gcc.target/aarch64/combine_bfi_2.c: New test.
From-SVN: r270267
* doc/xml/faq.xml: Add information about emergency EH pool.
* doc/xml/manual/debug.xml: Update list of memory debugging tools.
Move outdated information on mt_allocator to a separate section.
* doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
doesn't affect the default allocator.
From-SVN: r270264
PR 89394
* cp-demangle.c (cplus_demangle_fill_name): Reject negative
lengths.
(d_count_templates_scopes): Replace num_templates and num_scopes
parameters with a struct d_print_info pointer parameter. Adjust
body of the function accordingly. Add recursion counter and check
that the recursion limit is not reached.
(d_print_init): Pass dpi parameter to d_count_templates_scopes.
Reset recursion counter afterwards, unless the recursion limit was
reached.
From-SVN: r270258
This copies the wording from the -O options to clearly state what
happens if more than one -g option is used.
* doc/invoke.texi (Debugging Options): Explicitly state the semantics
of using multiple -g options.
From-SVN: r270257
Add a test for the regression introduced with r269422 and fixed with
r270056.
PR libstdc++/89851
* testsuite/20_util/variant/89851.cc: New test.
From-SVN: r270249
'to N' is now redundant and misleading given the earlier change to use
<number>.
Removed.
PR target/90016
* config/aarch64/aarch64.opt (msve-vector-bits): Remove redundant and
obsolete reference to N.
From-SVN: r270248
PR middle-end/90025
* expr.c (store_expr): Set properly size on the MEM passed to
clear_storage.
* gcc.c-torture/execute/pr90025.c: New test.
From-SVN: r270247
PR c++/90010
* gimple-ssa-sprintf.c (target_to_host): Fix handling of targstr
with strlen in between hostsz-3 and hostsz-1 inclusive when no
translation is needed, and when translation is needed, only append
... if the string length is hostsz or more bytes long. Avoid using
strncpy or strcat.
* gcc.dg/pr90010.c: New test.
From-SVN: r270246
* include/std/variant: Adjust whitespace. Add comments.
(_Multi_array): Leave primary template undefined.
(_Multi_array<_Tp>): Define partial specialization for base case of
recursion.
(__gen_vtable_impl, __gen_vtable): Remove redundant && from type
which is always a reference.
(__gen_vtable::_S_apply()): Remove function, inline body into
default member initializer.
* testsuite/20_util/variant/visit.cc: Test with noncopyable types.
From-SVN: r270238
The __visitor_result_type helper didn't use std::invoke and so didn't
compile when the visitor was a pointer-to-member rather than a function
object. Use std::invoke_result instead.
* include/std/variant (__variant_idx_cookie): Add member type.
(__visitor_result_type): Remove.
(__do_visit): Use invoke_result instead of __visitor_result_type.
* testsuite/20_util/variant/visit.cc: New test.
From-SVN: r270237
The "*neon_mov<mode>" patterns for 128 bit sized quantities uses the "Dn"
constraint to match vmov.f32 and vmov.i<vec-width> patterns.
This constraint boils down to using the `neon_immediate_valid` function.
Once the constraint has matched, the output C statement asserts that function
passes.
The output C statement calls `neon_immediate_valid` with the mode taken from the
iterator, while the constraint takes the mode from the operand.
This can cause a discrepency when the operand is a CONST_INT, as the constraint
passes VOIDmode which `neon_immediate_valid` treats as DImode, while the C
statement passes the mode of the iterator which can be TImode.
When this happens, the `neon_immediate_valid` can fail in the second call (if
e.g. the CONST_INT is a valid immediate in DImode but not TImode) which would
trigger the assertion.
The testcase added with this patch triggers this when compiled with an arm cross
compiler using the command line below.
gcc -march=armv8-a -c neon-immediate-timode.c -O1 -mfloat-abi=hard -mfpu=neon-fp-armv8
This patch splits the original "Dn" constraint into three new constraints, "DN"
for TImode CONST_INT, "Dn" for DImode CONST_INT, and "Dm" for CONST_VECTOR.
Splitting things up this way requires using one extra alternative in the
"*neon_mov<mode>" patterns, but makes it clear from the constraint what mode is
being used.
We also remove the behaviour of treating VOIDmode as DImode in
`neon_valid_immediate` since the original "Dn" constraint was the only place
that functionality was used. VOIDmode is now never passed to that function.
An assertion has been added to the function to ensure this problem is caught
earlier on.
Bootstrapped on arm-none-linux-gnueabihf
Regtested on cross-compiler arm-none-eabi
gcc/ChangeLog:
2019-04-09 Matthew Malcomson <matthew.malcomson@arm.com>
PR target/90024
* config/arm/arm.c (neon_valid_immediate): Disallow VOIDmode parameter.
* config/arm/constraints.md (Dm, DN, Dn): Split previous Dn constraint
into three.
* config/arm/neon.md (*neon_mov<mode>): Account for TImode and DImode
differences directly.
(*smax<mode>3_neon, vashl<mode>3, vashr<mode>3_imm): Use Dm constraint.
gcc/testsuite/ChangeLog:
2019-04-09 Matthew Malcomson <matthew.malcomson@arm.com>
PR target/90024
* gcc.dg/torture/neon-immediate-timode.c: New test.
From-SVN: r270226
PR tree-optimization/89998
* gimple-ssa-sprintf.c (try_substitute_return_value): Use lhs type
instead of integer_type_node if possible, don't add ranges if return
type is not compatible with int.
* gimple-fold.c (gimple_fold_builtin_sprintf,
gimple_fold_builtin_snprintf): Use lhs type instead of hardcoded
integer_type_node.
* gcc.c-torture/compile/pr89998-1.c: New test.
* gcc.c-torture/compile/pr89998-2.c: New test.
From-SVN: r270224
2019-04-09 Martin Liska <mliska@suse.cz>
* Makefile.in: Regenerate.
* Makefile.tpl: Pass GENERATOR_CFLAGS
in all stages.
2019-04-09 Martin Liska <mliska@suse.cz>
* bootstrap-lto-lean.mk: New file.
2019-04-09 Martin Liska <mliska@suse.cz>
* Makefile.in: Use GENERATOR_CFLAGS for all generators.
* doc/install.texi: Document the new config.
From-SVN: r270223
2019-04-08 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* tree-vect-data-refs.c (vect_get_smallest_scalar_type): Always
use gimple_expr_type for load and store calls. Skip over the
condition argument in a conditional internal function.
Protect use of TREE_INT_CST_LOW.
From-SVN: r270222
We can have multiple packages with the same name, so also sort by pkgpath.
To avoid an inconsistent sort, sort by symbol and pointer address if
we somehow get two different packages with the same name and pkgpath.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/171032
From-SVN: r270220
* include/std/variant (__do_visit): Add a template parameter
for enforcing same return types for visit.
(__gen_vtable_impl): Likewise.
(_S_apply_single_alt): Adjust.
(__visit_invoke_impl): New. Handle casting to void.
(__do_visit_invoke): New. Enforces same return types.
(__do_visit_invoke_r): New. Converts return types.
(__visit_invoke): Adjust.
(__gen_vtable): Add a template parameter for enforcing
same return types for visit.
* testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
different return types.
* testsuite/20_util/variant/visit_neg.cc: New. Ensures that
visitors with different return types don't accidentally
compile with regular visitation.
From-SVN: r270216
The fma_forest, fma_root_node and func_fma_steering classes lack a
copy constructor. However, they contain pointers to allocated memory
so this omission can be regarded as poor style. We don't need to copy
such objects, so declare the copy constructor private to inhibit
accidental copying.
2019-04-08 Andrea Corallo <andrea.corallo@arm.com>
PR target/83033
* config/aarch64/cortex-a57-fma-steering.c (fma_forest): Prohibit copy
construction.
(fma_root_node): Likewise.
(func_fma_steering): Likewise.
From-SVN: r270207
PR rtl-optimization/89865
* config/i386/i386.md: Add peepholes for z = x; x ^= y; x != z.
* gcc.target/i386/pr49095.c: Don't expect any RMW sequences.
From-SVN: r270206
PR rtl-optimization/89865
* config/i386/i386.md
(SWI12 peephole for mem {+,-,&,|,^}= x; mem != 0): Fix up operand
numbers not to clash with the additional operands[4].
(peepholes for mem {+,-,&,|,^}= x; mem != 0): New peephole2s
with extra register copy in the middle.
* gcc.target/i386/pr49095.c: Adjust number of expected RMW spots
on ia32.
From-SVN: r270205