Commit Graph

141114 Commits

Author SHA1 Message Date
Uros Bizjak
0711992144 re PR c/65345 (ICE with _Generic selection on _Atomic int)
PR c/65345
	* config/alpha/alpha.c (alpha_atomic_assign_expand_fenv): Use
	create_tmp_var_raw instead of create_tmp_var.

From-SVN: r228527
2015-10-06 17:31:11 +02:00
Ramana Radhakrishnan
09ba9ef71c Fix PR c/65345 for AArch64
2015-10-06  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR c/65345
	* config/aarch64/aarch64-builtins.c (aarch64_atomic_assign_expand_fenv):
	Use create_tmp_var_raw instead of create_tmp_var.

From-SVN: r228526
2015-10-06 15:09:43 +00:00
Alexander Fomin
2d83470f10 AVX-512. Avoid upper-bank registers when splitting vec_extract_lo instruction.
gcc/
	PR target/67849
	* config/i386/sse.md (define_split vec_select/V8FI): Restrict
	split for upper-bank registers when target does not support
	AVX512VL.
	(define_insn "vec_extract_lo_<mode><mask_name>"): Restrict
	split when target does not support AVX512VL.

From-SVN: r228525
2015-10-06 13:49:30 +00:00
David Edelsohn
2d546fb73b re PR c/65345 (ICE with _Generic selection on _Atomic int)
PR c/65345
        * config/rs6000/rs6000.c (rs6000_atomic_assign_expand_fenv):
        Adjust to use create_tmp_var_raw instead of create_tmp_var.

From-SVN: r228524
2015-10-06 09:46:34 -04:00
Kirill Yukhin
bdef544251 builtin_target.c: Fix AVX-512VBMI detection.
gcc/testsuite/
        * gcc.target/i386/builtin_target.c: Fix AVX-512VBMI detection.

From-SVN: r228523
2015-10-06 13:46:22 +00:00
Nick Clifton
2ef98fb9eb rl78.c (rl78_rtx_costs): Improve cost estimates for multiplication.
* config/rl78/rl78.c (rl78_rtx_costs): Improve cost estimates for
	multiplication.

From-SVN: r228521
2015-10-06 13:42:33 +00:00
Venkataramanan Kumar
9ce29eb05d AMD znver1 enablement.
2015-10-06  Venkataramanan Kumar  <Venkataramanan.kumar@amd.com>
	
	AMD znver1 enablement. 
	* config.gcc (i[34567]86-*-linux* | ...): Add znver1.
	(case ${target}): Add znver1.
	* config/i386/cpuid.h(bit_CLZERO):  Define.
	* config/i386/driver-i386.c: (host_detect_local_cpu): Let
	-march=native recognize znver1 processors. 
	* config/i386/i386-c.c (ix86_target_macros_internal): Add
	znver1, clzero def_and_undef. 
	* config/i386/i386.c (struct processor_costs znver1_cost): New.
	(m_znver1): New definition.
	(m_AMD_MULTIPLE): Includes m_znver1.
	(processor_target_table): Add znver1 entry.
	(ix86_target_string) : Add clzero entry.
	(static const char *const cpu_names): Add znver1 entry.
	(ix86_option_override_internal): Add znver1 instruction sets.
	(PTA_CLZERO) :  New definition.
	(ix86_option_override_internal): Handle new clzerooption.
	(ix86_issue_rate): Add znver1.
	(ix86_adjust_cost): Add znver1.                
	(ia32_multipass_dfa_lookahead): Add znver1.
	(has_dispatch): Add znver1.       
	* config/i386/i386.h (TARGET_znver1): New definition. 
	(TARGET_CLZERO): Define.
	(TARGET_CLZERO_P): Define.
	(struct ix86_size_cost): Add TARGET_ZNVER1.
	(enum processor_type): Add PROCESSOR_znver1.
	* config/i386/i386.md (define_attr "cpu"): Add znver1.
	(set_attr znver1_decode): New definitions for znver1.
	* config/i386/i386.opt (flag_dispatch_scheduler): Add znver1.
	(mclzero): New.
	* config/i386/mmx.md (set_attr znver1_decode): New definitions
	for znver1.
	* config/i386/sse.md (set_attr znver1_decode): Likewise.
	* config/i386/x86-tune.def:  Add znver1 tunings.
	* config/i386/znver1.md: Introduce znver1 cpu and include new md file.
	* gcc/doc/invoke.texi: Add details about znver1

From-SVN: r228520
2015-10-06 12:48:41 +00:00
Richard Biener
0580f6a1a8 re PR tree-optimization/67859 (ICE on valid code at -O2 and -O3 on x86_64-linux-gnu)
2015-10-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/67859
	* tree-ssa-pre.c (create_expression_by_pieces): Properly
	discard not inserted stmts.

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

From-SVN: r228519
2015-10-06 12:34:15 +00:00
Jonathan Wakely
badfb2fbef Update template instantiation documentation
* doc/extend.texi (Template Instantiation): Reorder options and
	de-emphasize -frepo.
	* doc/invoke.texi (C++ Dialect Options): Use -fstrict-enums in
	example instead of -frepo.

From-SVN: r228518
2015-10-06 11:27:57 +01:00
Eric Botcazou
68ea7618de re PR c/65345 (ICE with _Generic selection on _Atomic int)
PR c/65345
	* config/sparc/sparc.c (sparc_atomic_assign_expand_fenv): Adjust to
	use create_tmp_var_raw rather than create_tmp_var.

