1. 12 Nov, 2018 11 commits
    • [PR87815]Don't generate shift sequence for load replacement in DSE when the mode… · e6575643
      [PR87815]Don't generate shift sequence for load replacement in DSE when the mode size is not compile-time constant
      
      The patch adds a check if the gap is compile-time constant.
      
      This happens when dse decides to replace the load with previous store value.
      The problem is that, shift sequence could not accept compile-time non-constant
      mode operand.
      
      gcc/
      
      2018-11-12  Renlin Li  <renlin.li@arm.com>
      
      	PR target/87815
      	* dse.c (get_stored_val): Add check for compile-time
      	constantness of gap.
      
      gcc/testsuite/
      
      2018-11-12  Renlin Li  <renlin.li@arm.com>
      
      	PR target/87815
      	* gcc.target/aarch64/sve/pr87815.c: New.
      
      From-SVN: r266033
      Renlin Li committed
    • PR libstdc++/87963 fix build for 64-bit mingw · d5cc6de1
      	PR libstdc++/87963
      	* src/c++17/memory_resource.cc (chunk::_M_bytes): Change type from
      	unsigned to uint32_t.
      	(chunk): Fix static assertion for 64-bit targets that aren't LP64.
      	(bigblock::all_ones): Fix undefined shift.
      
      From-SVN: r266032
      Jonathan Wakely committed
    • [GCC, ARM] Enable armv8.5-a and add +sb and +predres for previous ARMv8-a in ARM · ae78a89f
      This patch adds -march=armv8.5-a to the Arm backend.
      Armv8.5-A also adds two new security features:
      - Speculation Barrier instruction
      - Execution and Data Prediction Restriction Instructions
      These are made optional to all older Armv8-A versions. Thus we are adding two
      new options "+sb" and "+predres" to all older Armv8-A. These are passed on to
      the assembler and have no code generation effects and have already gone in the
      trunk of binutils.
      
      *** gcc/ChangeLog ***
      
      2018-11-12  Sudakshina Das  <sudi.das@arm.com>
      
      	* config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
      	(ARMv8_5a): New fgroup.
      	(armv8.5-a): New arch.
      	(armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
      	sb and predres.
      	* config/arm/arm-tables.opt: Regenerate.
      	* config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
      	* config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
      	* config/arm/t-multilib (v8_5_a_simd_variants): New variable.
      	Add matching rules for -march=armv8.5-a and extensions.
      	* doc/invoke.texi (ARM options): Document -march=armv8.5-a.
      	Add sb and predres to all armv8-a except armv8.5-a.
      
      *** gcc/testsuite/ChangeLog ***
      
      2018-11-12  Sudakshina Das  <sudi.das@arm.com>
      
      	* gcc.target/arm/multilib.exp: Add some -march=armv8.5-a
      	combination tests.
      
      From-SVN: r266031
      Sudakshina Das committed
    • 2018-11=12 Richard Biener <rguenther@suse.de> · 27922d51
      	* tree-vrp.h (value_range[_base]::set): Make public.  Provide
      	overload for single value.
      	(value_range[_base]::set_nonnull): New.
      	(value_range[_base]::set_null): Likewise.
      	(value_range): Document bitmap copying behavior, mark
      	copy constructor and assignment operator deleted.
      	(value_range::move): New.
      	(value_range::set_and_canonicalize): Default bitmap to zero.
      	(set_value_range_to_nonnull): Remove.
      	(set_value_range_to_null): Likewise.
      	(set_value_range): Likewise.
      	(set_value_range_to_value): Likewise.
      	(extract_range_from_unary_expr): Work on value_range_base.
      	(extract_range_from_binary_expr_1): Likewise.  Rename to...
      	(extract_range_from_binary_expr): ... this.
      	* tree-vrp.c (value_range::update): Clear equiv bitmap
      	if required.
      	(value_range::move): New, move equiv bitmap.
      	(value_range_base::set_undefined): Avoid assignment.
      	(value_range::set_undefined): Likewise.
      	(value_range_base::set_varying): Likewise.
      	(value_range::set_varying): Likewise.
      	(set_value_range): Remove.
      	(value_range_base::set): New overload for value.
      	(value_range::set): Likewise.
      	(set_value_range_to_nonnull): Remove.
      	(value_range_base::set_nonnull): New.
      	(value_range::set_nonnull): Likewise.
      	(set_value_range_to_null): Remove.
      	(value_range_base::set_null): New.
      	(value_range::set_null): Likewise.
      	(range_is_null): Work on value_range_base.
      	(range_is_nonnull): Likewise.
      	(ranges_from_anti_range): Likewise.
      	(extract_range_into_wide_ints): Likewise.
      	(extract_range_from_multiplicative_op): Likewise.
      	(extract_range_from_binary_expr): Likewise.  Update for API changes.
      	(extract_range_from_unary_expr): Likewise.  Remove OBJ_TYPE_REF
      	handling.
      	(value_range::intersect_helper): Avoid copy and assignment.
      	(value_range::union_helper): Likewise.
      	(determine_value_range_1): Adjust.
      	* gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
      	Avoid assignment by using move.
      	(evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
      	* tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
      	Likewise.
      	* tree-ssanames.c (get_range_info): Likewise.
      	* vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
      	* vr-values.c (vr_values::get_value_range): Adjust.
      	(vr_values::update_value_range): Likewise.
      	(symbolic_range_based_on_p): Work on value_range_base.
      	(vr_values::extract_range_from_binary_expr): Use value_range_base.
      	(vr_values::extract_range_from_unary_expr): Likewise.
      	(vr_values::extract_range_from_cond_expr): Avoid assignment.
      	(vr_values::extract_range_from_comparison): Adjust.
      	(vr_values::check_for_binary_op_overflow): Use value_range_base.
      	(vr_values::extract_range_basic): Adjust.
      	(vr_values::adjust_range_with_scev): Likewise.
      	(vr_values::vrp_visit_assignment_or_call): Likewise.
      	(vr_values::get_vr_for_comparison): Change API to avoid
      	assignment and copy construction.
      	(vr_values::compare_name_with_value): Adjust accordingly.
      	(vr_values::compare_names): Likewise.
      	(vr_values::extract_range_from_phi_node): Avoid assignment and
      	bogus in-place modify of equiv bitmap.
      	(vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
      	* ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
      	for extract_range_from_unary_expr API change.
      	* ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
      
      From-SVN: r266030
      Richard Biener committed
    • tree-vrp.h (value_range_base::symbolic_p, [...]): Move from value_range. · c49eeac3
      2018-11-12  Richard Biener  <rguenther@suse.de>
      
      	* tree-vrp.h (value_range_base::symbolic_p,
      	value_range_base::constant_p, value_range_base::zero_p,
      	value_range_base::singleton_p): Move from value_range.
      	(value_range::dump): Add.
      	* gimple-ssa-evrp-analyze.c
      	(evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
      	* ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
      	* tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
      	Use set_varying.
      	* tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
      	(value_range::constant_p): Likewise.
      	(value_range::singleton_p): Likewise.
      	(value_range_base::dump): Add.
      	(set_value_range_to_undefined): Remove.
      	(set_value_range_to_varying): Likewise.
      	(range_int_cst_p): Take value_range_base argument.
      	(range_int_cst_singleton_p): Likewise.
      	(value_range_constant_singleton): Likewise.
      	(vrp_set_zero_nonzero_bits): Likewise.
      	(extract_range_from_multiplicative_op): Use set_varying.
      	(extract_range_from_binary_expr_1): Likewise. Use set_undefined.
      	(extract_range_from_unary_expr): Likewise.
      	(dump_value_range_base): Change to overload of dump_value_range.
      	(vrp_prop::vrp_initialize): Use set_varying and set_undefined.
      	(vrp_prop::visit_stmt): Likewise.
      	(value_range::intersect_helper): Likewise.
      	(value_range::union_helper): Likewise.
      	(determine_value_range_1): Likewise.
      
      From-SVN: r266028
      Richard Biener committed
    • tree-vrp.c (set_value_range_to_nonnull): Clear equiv. · bdfac905
      2018-11-12  Richard Biener  <rguenther@suse.de>
      
      	* tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
      	(set_value_range_to_null): Likewise.
      	* vr-values.c (vr_values::extract_range_from_comparison):
      	Clear equiv for constant singleton ranges.
      
      From-SVN: r266027
      Richard Biener committed
    • sse.md: Combine VFIXUPIMM* patterns · 682abf8d
      2018-11-12 Wei Xiao <wei3.xiao@intel.com>
      
              * config/i386/sse.md: Combine VFIXUPIMM* patterns
              (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
              (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
              (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
              (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
              (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
              (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
      
      From-SVN: r266026
      Wei Xiao committed
    • re PR c/69502 (attribute aligned reduces alignment contrary to documentation) · 8f64958b
      2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
      
      	PR c/69502
      
      	gcc/
      	* doc/extend.texi (Common Type Attributes): For the align type
      	attribute, copy language about decreasing alignment from the
      	corresponding variable attribute.
      
      From-SVN: r266025
      Sandra Loosemore committed
    • csky.md (*fpuv2_nmulsf3_1, [...]): Handle -frounding-math. · 31fad58f
      2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
      
      	gcc/
      	* config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
      	-frounding-math.
      
      	gcc/testsuite
      	* gcc.target/csky/fnmul-1.c: New.
      	* gcc.target/csky/fnmul-2.c: New.
      	* gcc.target/csky/fnmul-3.c: New.
      	* gcc.target/csky/fnmul-4.c: New.
      
      From-SVN: r266024
      Xianmiao Qu committed
    • Daily bump. · 9510b563
      From-SVN: r266023
      GCC Administrator committed
  2. 11 Nov, 2018 12 commits
  3. 10 Nov, 2018 2 commits
    • combine: More make_more_copies · 16ac6fa5
      This makes make_more_copies do what its documentation says, that is,
      only make an intermediate pseudo if copying to a pseudo.
      
      This regressed generated code quality when we didn't keep the original
      notes that were on the copy, but since r265582 we do, and only allowing
      pseudos now is a win.  It also simplifies the code.
      
      
      	* combine.c (make_more_copies): Only make an intermediate copy if the
      	dest of a move is a pseudo.
      
      From-SVN: r266004
      Segher Boessenkool committed
    • Daily bump. · babe0c74
      From-SVN: r266001
      GCC Administrator committed
  4. 09 Nov, 2018 15 commits
    • re PR testsuite/87965 (Test cases c-c++-common/pr60226.c and gcc.dg/pr39323-1.c… · 397fd63d
      re PR testsuite/87965 (Test cases c-c++-common/pr60226.c and gcc.dg/pr39323-1.c fail starting with r265977)
      
      gcc/testsuite/ChangeLog:
      
      	PR testsuite/87965
      	* c-c++-common/pr60226.c: Adjust text of expected diagnostic.
      	* gcc.dg/pr39323-1.c: Ditto.
      
      From-SVN: r265998
      Martin Sebor committed
    • MAINTAINERS: add myself as or1k maintainer · 1dbff00c
      ChangeLog:
      
      yyyy-mm-dd  Stafford Horne  <shorne@gmail.com>
      
      	* MAINTAINERS (CPU Port Maintainers): Add myself for or1k.
      	(Write After Approval): Remove myself.
      
      From-SVN: r265996
      Stafford Horne committed
    • Walloca-16.c: Ignore conflicting types for built-in warnings. · 4476242b
      	* gcc.dg/Walloca-16.c: Ignore conflicting types for built-in
      	warnings.
      	* gcc.dg/Wrestrict-4.c: Ditto.
      	* gcc.dg/Wrestrict-5.c: Ditto.
      	* gcc.dg/pr83463.c: Ditto.
      	* gcc.dg/torture/pr55890-2.c: Ditto.
      	* gcc.dg/torture/pr55890-3.c: Ditto.
      	* gcc.dg/torture/pr71816.c: Ditto.
      
      From-SVN: r265995
      Paul Koning committed
    • re PR target/87221 (cannot build with -pie) · a0f503a0
      	PR target/87221
      	* config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
      	(NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
      
      From-SVN: r265994
      Maya Rashish committed
    • re PR driver/41179 (Documentation for "-fno-toplevel-reorder" is confusing (and wrong)) · e602e1f7
      2018-11-09  Sandra Loosemore  <sandra@codesourcery.com>
      
      	PR driver/41179
      	PR middle-end/65703
      
      	gcc/
      	* doc/invoke.texi (Optimize Options): Clarify default behavior
      	for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
      
      From-SVN: r265993
      Sandra Loosemore committed
    • re PR tree-optimization/87940 (FAIL: gcc.dg/warn-strlen-no-nul.c) · ab386758
      2018-11-09  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              PR tree-optimization/87940
              * expr.c (string_constant): Don't strip NOPS in subexpressions.
              Fold PLUS_EXPR correctly.
      
      From-SVN: r265992
      Bernd Edlinger committed
    • S/390: Allow relative addressing of literal pool entries · 340e0dd6
      r265490 allowed the compiler to choose in a more flexible way whether to
      use load or load-address-relative-long (LARL) instruction.  When it
      chose LARL for literal pool references, the latter ones were rewritten
      by pass_s390_early_mach to use UNSPEC_LTREF, which assumes base register
      usage, which in turn is not compatible with LARL.  The end result was an
      ICE because of unrecognizable insn.
      
      UNSPEC_LTREF and friends are necessary in order to communicate the
      dependency on the base register to pass_sched2.  When relative
      addressing is used, no base register is necessary, so in such cases the
      rewrite must be avoided.
      
      gcc/ChangeLog:
      
      2018-11-09  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	PR target/87762
      	* config/s390/s390.c (s390_safe_relative_long_p): New function.
      	(annotate_constant_pool_refs): Skip insns which support
      	relative addressing.
      	(annotate_constant_pool_refs_1): New helper function.
      	(find_constant_pool_ref): Skip insns which support relative
      	addression.
      	(find_constant_pool_ref_1): New helper function.
      	(replace_constant_pool_ref): Skip insns which support
      	relative addressing.
      	(replace_constant_pool_ref_1): New helper function.
      	(s390_mainpool_start): Adapt to the new signature.
      	(s390_mainpool_finish): Likewise.
      	(s390_chunkify_start): Likewise.
      	(s390_chunkify_finish): Likewise.
      	(pass_s390_early_mach::execute): Likewise.
      	(s390_prologue_plus_offset): Likewise.
      	(s390_emit_prologue): Likewise.
      	(s390_emit_epilogue): Likewise.
      
      From-SVN: r265991
      Ilya Leoshkevich committed
    • c-parser.c (c_parser_omp_clause_final): Use c_parser_expr_no_commas... · 81a227c6
      c/
      	* c-parser.c (c_parser_omp_clause_final): Use
      	c_parser_expr_no_commas, convert_lvalue_to_rvalue,
      	c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
      	parsing instead of c_parser_paren_condition.
      	(c_parser_omp_clause_if): Use c_parser_expr_no_commas,
      	convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
      	c_fully_fold instead of c_parser_condition.
      	(c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
      	c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
      	c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
      	c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
      	c_parser_expr_no_commas instead of c_parser_expression.
      cp/
      	* parser.c (cp_parser_omp_clause_final, cp_parser_omp_clause_if): Use
      	cp_parser_assignment_expression instead of cp_parser_condition.
      	(cp_parser_omp_clause_num_threads, cp_parser_omp_clause_num_tasks,
      	cp_parser_omp_clause_grainsize, cp_parser_omp_clause_priority,
      	cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
      	cp_parser_omp_clause_linear, cp_parser_omp_clause_device): Use
      	cp_parser_assignment_expression instead of cp_parser_expression.
      	(cp_parser_omp_clause_hint): Likewise.  Formatting fix.
      testsuite/
      	* c-c++-common/gomp/clauses-5.c: New test.
      
      From-SVN: r265990
      Jakub Jelinek committed
    • c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on reduction clause with inscan modifier. · 98c91c56
      	* c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
      	reduction clause with inscan modifier.
      
      	* parser.c (cp_parser_omp_clause_reduction): Call sorry_at on
      	reduction clause with inscan modifier.
      
      From-SVN: r265989
      Jakub Jelinek committed
    • c-parser.c (c_parser_omp_requires): Call sorry_at on requires clauses other than… · 3179ebae
      c-parser.c (c_parser_omp_requires): Call sorry_at on requires clauses other than atomic_default_mem_order.
      
      	* c-parser.c (c_parser_omp_requires): Call sorry_at on requires
      	clauses other than atomic_default_mem_order.
      
      	* parser.c (cp_parser_omp_requires): Call sorry_at on requires
      	clauses other than atomic_default_mem_order.
      
      	* c-c++-common/gomp/requires-1.c: Prune not supported yet messages.
      	* c-c++-common/gomp/requires-2.c: Likewise.
      	* c-c++-common/gomp/requires-4.c: Likewise.
      
      From-SVN: r265988
      Jakub Jelinek committed
    • gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid but unsupported… · 4302dd3d
      gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid but unsupported lastprivate with conditional modifier.
      
      	* gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
      	but unsupported lastprivate with conditional modifier.
      
      	* c-c++-common/gomp/lastprivate-conditional-1.c: New test.
      	* c-c++-common/gomp/lastprivate-conditional-2.c: New test.
      
      From-SVN: r265987
      Jakub Jelinek committed
    • mips.c (mips_loongson_ext2_prefetch_cookie): Handle unused argument better. · c4c44802
      	* config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
      	unused argument better.  Add gcc_unreachable to silence warning.
      
      From-SVN: r265986
      Jeff Law committed
    • affinity-fmt.c: Include inttypes.h if HAVE_INTTYPES_H. · 9666c522
      	* affinity-fmt.c: Include inttypes.h if HAVE_INTTYPES_H.
      	(gomp_display_affinity): Use __builtin_choose_expr to handle
      	properly handle argument having integral, or pointer or some other
      	type.  If inttypes.h is available and PRIx64 is defined, use PRIx64
      	with uint64_t type instead of %llx and unsigned long long.
      
      From-SVN: r265985
      Jakub Jelinek committed
    • PR libstdc++/87787 fix UBsan error in std::vector · 213fd717
      	PR libstdc++/87787
      	* include/bits/stl_uninitialized.h (__relocate_a_1): Do not call
      	memmove when there's nothing to copy (and pointers could be null).
      
      From-SVN: r265984
      Jonathan Wakely committed
    • Fix whitespace in ChangeLog · fcc49972
      From-SVN: r265983
      Jonathan Wakely committed