Commit graph

154989 commits

Author SHA1 Message Date
Ian Lance Taylor
9e45ca5f83 re PR go/81451 (missing futex check - libgo/runtime/thread-linux.c:12:0 futex.h:13:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’)
PR go/81451
    runtime: inline runtime_osinit
    
    We had two identical copies of runtime_osinit. They set runtime_ncpu,
    a variable that is no longer used. Removing that leaves us with two lines.
    Inline those two lines in the two places the function was called.
    
    This fixes GCC PR 81451.
    
    Reviewed-on: https://go-review.googlesource.com/48862

From-SVN: r250326
2017-07-18 23:14:29 +00:00
Ian Lance Taylor
ab86687fee compiler: pass correct 'function' flag to circular_pointer_type
The code in Named_type::do_get_backend was not passing the correct
    flag value for circular function types to Backend::circular_pointer_type
    (it was always setting this flag to false). Pass a true value if the
    type being converted is a function type.
    
    Reviewed-on: https://go-review.googlesource.com/49330

From-SVN: r250325
2017-07-18 22:31:00 +00:00
Ian Lance Taylor
eb80664a39 re PR go/81324 (libgo does not build with glibc 2.18)
PR go/81324
    sysinfo.c: ignore ptrace_peeksiginfo_args from <linux/ptrace.h>
    
    With some versions of glibc and GNU/Linux ptrace_pseeksiginfo_args is
    defined in both <sys/ptrace.h> and <linux/ptrace.h>. We don't actually
    care about the struct, so use a #define to avoid a redefinition error.
    
    This fixes https://gcc.gnu.org/PR81324.
    
    Reviewed-on: https://go-review.googlesource.com/49290

From-SVN: r250324
2017-07-18 22:06:31 +00:00
Trevor Saunders
7a795e10c0 update my entry in MAINTAINERS
/:

	* MAINTAINERS: Update my email address.

From-SVN: r250321
2017-07-18 21:05:48 +00:00
François Dumont
4f9e1f4d9d stl_list.h (struct _List_node_header): New.
2017-07-18  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/stl_list.h
	(struct _List_node_header): New.
	(_List_impl()): Fix noexcept qualification.
	(_List_impl(_List_impl&&)): New, default.
	(_List_base()): Default.
	(_List_base(_List_base&&)): Default.
	(_List_base::_M_move_nodes): Adapt to use
	_List_node_header._M_move_nodes.
	(_List_base::_M_init): Likewise.
	(list<>()): Default.
	(list<>(list&&)): Default.
	(list<>::_M_move_assign(list&&, true_type)): Use _M_move_nodes.
	(__distance(_List_const_iterator<>, _List_const_iterator<>,
	input_iterator_tag)): Adapt.
	* testsuite/23_containers/list/allocator/default_init.cc: New.