From-SVN: r228516
2015-10-06 09:14:48 +00:00
Kirill Yukhin
4a2fc4d45e builtin_target.c: Fix AVX-512VBMI detection.
gcc/testsuite/
	* gcc.target/i386/builtin_target.c: Fix AVX-512VBMI detection.

From-SVN: r228515
2015-10-06 07:55:09 +00:00
Richard Biener
310213d49e tree-vectorizer.h (vec_info): New base class for...
2015-10-06  Richard Biener  <rguenther@suse.de>

	* tree-vectorizer.h (vec_info): New base class for...
	(_loop_vec_info): ... this and ...
	(_bb_vec_info): ... this.
	(vect_is_simple_use, vect_is_simple_use_1, new_stmt_vec_info,
	vect_analyze_data_refs_alignment, vect_verify_datarefs_alignment,
	vect_analyze_data_ref_accesses, vect_analyze_data_refs,
	vect_schedule_slp, vect_analyze_slp, vect_pattern_recog,
	vect_destroy_datarefs): Adjust interface to take a vec_info *
	rather than both a loop_vec_info and a bb_vec_info argument.
	* tree-vect-data-refs.c (vect_compute_data_refs_alignment,
	vect_verify_datarefs_alignment, vect_enhance_data_refs_alignment,
	vect_analyze_data_refs_alignment, vect_analyze_data_ref_accesses,
	vect_analyze_data_refs, vect_create_data_ref_ptr): Adjust
	accordingly.
	* tree-vect-loop.c (new_loop_vec_info): Initialize base class.
	(destroy_loop_vec_info, vect_analyze_loop_2,
	vect_is_simple_reduction_1, get_initial_def_for_induction,
	vect_create_epilog_for_reduction, vectorizable_reduction,
	vectorizable_live_operation, vect_transform_loop): Adjust.
	* tree-vect-patterns.c (type_conversion_p,
	vect_recog_widen_mult_pattern, vect_recog_widen_shift_pattern,
	vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern,
	vect_recog_divmod_pattern, vect_recog_mixed_size_cond_pattern,
	check_bool_pattern, vect_recog_bool_pattern,
	vect_mark_pattern_stmts, vect_pattern_recog): Likewise.
	* tree-vect-slp.c (vect_get_and_check_slp_defs,
	vect_build_slp_tree_1, vect_build_slp_tree, vect_analyze_slp_cost_1,
	vect_analyze_slp_instance, vect_analyze_slp, destroy_bb_vec_info,
	vect_slp_analyze_bb_1, vect_schedule_slp): Likewise.
	(new_bb_vec_info): Initialize base classs.
	* tree-vect-stmts.c (record_stmt_cost, process_use,
	vect_get_vec_def_for_operand, vect_finish_stmt_generation,
	vectorizable_mask_load_store, vectorizable_call,
	vectorizable_simd_clone_call, vectorizable_conversion,
	vectorizable_assignment, vectorizable_shift,
	vectorizable_operation, vectorizable_store,
	vectorizable_load, vect_is_simple_cond, vectorizable_condition,
	new_stmt_vec_info, vect_is_simple_use, vect_is_simple_use_1): Likewise.
	* tree-vectorizer.c (vect_destroy_datarefs): Likewise.

From-SVN: r228514
2015-10-06 07:52:03 +00:00
Kirill Yukhin
5097195fab builtin_target.c: Add check for AES and PCLMUL.
gcc/testsuite/
	* gcc.target/i386/builtin_target.c: Add check for AES and PCLMUL.

From-SVN: r228513
2015-10-06 07:29:05 +00:00
GCC Administrator
5d51afcef2 Daily bump.
From-SVN: r228510
2015-10-06 00:16:12 +00:00
Kaz Kojima
7c286398e0 Fix PR65345 in SH backend
Adjust to use create_tmp_var_raw rather than create_tmp_var at
sh_atomic_assign_expand_fenv.

From-SVN: r228502
2015-10-05 22:18:05 +00:00
Paolo Carlini
fcbc0f7cf7 re PR c++/53856 (Default argument allowed on member defined outside of class template)
/cp
2015-10-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53856
	* pt.c (check_default_tmpl_args): Per [temp.param]/9, do not
	reject default template arguments in out of class definitions
	of members of non-template classes.

/testsuite
2015-10-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53856
	* g++.dg/template/defarg19.C: New.
	* g++.dg/template/defarg20.C: Likewise.

From-SVN: r228501
2015-10-05 21:43:26 +00:00
Richard Sandiford
1970d84915 Remove diffstat from ChangeLog.
From-SVN: r228500
2015-10-05 19:46:53 +00:00
Ian Lance Taylor
149ea2cf00 lex: Update unicode letters table to Unicode 8.0.0.
Fixes golang/go#12322.
    
    Reviewed-on: https://go-review.googlesource.com/13985

From-SVN: r228497
2015-10-05 17:59:40 +00:00
Marek Polacek
f67b07b690 * tree-ssa-loop-im.c
(move_computations_dom_walker::before_dom_children): Don't set
	SSA_NAME_ANTI_RANGE_P.
	* tree-ssa-phiopt.c (value_replacement): Likewise.

From-SVN: r228496
2015-10-05 16:33:16 +00:00
Aditya Kumar
8bc2421c9b increase the number of parameters
Co-Authored-By: Sebastian Pop <s.pop@samsung.com>

From-SVN: r228494
2015-10-05 16:03:21 +00:00
Aditya Kumar
87ccab5d9c move param detection to scop detection
Co-Authored-By: Sebastian Pop <s.pop@samsung.com>

From-SVN: r228493
2015-10-05 16:03:09 +00:00
Aditya Kumar
076d564d30 move scop detection related stuff to graphite-scop-detection.c
Co-Authored-By: Sebastian Pop <s.pop@samsung.com>

From-SVN: r228492
2015-10-05 16:02:59 +00:00
Martin Jambor
c8710b5ce0 IPA-CP Alignment lattice cleanup
2015-10-05  Martin Jambor  <mjambor@suse.cz>
	    Jan Hubicka  <hubicka@ucw.cz>

	* ipa-cp.c (ipcp_alignment_lattice): New type.
	(ipcp_param_lattices): Use the above to represent alignment.
	(ipcp_alignment_lattice::print): New function.
	(print_all_lattices): Use it to print alignment information.
	(ipcp_alignment_lattice::top_p): New function.
	(ipcp_alignment_lattice::bottom_p): Likewise.
	(ipcp_alignment_lattice::set_to_bottom): Likewise.
	(ipcp_alignment_lattice::meet_with_1): Likewise.
	(ipcp_alignment_lattice::meet_with): Two new overloaded functions.
	(set_all_contains_variable): Use set_to_bottom of alignment lattice.
	(initialize_node_lattices): Likewise.
	(propagate_alignment_accross_jump_function): Work with the new class
	for alignment lattices.
	(propagate_constants_accross_call): Pass only the alignment lattice to
	propagate_alignment_accross_jump_function.
	(ipcp_store_alignment_results): Work with the new class for alignment
	lattices.

testsuite/
	* gcc.dg/ipa/propalign-4.c: New test.
	* gcc.dg/ipa/propalign-5.c: Likewise.


Co-Authored-By: Jan Hubicka <hubicka@ucw.cz>

From-SVN: r228491
2015-10-05 17:55:54 +02:00
Marek Polacek
85339618b6 re PR middle-end/67821 (ICE in duplicate_ssa_name_range_info)
PR tree-optimization/67821
	* tree-ssanames.c (duplicate_ssa_name_range_info): Remove an assert.

	* gcc.dg/torture/pr67821-2.c: New test.
	* gcc.dg/torture/pr67821.c: New test.

From-SVN: r228490
2015-10-05 15:28:06 +00:00
Jason Merrill
66c69a82f4 Move runtime transactional memory tests to libitm testsute.
From-SVN: r228489
2015-10-05 11:21:15 -04:00
Thomas Schwinge
4314a3efd0 [PR other/65021] mkoffloads -save-temps handling, and cleanup cleanup
gcc/
	PR other/65021
	* config/i386/intelmic-mkoffload.c (mkoffload_atexit): Rename
	function to...
	(mkoffload_cleanup): ... this.  Adjust all users.
	(maybe_unlink): Look at save_temps and verbose flags instead of
	debug flag.
	(main): Parse "-save-temps" flag.
	(generate_target_descr_file, generate_target_offloadend_file)
	(generate_host_descr_file, prepare_target_image): Pass it on.
	* config/nvptx/mkoffload.c (tool_cleanup): Implement.
	(mkoffload_cleanup): New function.
	(maybe_unlink): Look at save_temps and verbose flags instead of
	debug flag.
	(main): Instead of calling utils_cleanup, register atexit handler
	for mkoffload_cleanup.
	(main): Parse "-save-temps" flag.
	(compile_native, main): Pass it on.
	* lto-wrapper.c (compile_offload_image): Likewise.

From-SVN: r228488
2015-10-05 16:07:50 +02:00
Trevor Saunders
1d10676d8c make more gimple_x_ptr accessors const correct
gcc/ChangeLog:

2015-10-05  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* gimple.h (gimple_op_ptr): Require a non const gimple *.
	(gimple_assign_lhs_ptr): Likewise.
	(gimple_assign_rhs1_ptr): Likewise.
	(gimple_assign_rhs2_ptr): Likewise.
	(gimple_assign_rhs3_ptr): Likewise.
	(gimple_call_lhs_ptr): Likewise.
	(gimple_call_fn_ptr): Likewise.
	(gimple_call_chain_ptr): Likewise.
		(gimple_call_arg_ptr): Likewise.
		(gimple_cond_lhs_ptr): Likewise.
	(gimple_cond_rhs_ptr): Likewise.
	(gimple_switch_index_ptr): Likewise.
	(gimple_return_retval_ptr): Likewise.

From-SVN: r228487
2015-10-05 13:55:08 +00:00
Trevor Saunders
eedc18841c remove unused gasm accessors
gcc/ChangeLog:

2015-10-05  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* gimple.h (gimple_asm_input_op_ptr): Remove.
	(gimple_asm_output_op_ptr): Likewise.

From-SVN: r228486
2015-10-05 13:54:50 +00:00
Trevor Saunders
b2b91e8533 remove gimple_location_ptr ()
gcc/ChangeLog:

2015-10-05  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* gimple.h (gimple_location_ptr): Remove.
	* tree-vrp.c (check_all_array_refs): Adjust.

From-SVN: r228485
2015-10-05 13:54:33 +00:00
Trevor Saunders
572d790ac1 make build_uses store tree * instead of tree
gcc/ChangeLog:

2015-10-05  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* tree-ssa-operands.c (build_uses): store tree * instead of
	tree.
	(finalize_ssa_uses): Adjust.
	(append_use): Likewise.
	(verify_ssa_operands): Likewise.