From-SVN: r250320
2017-07-18 20:26:08 +00:00
Uros Bizjak
e822e88588 re PR target/81471 (internal compiler error: in curr_insn_transform, at lra-constraints.c:3495)
PR target/81471
	* config/i386/i386.md (rorx_immediate_operand): New mode attribute.
	(*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
	operand 2 predicate.
	(*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
	operand 2 predicate.
	(ror,rol -> rorx splitters): Use const_int_operand as
	operand 2 predicate.

testsuite/ChangeLog:

	PR target/81471
	* gcc.target/i386/pr81471.c: New test.

From-SVN: r250315
2017-07-18 18:10:20 +02:00
Yury Gribov
883b0e467a mklog: Fix extraction of changed file name.
2017-07-17  Yury Gribov  <tetra2005@gmail.com>

	* mklog: Fix extraction of changed file name.

From-SVN: r250314
2017-07-18 18:39:39 +03:00
Richard Biener
b267968e67 re PR tree-optimization/81410 (-O3 breaks code)
2017-06-18  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81410
	* tree-vect-stmts.c (vectorizable_load): Properly adjust for
	the gap in the ! slp_perm SLP case after each group.

	* gcc.dg/vect/pr81410.c: New testcase.

From-SVN: r250312
2017-07-18 13:55:47 +00:00
Jan Hubicka
35896b18ec re PR tree-optimization/81463 (ICE in scale_loop_profile at gcc/cfgloopmanip.c:603)
PR middle-end/81463
	* cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
	again.

From-SVN: r250311
2017-07-18 13:51:22 +00:00
Jan Hubicka
33e9feb530 re PR tree-optimization/81462 (ICE in estimate_bb_frequencies at gcc/predict.c:3546)
PR middle-end/81462
	* predict.c (set_even_probabilities): Cleanup; do not affect
	probabilities that are already known.
	(combine_predictions_for_bb): Call even when count is set.

	* g++.dg/torture/pr81462.C: New testcase.

From-SVN: r250310
2017-07-18 13:49:30 +00:00
Nathan Sidwell
ff22eb1256 tree-parloops.c (try_transform_to_exit_first_loop_alt): Use TYPE_MAX_VALUE.
gcc/
	* tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
	TYPE_MAX_VALUE.

       gcc/c-family/
	* c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.

       gcc/c/
	* c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.

       gcc/cp/ 
	* cp-array-notation.c (build_array_notation_ref): Use
	TYPE_{MIN,MAX}_VALUE.

       gcc/fortran/
	* trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.

From-SVN: r250309
2017-07-18 13:22:50 +00:00
Mike Frysinger
b34a929aa3 gcc: ada: delete old $(P) reference
The P variable was deleted back in Nov 2015 (svn rev 231062),
but its expansion was missed.  Delete those now too.

From-SVN: r250307
2017-07-18 12:38:41 +00:00
Nathan Sidwell
6b8e738ef0 class.c (classtype_has_move_assign_or_move_ctor): Declare.
* class.c (classtype_has_move_assign_or_move_ctor): Declare.
	(add_implicitly_declared_members): Use it.
	(type_has_move_constructor, type_has_move_assign): Merge into ...
	(classtype_has_move_assign_or_move_ctor): ... this new function.
	* cp-tree.h (type_has_move_constructor, type_has_move_assign): Delete.

From-SVN: r250305
2017-07-18 12:05:12 +00:00
Bin Cheng
694dd0e408 re PR middle-end/81408 (Lots of new -Wunsafe-loop-optimizations warnings with 7 compared to 6)
PR target/81408
	* tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
	optimization for loop niter analysis.

	gcc/testsuite
	* g++.dg/tree-ssa/pr81408.C: New.
	* gcc.dg/tree-ssa/pr19210-1.c: Check dump message rather than warning.

From-SVN: r250304
2017-07-18 11:40:38 +00:00
Georg-Johann Lay
f94f48ffac re PR target/81473 ([avr] build fails due to INT8_MIN and friends.)
gcc/
	PR target/81473
	* config/avr/avr.c (avr_optimize_casesi): Don't use
	INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.

From-SVN: r250301
2017-07-18 09:36:21 +00:00
Robin Dapp
ec15a15207 Fix PR81362: Vector peeling
npeel was erroneously overwritten by vect_peeling_hash_get_lowest_cost
although the corresponding dataref is not used afterwards.  It should
be safe to get rid of the npeel parameter since we use the returned
peeling_info's npeel anyway.  Also removed the body_cost_vec parameter
which is not used elsewhere.

gcc/ChangeLog:

2017-07-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>

	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
	body_cost_vec from _vect_peel_extended_info.
	(vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
	(vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
	npeel.

From-SVN: r250300
2017-07-18 09:23:35 +00:00
Bin Cheng
4169392a24 * config/arm/arm.c (emit_unlikely_jump): Remove unused var.
From-SVN: r250299
2017-07-18 08:34:37 +00:00
Richard Biener
f9bfe3f57e re PR tree-optimization/80620 (gcc produces wrong code with -O3)
2017-07-18  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80620
	PR tree-optimization/81403
	* tree-ssa-pre.c (phi_translate_1): Clear range and points-to
	info when re-using a VN table entry.

	* gcc.dg/torture/pr80620.c: New testcase.
	* gcc.dg/torture/pr81403.c: Likewise.

From-SVN: r250297
2017-07-18 07:35:40 +00:00
Richard Biener
d2e78d7662 re PR tree-optimization/81418 (ICE in vect_get_vec_def_for_stmt_copy)
2017-06-18  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81418
	* tree-vect-loop.c (vectorizable_reduction): Properly compute
	vectype_in.  Verify that with lane-reducing reduction operations
	we have a single def-use cycle.

	* gcc.dg/torture/pr81418.c: New testcase.

From-SVN: r250296
2017-07-18 07:26:04 +00:00
Carl Love
651dbe5d8e Revert commit r249424 2017-06-20 Carl Love <cel@us.ibm.com>
gcc/ChangeLog:

2017-07-17  Carl Love  <cel@us.ibm.com>

	Revert commit r249424	2017-06-20  Carl Love  <cel@us.ibm.com>

	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
	ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
	ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
	* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
	builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
	* config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
	VMULOSW): New enum "unspec" values.
	(vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
	vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
	altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
	altivec_vmulosw): New patterns.
	* config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
	VMULOSW): Add definitions.

gcc/testsuite/ChangeLog:

2017-07-17  Carl Love  <cel@us.ibm.com>

	Revert commit r249572 	2017-06-22 Carl Love  <cel@us.ibm.com>
	test case changes for commit 249424

	* gcc.target/powerpc/builtins-2.c (vmulosh, vmulouh, vmulesh,
	vmuleuh): Fix scan-assembler-times should check for word not half word
	instructions.

From-SVN: r250295
2017-07-18 03:40:39 +00:00
GCC Administrator
cef3814bc1 Daily bump.
From-SVN: r250294
2017-07-18 00:16:34 +00:00
Uros Bizjak
8cdf5397cd alpha.c: Include predict.h.
* config/alpha/alpha.c: Include predict.h.

From-SVN: r250290
2017-07-17 22:54:31 +02:00
Bill Schmidt
f648932613 re PR tree-optimization/81162 (UBSAN switch triggers incorrect optimization in SLSR)
2017-07-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/81162
	* gcc.dg/pr81162.c: Move this to...
	* gcc.dg/ubsan/pr81162.c: ...here.

From-SVN: r250284
2017-07-17 19:12:11 +00:00
Volker Reichelt
dbc4ecfc57 parser.c (cp_parser_decl_specifier_seq): Add fix-it hints for friend outside class and obsolete auto as...
* parser.c (cp_parser_decl_specifier_seq): Add fix-it hints for
        friend outside class and obsolete auto as storage-class-specifier.

        * g++.dg/diagnostic/friend1.C: New test.
        * g++.dg/cpp0x/auto1.C: Add check for fix-it hint.

From-SVN: r250282
2017-07-17 16:58:00 +00:00
Nathan Sidwell
a64559a5fc class.c (maybe_warn_about_overly_private_class): Ignore public copy ctors.
* class.c (maybe_warn_about_overly_private_class): Ignore public
	copy ctors.

	* g++.dg/warn/ctor-dtor-privacy-3.C: New.

From-SVN: r250281
2017-07-17 16:52:31 +00:00
Nathan Sidwell
619018d4b9 class.c (type_has_user_declared_move_constructor, [...]): Combine into ...
* class.c (type_has_user_declared_move_constructor,
	type_has_user_declared_move_assign): Combine into ...
	(classtype_has_user_move_assign_or_move_ctor_p): ... this new function.
	* cp-tree.h (type_has_user_declared_move_constructor,
	type_has_user_declared_move_assign): Combine into ...
	(classtype_has_user_move_assign_or_move_ctor_p): ... this. Declare.
	* method.c (maybe_explain_implicit_delete): Use it.
	(lazily_declare_fn): Use it.
	* tree.c (type_has_nontrivial_copy_init): Use it.

From-SVN: r250280
2017-07-17 15:57:59 +00:00
Bernd Edlinger
aac595770c gcc-dg.exp: Increase expect's match buffer size.
2017-07-17  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * lib/gcc-dg.exp: Increase expect's match buffer size.

From-SVN: r250279
2017-07-17 15:54:32 +00:00
Yury Gribov
5dc3163d0e tree-vrp.c (compare_assert_loc): Fix comparison function to return predictable results.
2017-07-17  Yury Gribov  <tetra2005@gmail.com>

gcc/
        * tree-vrp.c (compare_assert_loc): Fix comparison function
	to return predictable results.

From-SVN: r250278
2017-07-17 17:58:00 +03:00
Claudiu Zissulescu
3f2fc95cd8 [ARC] Deprecate mexpand-adddi option.
Emitting subregs in the expand will result in broken code due to LRA handling of them. Issue observed while turning on mlra and mexpand-adddi options using dejagnu test suite. Deprecate this
option.

gcc/
2017-04-26  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.md (adddi3): Remove support for mexpand-adddi
	option.
	(subdi3): Likewise.
	* config/arc/arc.opt (mexpand-adddi): Deprecate it.
	* doc/invoke.texi (mexpand-adddi): Update text.

From-SVN: r250276
2017-07-17 14:59:56 +02:00
Claudiu Zissulescu
ac66951af8 [ARC] [LRA] Avoid emitting COND_EXEC during expand.
Emmitting COND_EXEC rtxes during expand does introduces errors due to LRA handling of them. Issue discovered while running dejagnu test suit with mlra option on.

gcc/
2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
	that also clobbers the CC register. The old expand code is moved
	to ...
	(*arc_clzsi2): ... here.
	(ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
	the CC register. The old expand code is moved to ...
	(arc_ctzsi2): ... here.

From-SVN: r250275
2017-07-17 14:59:45 +02:00
Claudiu Zissulescu
f26322a6f7 [ARC] Enable indexed loads for elf targers.
Enable indexed loads only for elf target, as the linux ones need more testing.

gcc/
2017-02-28  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.opt (mindexed-loads): Use initial value
	TARGET_INDEXED_LOADS_DEFAULT.
	(mauto-modify-reg): Use initial value
	TARGET_AUTO_MODIFY_REG_DEFAULT.
	* config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
	(TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
	* config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
	(TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.

From-SVN: r250274
2017-07-17 14:32:02 +02:00
Nathan Sidwell
5337720c54 semantics.c (classtype_has_nothrow_assign_or_copy_p): Clarify semantics, simplify implementation.
* semantics.c (classtype_has_nothrow_assign_or_copy_p): Clarify
	semantics, simplify implementation.

From-SVN: r250272
2017-07-17 11:54:03 +00:00
Martin Liska
26c5b549cf Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address (PR sanitizer/81302).
2017-07-17  Martin Liska  <mliska@suse.cz>

	PR sanitizer/81302
	* opts.c (finish_options): Do not allow -fgnu-tm
	w/ -fsanitize={kernel-,}address.  Say sorry.

From-SVN: r250271
2017-07-17 11:44:54 +00:00
Bin Cheng
6ff3751980 re PR tree-optimization/81369 (ICE in generate_code_for_partition)
PR target/81369
	* tree-loop-distribution.c (classify_partition): Only assert on
	numer of iterations.
	(merge_dep_scc_partitions): Delete prameter.  Update function call.
	(distribute_loop): Remove code handling loop with unknown niters.
	(pass_loop_distribution::execute): Skip loop with unknown niters.

From-SVN: r250270
2017-07-17 11:40:54 +00:00
Bin Cheng
aa1528b5c9 re PR tree-optimization/81369 (ICE in generate_code_for_partition)
PR target/81369
	* tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
	function sort_partitions_by_post_order.

	gcc/testsuite
	* gcc.dg/tree-ssa/pr81369.c: New.

From-SVN: r250269
2017-07-17 11:38:15 +00:00
Bin Cheng
3fb824520b re PR tree-optimization/81374 (ICE in bb_top_order_cmp, at tree-loop-distribution.c:391)
PR tree-optimization/81374
	* tree-loop-distribution.c (pass_loop_distribution::execute): Record
	the max index of basic blocks, rather than number of basic blocks.

From-SVN: r250268
2017-07-17 11:34:30 +00:00
Claudiu Zissulescu
b6c354ebc7 [ARC] Consolidate PIC implementation.
This patch refactors a number of functions and compiler hooks into using a
single function which checks if a rtx is suited for pic or not. Removed
functions are arc_legitimate_pc_offset_p and arc_legitimate_pic_operand_p
beeing replaced by calls to arc_legitimate_pic_addr_p. Thus we have an
unitary way of checking a rtx beeing pic.

gcc/
2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
	proto.
	(arc_legitimate_pic_operand_p): Likewise.
	* config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
	function.
	(arc_needs_pcl_p): Likewise.
	(arc_legitimate_pc_offset_p): Likewise.
	(arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
	function is also used in constrains.md.
	(arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
	validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
	PLUS.  Only return true/false in known cases, otherwise assert.
	(arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
	is already called in arc_legitimate_constant_p.
	* config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
	pic addresses.
	(LEGITIMATE_PIC_OPERAND_P): Use
	arc_raw_symbolic_reference_mentioned_p function.
	* config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
	function.
	(Cal): Likewise.
	(C32): Likewise.

gcc/testsuite
2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>

	* gcc.target/arc/pr9000674901.c: New file.
	* gcc.target/arc/pic-1.c: Likewise.
	* gcc.target/arc/pr9001191897.c: Likewise.

From-SVN: r250267
2017-07-17 13:04:37 +02:00
Claudiu Zissulescu
1825c61e15 [PATCH] [ARC] Add support for naked functions.
gcc/
2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
            Andrew Burgess  <andrew.burgess@embecosm.com>

        * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
        (arc_return_address_register): New function.
        * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
        (arc_handle_fndecl_attribute): Add naked attribute.
        (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
        (TARGET_WARN_FUNC_RETURN): Likewise.
        (arc_allocate_stack_slots_for_args): New function.
        (arc_warn_func_return): Likewise.
        (machine_function): Change type fn_type.
        (arc_compute_function_type): Consider new naked function type,
        change function return type.
        (arc_must_save_register): Adapt to handle new
        arc_compute_function_type's return type.
        (arc_expand_prologue): Likewise.
        (arc_expand_epilogue): Likewise.
        (arc_return_address_regs): Delete.
        (arc_return_address_register): New function.
        (arc_epilogue_uses): Use above function.
        * config/arc/arc.h (arc_return_address_regs): Delete prototype.
        (arc_function_type): Change encoding, add naked type.
        (ARC_INTERRUPT_P): Change to handle the new encoding.
        (ARC_FAST_INTERRUPT_P): Likewise.
        (ARC_NORMAL_P): Define.
        (ARC_NAKED_P): Likewise.
        (arc_compute_function_type): Delete prototype.
        * config/arc/arc.md (in_ret_delay_slot): Use
        arc_return_address_register function.
        (simple_return): Likewise.
        (p_return_i): Likewise.

gcc/testsuite
2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
            Andrew Burgess  <andrew.burgess@embecosm.com>

        * gcc.target/arc/naked-1.c: New file.
        * gcc.target/arc/naked-2.c: Likewise.

Co-Authored-By: Andrew Burgess <andrew.burgess@embecosm.com>

From-SVN: r250266
2017-07-17 12:46:55 +02:00
Jakub Jelinek
9ebce09858 re PR tree-optimization/81428 (ICE: in build_one_cst, at tree.c:2079 with -O2. Fixed point division.)
PR tree-optimization/81428
	* match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
	can't be built for those types.

	* gcc.dg/fixed-point/pr81428.c: New test.

From-SVN: r250265
2017-07-17 12:20:41 +02:00
Georg-Johann Lay
f986e51e6c Remove stuff dead since r239246.
* config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
	* config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
	(avr_inform_devices): Remove dead stuff.

From-SVN: r250264
2017-07-17 09:32:42 +00:00
Georg-Johann Lay
8b99a6f7ed gcc_update (files_and_dependencies): Remove dead entry.
* gcc_update (files_and_dependencies)
	[gcc/config/avr/avr-tables.opt]: Remove dead entry.

From-SVN: r250263
2017-07-17 09:13:36 +00:00
Tamar Christina
c24920b2aa arm_neon.h: Fix softp typo.
2017-07-17  Tamar Christina  <tamar.christina@arm.com>

	* config/arm/arm_neon.h: Fix softp typo.

From-SVN: r250262
2017-07-17 09:12:57 +00:00
Jakub Jelinek
e8dd131313 re PR tree-optimization/81365 (GCC miscompiles swap)
PR tree-optimization/81365
	* tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
	aggregate moves onto bb predecessor edges, make sure there are no
	loads that could alias the lhs in between the start of bb and the
	loads from *phi.

	* g++.dg/torture/pr81365.C: New test.

From-SVN: r250261
2017-07-17 11:10:23 +02:00
Georg-Johann Lay
764eec6cf5 re PR middle-end/80929 (Division with constant no more optimized to mult highpart)
PR 80929
	* config/avr/avr.c (avr_mul_highpart_cost): New static function.
	(avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
	[LSHIFTRT, outer_code = TRUNCATE]: Same.

From-SVN: r250258
2017-07-17 08:56:06 +00:00
Jakub Jelinek
1f1e8aed3a re PR tree-optimization/81396 (Optimization of reading Little-Endian 64-bit number with portable code has a regression)
PR tree-optimization/81396
	* tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
	(init_symbolic_number): Initialize it to 1.
	(perform_symbolic_merge): Add n_ops from both operands into the new
	n_ops.
	(find_bswap_or_nop): Don't consider n->n == cmpnop computations
	without base_addr as useless if they need more than one operation.
	(bswap_replace): Handle !bswap case for NULL base_addr.

	* gcc.dg/tree-ssa/pr81396.c: New test.

From-SVN: r250257
2017-07-17 10:14:16 +02:00
Tom de Vries
ed9091b270 Insert diverging jump alap in nvptx_single
2017-07-17  Tom de Vries  <tom@codesourcery.com>

	PR target/81069
	* config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
	as possible.

From-SVN: r250256
2017-07-17 07:49:22 +00:00
Sebastian Huber
42ec024baa [SPARC/RTEMS] Add __FIX_LEON3FT_B2BST
In case the LEON3FT back-to-back store workaround is active
(sparc_fix_b2bst), then define the builtin define __FIX_LEON3FT_B2BST on
RTEMS.  The intended use case for this is operating system code in
assembly language.  See also:

https://lists.rtems.org/pipermail/devel/2017-July/018463.html

gcc/
	*  gcc/config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
	conditional builtin define __FIX_LEON3FT_B2BST.

From-SVN: r250254
2017-07-17 05:27:13 +00:00
Daniel Cederman
ecaf6857a7 [RTEMS] Add multilibs for LEON3FT back-to-back store workaround
Replace MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED for readability.
-mfix-gr712rc and -mfix-ut700 are currently equivalent.

gcc/
	* config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
	MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
	with -mfix-ut700.

From-SVN: r250252
2017-07-17 05:18:42 +00:00
GCC Administrator
417e2a6a33 Daily bump.
From-SVN: r250251
2017-07-17 00:16:33 +00:00
Eric Botcazou
38f638cae2 re PR rtl-optimization/81424 (internal error on GPRbuild with -O2)
PR rtl-optimization/81424
	* optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg
	to remove potential trapping from operands if -fnon-call-exceptions.

From-SVN: r250246
2017-07-16 22:03:54 +00:00