From-SVN: r228484
2015-10-05 13:54:11 +00:00
Richard Sandiford
73463c5e84 Add a build_real_truncate helper function
...which simplifies the match.pd patterns I'm about to add.

Bootstrapped & regression-tested on x86_64-linux-gnu.

gcc/
	* real.h (build_real_truncate): Declare.
	* tree.c (build_real_truncate): New function.
	(strip_float_extensions): Use it.
	* builtins.c (fold_builtin_cabs, fold_builtin_sqrt, fold_builtin_cbrt)
	(fold_builtin_hypot, fold_builtin_pow): Likewise.
	* match.pd: Likewise.

From-SVN: r228483
2015-10-05 13:37:15 +00:00
James Greenhalgh
5b295a81dd [AArch64] Fix output assembly bug under TLSIE ILP32
2015-10-05 James Greenhalgh <james.greenhalgh@arm.com>
	   Jiong Wang  <jiong.wang@arm.com>

	* config/aarch64/aarch64.md (tlsie_tiny_sidi): Replace "<w>" with "w".


Co-Authored-By: Jiong Wang <jiong.wang@arm.com>

From-SVN: r228482
2015-10-05 13:18:08 +00:00
Kirill Yukhin
6a192b5a9a cpuinfo.c (get_intel_cpu): Detect "skylake-avx512".
libgcc/
	* config/i386/cpuinfo.c (get_intel_cpu): Detect "skylake-avx512".
gcc/testsuite/
	* gcc.target/i386/builtin_target.c: Add check for "skylake-avx512".

From-SVN: r228481
2015-10-05 13:16:07 +00:00
Christian Bruel
4fbf5c4eee Cleanup directives.
From-SVN: r228479
2015-10-05 13:59:27 +02:00
Richard Sandiford
34a72c3348 Remove REAL_VALUE_FROM_CONST_DOUBLE
To maintain symmetry after the previous removal of
CONST_DOUBLE_FROM_REAL_VALUE, this patch also gets rid of
REAL_VALUE_FROM_CONST_DOUBLE.  All the macro did was copy the
contents of CONST_DOUBLE_REAL_VALUE into a temporary real_value
structure.  In many cases there was no need for this temporary
and we could simply use the CONST_DOUBLE_REAL_VALUE directly.
For that reason this patch is less automatic than the others.

Bootstrapped & regression-tested on x86_64-linux-gnu.  Also tested by
building one target per CPU directory and checking that there were
no new warnings and no changes in testsuite output at -O2.

gcc/
	* real.h (REAL_VALUE_FROM_CONST_DOUBLE): Delete.
	* config/aarch64/aarch64.c (aarch64_float_const_zero_rtx_p)
	(aarch64_print_operand, aarch64_float_const_representable_p)
	(aarch64_output_simd_mov_immediate): Use CONST_DOUBLE_REAL_VALUE
	instead of REAL_VALUE_FROM_CONST_DOUBLE.
	* config/arc/arc.c (arc_print_operand): Likewise.
	* config/arm/arm.c (arm_const_double_rtx, vfp3_const_double_index)
	(neon_valid_immediate, arm_print_operand, arm_emit_fp16_const)
	(vfp3_const_double_for_fract_bits, vfp3_const_double_for_bits):
	Likewise.
	* config/arm/arm.md (*arm32_movhf, consttable_4, consttable_8)
	(consttable_16): Likewise.
	* config/arm/vfp.md (*movhf_vfp_neon, *movhf_vfp): Likewise.
	* config/avr/avr.c (avr_print_operand): Likewise.
	* config/bfin/bfin.md: Likewise (in a define_split).
	* config/c6x/c6x.md: Likewise (in a define_split).
	* config/cr16/cr16.c (cr16_const_double_ok): Likewise.
	(cr16_print_operand): Likewise.
	* config/cris/cris.c (cris_print_operand): Likewise.
	* config/epiphany/epiphany.c (epiphany_print_operand): Likewise.
	* config/fr30/fr30.c (fr30_print_operand): Likewise.
	(fr30_const_double_is_zero): Likewise.
	* config/frv/frv.c (frv_print_operand, output_move_single): Likewise.
	* config/frv/frv.md: Likewise (in a define_split).
	* config/frv/predicates.md (int_2word_operand): Likewise.
	* config/h8300/h8300.c (h8300_print_operand): Likewise.
	* config/i386/i386.c (standard_80387_constant_p): Likewise.
	(ix86_print_operand, ix86_split_to_parts): Likewise.
	* config/i386/i386.md: Likewise (in a define_split).
	* config/ia64/ia64.c (ia64_split_tmode, ia64_print_operand): Likewise.
	* config/iq2000/iq2000.md (movsf_lo_sum, movsf_high): Likewise.
	* config/m32r/m32r.c (easy_df_const, m32r_print_operand): Likewise.
	* config/m68k/m68k.c (handle_move_double, standard_68881_constant_p)
	(print_operand): Likewise.
	* config/m68k/m68k.md (movsf_cf_hard, movdf_cf_hard): Likewise.
	* config/mep/mep.md: Likewise (in define_split).
	* config/microblaze/microblaze.c (microblaze_const_double_ok)
	(print_operand): Likewise.
	* config/mips/mips.md (consttable_float): Likewise.
	* config/mmix/mmix.c (mmix_intval): Likewise.
	* config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
	* config/nvptx/nvptx.c (nvptx_print_operand): Likewise.
	* config/pa/pa.c (pa_singlemove_string): Likewise.
	* config/pdp11/pdp11.c (pdp11_expand_operands): Likewise.
	(pdp11_asm_print_operand, legitimate_const_double_p): Likewise.
	* config/rs6000/rs6000.c (num_insns_constant, rs6000_emit_cmove)
	(output_toc): Likewise.
	* config/rs6000/rs6000.md: Likewise (in define_splits).
	* config/rx/rx.c (rx_print_operand): Likewise.
	* config/s390/s390.c (s390_output_pool_entry): Likewise.
	* config/sh/sh.c (fp_zero_operand, fp_one_operand): Likewise.
	* config/sh/sh.md (consttable_sf, consttable_df): Likewise
	(and also in define_splits).
	* config/sparc/sparc.c (fp_sethi_p, fp_mov_p): Likewise.
	(fp_high_losum_p): Likewise.
	* config/sparc/sparc.md (*movsf_insn, *movsf_lo_sum): Likewise.
	(*movsf_high): Likewise.
	* config/spu/spu.c (const_double_to_hwint): Likewise.
	* config/v850/v850.c (const_double_split): Likewise.
	* config/vax/vax.c (vax_float_literal): Likewise.
	* config/visium/visium.c (visium_expand_copysign): Likewise.
	* config/visium/visium.md: Likewise (in define_split).
	* config/xtensa/predicates.md (const_float_1_operand): Likewise.
	* config/xtensa/xtensa.c (print_operand): Likewise.
	(xtensa_output_literal): Likewise.
	* cprop.c (implicit_set_cond_p): Likewise.
	* dwarf2out.c (insert_float): Likewise.
	* expmed.c (expand_mult, make_tree): Likewise.
	* expr.c (compress_float_constant): Likewise.
	* rtlanal.c (split_double): Likewise.
	* simplify-rtx.c (avoid_constant_pool_reference): Likewise.
	(simplify_const_unary_operation, simplify_binary_operation_1)
	(simplify_const_binary_operation): Likewise.
	(simplify_const_relational_operation): Likewise.
	* varasm.c (output_constant_pool_2): Likewise.

From-SVN: r228478
2015-10-05 11:37:49 +00:00
Richard Sandiford
555affd7a4 Remove remaining uses of CONST_DOUBLE_FROM_REAL_VALUE
This patch replaces all uses of CONST_DOUBLE_FROM_REAL_VALUE
with the already-existing const_double_from_real_value.

Bootstrapped & regression-tested on x86_64-linux-gnu.  Also tested by
building one target per CPU directory and checking that there were
no new warnings and no changes in testsuite output at -O2.

gcc/
	* real.h (CONST_DOUBLE_ATOF): Use const_double_from_real_value
	instead of CONST_DOUBLE_FROM_REAL_VALUE.
	(CONST_DOUBLE_FROM_REAL_VALUE): Delete.
	* config/c6x/c6x.md (divsf3, divdf3): Use const_double_from_real_value
	instead of CONST_DOUBLE_FROM_REAL_VALUE.
	* config/epiphany/epiphany.md (fixuns_truncsfsi2): Likewise.
	* config/i386/i386.c (standard_80387_constant_rtx): Likewise.
	(ix86_expand_builtin, ix86_emit_i387_log1p, ix86_emit_i387_round)
	(ix86_emit_swsqrtsf): Likewise.
	* config/ia64/ia64.c (ia64_expand_builtin): Likewise.
	* config/mips/mips.md (fixuns_truncdfsi2, fixuns_truncdfdi2)
	(fixuns_truncsfsi2, fixuns_truncsfdi2): Likewise.
	* config/pa/pa.c (pa_expand_builtin): Likewise.
	* config/rs6000/rs6000.c (rs6000_load_constant_and_splat): Likewise.
	(rs6000_scale_v2df): Likewise.
	* config/rs6000/rs6000.md (*cmptf_internal2): Likewise.
	* config/s390/s390.md (fixuns_truncdddi2, fixuns_trunctddi2)
	(fixuns_trunc<BFP:mode><GPR:mode>2): Likewise.
	* config/s390/vx-builtins.md (vec_ctd_s64, vec_ctd_u64, vec_ctsl)
	(vec_ctul): Likewise.
	* config/sparc/sparc.c (sparc_emit_fixunsdi): Likewise.
	* config/spu/spu.c (hwint_to_const_double, spu_float_const): Likewise.
	* config/spu/spu.md (floatunsdisf2, floatunstisf2): Likewise.
	* cse.c (fold_rtx): Likewise.
	* emit-rtl.c (immed_double_const): Likewise (in comments).
	(init_emit_once): Likewise.
	* expr.c (compress_float_constant, expand_expr_real_1)
	(const_vector_from_tree): Likewise.
	* optabs.c (expand_float, expand_fix): Likewise.
	* reg-stack.c (reg_to_stack): Likewise.
	* simplify-rtx.c (avoid_constant_pool_reference): Likewise.
	(simplify_const_unary_operation, simplify_binary_operation_1)
	(simplify_const_binary_operation, simplify_relational_operation)
	(simplify_immed_subreg): Likewise.

From-SVN: r228477
2015-10-05 11:36:08 +00:00
Richard Sandiford
5c88ea9456 Remove remaining uses of REAL_ARITHMETIC
This patch replaces all remaining uses of the old target macro
REAL_ARITHMETIC with calls to the (now generic) real_arithmetic
function.

Bootstrapped & regression-tested on x86_64-linux-gnu.  Also tested by
building one target per CPU directory and checking that there were
no new warnings and no changes in testsuite output at -O2.

gcc/ada/
	* gcc-interface/trans.c (convert_with_check): Use real_arithmetic
	instead of REAL_ARITHMETIC.

gcc/
	* doc/tm.texi.in (REAL_ARITHMETIC): Delete.
	* doc/tm.texi: Regenerate.
	* real.h (REAL_ARITHMETIC): Delete.
	* config/i386/i386.c (ix86_expand_lround, ix86_expand_round)
	(ix86_expand_round_sse4): Use real_arithmetic instead of
	REAL_ARITHMETIC.
	* config/i386/sse.md (round<mode>2): Likewise.
	* rtl.h (rtx_to_tree_code): Likewise (in comment).
	* explow.c (rtx_to_tree_code): Likewise (in comment).
	* match.pd: Likewise.
	* simplify-rtx.c (simplify_binary_operation_1): Likewise.
	* tree-ssa-math-opts.c (representable_as_half_series_p): Likewise.
	(expand_pow_as_sqrts): Likewise.
	* tree-pretty-print.c (dump_generic_node): Remove code that
	was conditional on REAL_ARITHMETIC being undefined.

From-SVN: r228476
2015-10-05 11:35:07 +00:00
Richard Sandiford
8cb41028fe Replace REAL_VALUES_LESS with real_less
This patch continues the removal of real-related macros by
replacing REAL_VALUES_LESS with real_less.

Bootstrapped & regression-tested on x86_64-linux-gnu.  Also tested by
building one target per CPU directory and checking that there were
no new warnings and no changes in testsuite output at -O2.

gcc/ada/
	* gcc-interface/trans.c (convert_with_check): Use real_less instead
	of REAL_VALUES_LESS.

gcc/
	* doc/tm.texi.in (REAL_VALUES_LESS): Delete.
	* doc/tm.texi: Regenerate.
	* real.h (real_less): Declare.
	(REAL_VALUES_LESS): Delete.
	* real.c (real_less): New function.
	(real_compare): Use it.
	* config/m68k/m68k.c (floating_exact_log2): Use real_less instead
	of REAL_VALUES_LESS.
	* config/microblaze/microblaze.c (microblaze_const_double_ok):
	Likewise.
	* fold-const.c (fold_convert_const_int_from_real): Likewise.
	* simplify-rtx.c (simplify_const_unary_operation): Likewise.
	(simplify_const_relational_operation): Likewise.
	* tree-call-cdce.c (check_pow): Likewise.
	(gen_conditions_for_pow_cst_base): Likewise.

From-SVN: r228475
2015-10-05 11:32:25 +00:00
Richard Sandiford
1a25c6b1a1 Remove remaining uses of REAL_VALUES_IDENTICAL
This patch continues the removal of real-related macros.
We already had both the old-style REAL_VALUES_IDENTICAL and the
new-style real_identical, so this patch replaces all remaining
uses of the former with the latter.

Bootstrapped & regression-tested on x86_64-linux-gnu.  Also tested by
building one target per CPU directory and checking that there were
no new warnings and no changes in testsuite output at -O2.

gcc/
	* real.h (REAL_VALUES_IDENTICAL): Delete.
	* config/m68k/m68k.c (standard_68881_constant_p): Use real_identical
	instead of REAL_VALUES_IDENTICAL.
	* fold-const.c (operand_equal_p): Likewise.
	* ipa-icf.c (sem_variable::equals): Likewise.
	* tree-complex.c (some_nonzerop): Likewise.
	(expand_complex_multiplication): Likewise.
	* tree.c (simple_cst_equal): Likewise.
	* varasm.c (compare_constant): Likewise.
---
 gcc/config/m68k/m68k.c | 5 ++---
 gcc/fold-const.c       | 3 +--
 gcc/ipa-icf.c          | 4 ++--
 gcc/real.h             | 1 -
 gcc/tree-complex.c     | 4 ++--
 gcc/tree.c             | 2 +-
 gcc/varasm.c           | 2 +-
 7 files changed, 9 insertions(+), 12 deletions(-)

From-SVN: r228474
2015-10-05 11:30:52 +00:00
Richard Sandiford
624d31fe01 Replace REAL_VALUES_EQUAL with real_equal
Richard B suggested we should replace dconsthalf etc. with
dconst<1, 2> ().  When I tried that, the extra comma caused problems
with some lingering uses of the old target macros for handling reals
(e.g. REAL_ARITHMETIC instead of real_arithmetic), since the constant
was then treated as two macro parameters.  It would have been possible
to add an extra level of brackets to avoid this, but I thought I might
as well take the opportunity to remove the macros instead.  (Note that
I'm only removing macros that caused a problem directly, or are closely
related to ones that did.)

This first patch replaces REAL_VALUES_EQUAL with a real_equal function.
The prototype is the same as for real_identical, which has already
undergone a half-transition in this direction.

Bootstrapped & regression-tested on x86_64-linux-gnu.  Also tested by
building one target per CPU directory and checking that there were
no new warnings and no changes in testsuite output at -O2.

gcc/c-family/
	* c-lex.c (interpret_float): Use real_equal instead of
	REAL_VALUES_EQUAL.

gcc/c/
	* c-typeck.c (c_tree_equal): Use real_equal instead of
	REAL_VALUES_EQUAL.

gcc/cp/
	* tree.c (cp_tree_equal): Use real_equal instead of
	REAL_VALUES_EQUAL.

gcc/
	* real.h (real_equal): Declare.
	(REAL_VALUES_EQUAL): Delete.
	* real.c (real_equal): New function.
	(real_compare): Use it.
	* doc/tm.texi.in (REAL_VALUES_EQUAL): Delete.
	* doc/tm.texi: Regenerate.
	* builtins.c (fold_builtin_pow, fold_builtin_load_exponent): Use
	real_equal instead of REAL_VALUES_EQUAL.
	* config/aarch64/aarch64.c (aarch64_float_const_zero_rtx_p): Likewise.
	* config/arm/arm.c (arm_const_double_rtx, neon_valid_immediate)
	(fp_const_from_val): Likewise.
	* config/fr30/fr30.c (fr30_const_double_is_zero): Likewise.
	* config/m68k/m68k.c (standard_68881_constant_p): Likewise.
	(floating_exact_log2): Likewise.
	* config/sh/sh.c (fp_zero_operand, fp_one_operand): Likewise.
	* config/vax/vax.c (vax_float_literal): Likewise.
	* config/xtensa/predicates.md (const_float_1_operand): Likewise.
	* cprop.c (implicit_set_cond_p): Likewise.
	* expmed.c (expand_mult): Likewise.
	* fold-const.c (const_binop): Likewise.
	* simplify-rtx.c (simplify_binary_operation_1): Likewise.
	(simplify_const_binary_operation): Likewise.
	(simplify_const_relational_operation): Likewise.
	* tree-call-cdce.c (check_pow): Likewise.
	(gen_conditions_for_pow_cst_base): Likewise.
	* tree-inline.c (estimate_num_insns): Likewise.
	* tree-ssa-dom.c (record_equality): Likewise.
	* tree-ssa-math-opts.c (representable_as_half_series_p): Likewise.
	(gimple_expand_builtin_pow): Likewise.
	(pass_optimize_widening_mul::execute): Likewise.
	* tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
	* tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
	* tree.c (real_zerop, real_onep, real_minus_onep): Likewise.
---
 gcc/builtins.c                  | 14 +++++++-------
 gcc/c-family/c-lex.c            |  6 +++---
 gcc/c/c-typeck.c                |  2 +-
 gcc/config/aarch64/aarch64.c    |  2 +-
 gcc/config/arm/arm.c            |  6 +++---
 gcc/config/fr30/fr30.c          |  2 +-
 gcc/config/m68k/m68k.c          |  6 +++---
 gcc/config/sh/sh.c              |  4 ++--
 gcc/config/vax/vax.c            |  4 ++--
 gcc/config/xtensa/predicates.md |  2 +-
 gcc/cp/tree.c                   |  2 +-
 gcc/cprop.c                     |  2 +-
 gcc/doc/tm.texi                 |  7 -------
 gcc/doc/tm.texi.in              |  7 -------
 gcc/expmed.c                    |  2 +-
 gcc/fold-const.c                |  2 +-
 gcc/real.c                      | 10 +++++++++-
 gcc/real.h                      |  4 ++--
 gcc/simplify-rtx.c              | 16 ++++++++--------
 gcc/tree-call-cdce.c            |  4 ++--
 gcc/tree-inline.c               |  5 +++--
 gcc/tree-ssa-dom.c              |  2 +-
 gcc/tree-ssa-math-opts.c        | 16 ++++++++--------
 gcc/tree-ssa-uncprop.c          |  2 +-
 gcc/tree-vect-patterns.c        |  4 ++--
 gcc/tree.c                      |  6 +++---
 26 files changed, 67 insertions(+), 72 deletions(-)

From-SVN: r228473
2015-10-05 11:29:35 +00:00
Richard Biener
7d475a5476 re PR ipa/67783 (quadratic time consumption in IPA inlining with -O1 and higher)
2015-10-05  Richard Biener  <rguenther@suse.de>

	PR ipa/67783
	* ipa-inline-analysis.c (estimate_function_body_sizes): Only
	consider loop header PHI defs as IVs.

From-SVN: r228472
2015-10-05 11:15:10 +00:00
Richard Biener
9c709f6465 tree-ssa-pre.c (create_component_ref_by_pieces_1): Move call handling ...
2015-10-05  Richard Biener  <rguenther@suse.de>

	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Move
	call handling ...
	(create_expression_by_pieces): ... here and build GIMPLE
	calls directly.  Use gimple_build API and avoid force_gimple_operand.
	(insert_into_preds_of_block): Simplify.
	(do_regular_insertion): Add comment.

From-SVN: r228471
2015-10-05 11:13:14 +00:00
Ramana Radhakrishnan
562eadf8e0 [Patch ARM/ AArch64] Fix typo in vcvt_f16.c testcase .
This test worked by accident. While looking at why this was failing randomly in my builds, I discovered a bug in the way in which the testcases were written up in this case.



2015-10-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	* gcc.target/aarch64/advsimd-intrinsics/vcvt_f16.c (TEST_MSG): Fix typo.
	(exec_vcvt): Add comments.

From-SVN: r228470
2015-10-05 11:08:45 +00:00
Ville Voutilainen
057ce49719 re PR c++/67844 (Cannot make tuple of class with template constructor)
2015-10-05  Ville Voutilainen  <ville.voutilainen@gmail.com>

	PR 67844.
	* include/std/tuple (_TC::_NonNestedTuple): Eagerly reject
	conversions from tuple types same as the target tuple.
	* testsuite/20_util/tuple/67844.cc: New.
	* testsuite/20_util/tuple/cons/nested_tuple_construct.cc: Add
	a missing copyright header.

From-SVN: r228468
2015-10-05 12:57:20 +03:00
GCC Administrator
aa385812b3 Daily bump.
From-SVN: r228465
2015-10-05 00:16:15 +00:00
Jason Merrill
b8fd7909c0 Implement N4514, C++ Extensions for Transactional Memory.
gcc/
	* builtins.def (BUILT_IN_ABORT): Add transaction_pure attribute.
gcc/c-family/
	* c-common.c (c_common_reswords): Add C++ TM TS keywords.
	(c_common_attribute_table): Add transaction_safe_dynamic.
	transaction_safe now affects type identity.
	(handle_tm_attribute): Handle transaction_safe_dynamic.
	* c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
	RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
	(OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
	(D_TRANSMEM): New.
	* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
	* c-pretty-print.c (pp_c_attributes_display): Don't print
	transaction_safe in C++.
gcc/c/
	* c-parser.c (c_lex_one_token): Handle @synchronized.
	* c-decl.c (match_builtin_function_types): A declaration of a built-in
	can change whether the function is transaction_safe.
gcc/cp/
	* cp-tree.h (struct cp_declarator): Add tx_qualifier field.
	(BCS_NORMAL, BCS_TRANSACTION): New enumerators.
	* lex.c (init_reswords): Limit TM kewords to -fgnu-tm.
	* parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized.
	(make_call_declarator): Take tx_qualifier.
	(cp_parser_tx_qualifier_opt): New.
	(cp_parser_lambda_declarator_opt): Use it.
	(cp_parser_direct_declarator): Likewise.
	(cp_parser_statement): Handle atomic_noexcept, atomic_cancel.
	(cp_parser_compound_statement): Change in_try parameter to bcs_flags.
	(cp_parser_std_attribute): Map optimize_for_synchronized to
	transaction_callable.
	(cp_parser_transaction): Take the token.  Handle atomic_noexcept.
	* lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety.
	* call.c (enum conversion_kind): Add ck_tsafe.
	(standard_conversion): Handle transaction-safety conversion.
	(convert_like_real, resolve_address_of_overloaded_function): Likewise.
	(check_methods): Diagnose transaction_safe_dynamic on non-virtual
	function.
	(look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic.
	* cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant)
	(can_convert_tx_safety): New.
	* typeck.c (composite_pointer_type): Handle transaction-safety.
	* name-lookup.h (enum scope_kind): Add sk_transaction.
	* name-lookup.c (begin_scope): Handle it.
	* semantics.c (begin_compound_stmt): Pass it.
	* decl.c (check_previous_goto_1): Check it.
	(struct named_label_entry): Add in_transaction_scope.
	(poplevel_named_label_1): Set it.
	(check_goto): Check it.
	(duplicate_decls): A specialization can be transaction_safe
	independently of its template.
	(grokdeclarator): Handle tx-qualifier.
	* rtti.c (ptr_initializer): Handle transaction-safe.
	* search.c (check_final_overrider): Check transaction_safe_dynamic.
	Don't check transaction_safe.
	* mangle.c (write_function_type): Mangle transaction_safe here.
	(write_CV_qualifiers_for_type): Not here.
	(write_type): Preserve transaction_safe when stripping attributes.
	* error.c (dump_type_suffix): Print transaction_safe.
libiberty/
	* cp-demangle.c (d_cv_qualifiers): Dx means transaction_safe.
	(cplus_demangle_type): Let d_cv_qualifiers handle it.
	(d_dump, d_make_comp, has_return_type, d_encoding)
	(d_count_templates_scopes, d_print_comp_inner)
	(d_print_mod_list, d_print_mod, d_print_function_type)
	(is_ctor_or_dtor): Handle DEMANGLE_COMPONENT_TRANSACTION_SAFE.

From-SVN: r228462
2015-10-04 15:17:19 -04:00
Uros Bizjak
bd841941ec re PR rtl-optimization/67447 (ICE in extract_constrain_insn (reload_cse_simplify_operands): insn does not satisfy its constraints)
PR rtl-optimization/67447
	* gcc.target/i386/pr67447.c: New test.

From-SVN: r228461
2015-10-04 17:56:45 +02:00
Uros Bizjak
beabed9997 i386.c (ix86_nsaved_regs): Use GENERAL_REGNO_P to check for general register.
* config/i386/i386.c (ix86_nsaved_regs): Use GENERAL_REGNO_P to
	check for general register.
	(ix86_emit_save_regs): Ditto.
	(ix86_emit_save_regs_using_mov): Ditto.
	(ix86_emit_restore_regs_using_pop): Ditto.
	(ix86_emit_restore_regs_using_mov): Ditto.

From-SVN: r228460
2015-10-04 16:09:23 +02:00
Uros Bizjak
51daf35866 vect-pack-trunc-1.c: Require avx512bw effective target.
* gcc.target/i386/vect-pack-trunc-1.c: Require avx512bw
	effective target.
	* gcc.target/i386/vect-pack-trunc-2.c: Ditto.
	* gcc.target/i386/vect-perm-even-1.c: Ditto.
	* gcc.target/i386/vect-perm-odd-1.c: Ditto.
	* gcc.target/i386/vect-unpack-1.c: Ditto.
	* gcc.target/i386/vect-unpack-2.c: Ditto.

From-SVN: r228459
2015-10-04 16:02:05 +02:00
Mikael Morin
2018f53e80 Remove dead code
gcc/fortran/
	* match.c (gfc_match_common): Remove dead variable old_blank_common.

From-SVN: r228458
2015-10-04 13:42:03 +00:00