Commit Graph

55808 Commits

Author SHA1 Message Date
DJ Delorie 54bfc99b90 * config/rl78/rl78-virt.md (movhi_virt): Allow const->far moves.
From-SVN: r213995
2014-08-14 20:23:38 -04:00
Jan Hubicka 80b6ba2878 re PR tree-optimization/62091 (ice in before_dom_children)
PR tree-optimization/62091
	* g++.dg/ipa/devirt-38.C: New testcase.
	* tree-ssa-alias.c (walk_aliased_vdefs_1): Do not clear
	function_entry_reached.
	(walk_aliased_vdefs): Clear it here.
	* ipa-devirt.c (check_stmt_for_type_change): Handle static storage.

From-SVN: r213991
2014-08-14 23:36:22 +00:00
Jan Hubicka 56b1f114de ipa-utils.h (compare_virtual_tables): Declare.
* ipa-utils.h (compare_virtual_tables): Declare.
	* ipa-devirt.c (odr_subtypes_equivalent_p): New function

	* lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.

From-SVN: r213990
2014-08-14 23:30:46 +00:00
Marek Polacek 0ee9c843d8 DR 458
DR 458
	* ginclude/stdatomic.h (__atomic_type_lock_free): Remove.
	(ATOMIC_*_LOCK_FREE): Map to __GCC_ATOMIC_*_LOCK_FREE.

	* gcc.dg/c11-stdatomic-2.c: New test.

From-SVN: r213981
2014-08-14 18:56:10 +00:00
Tom de Vries 9c8d7ac2a3 Fix ChangeLog entry
From-SVN: r213976
2014-08-14 17:56:18 +00:00
Tom de Vries 451d542ef4 Remove duplicate declaration of mem_attrs_eq_p
2014-08-14  Tom de Vries  <tom@codesourcery.com>

	* emit-rtl.h (mem_attrs_eq_p): Remove duplicate declaration.

From-SVN: r213975
2014-08-14 17:41:44 +00:00
Tom de Vries df5d402aba Fix if-conversion pass for dead type-unsafe code
2014-08-14  Tom de Vries  <tom@codesourcery.com>

	PR rtl-optimization/62004
	PR rtl-optimization/62030
	* ifcvt.c (rtx_interchangeable_p): New function.
	(noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.
	* emit-rtl.h (mem_attrs_eq_p): Declare.

	* gcc.dg/pr62004.c: New test.
	* gcc.dg/pr62030.c: Same.
	* gcc.target/mips/pr62030-octeon.c: Same.

From-SVN: r213970
2014-08-14 16:13:59 +00:00
Roman Gareev 821fce246e graphite-scop-detection.c: Add inclusion of cp-tree.h.
[gcc/]

	* graphite-scop-detection.c:
	Add inclusion of cp-tree.h.
	(graphite_can_represent_scev): Disables the handling of SSA_NAME nodes
	in case they are pointers to object types

From-SVN: r213969
2014-08-14 14:53:59 +00:00
Richard Biener 2813008eeb BASE-VER: Change to 5.0.0
2014-08-14  Richard Biener  <rguenther@suse.de>

	* BASE-VER: Change to 5.0.0

From-SVN: r213968
2014-08-14 13:58:50 +00:00
Alexander Ivchenko 8b99429794 sse.md (define_mode_attr avx512): New.
gcc/
        * config/i386/sse.md (define_mode_attr avx512): New.
	(define_mode_attr sse2_avx_avx512f): Allow V8HI, V16HI, V32HI, V2DI,
	V4DI modes.
	(define_mode_attr sse2_avx2): Allow V64QI, V32HI, V4TI modes.
	(define_mode_attr ssse3_avx2): Ditto.
	(define_mode_attr sse4_1_avx2): Allow V64QI, V32HI, V8DI modes.
	(define_mode_attr avx2_avx512bw): New.
	(define_mode_attr ssedoublemodelower): New.
	(define_mode_attr ssedoublemode): Allow V8SF, V8SI, V4DI, V4DF, V4SI,
	V32HI, V64QI modes.
	(define_mode_attr ssebytemode): Allow V8DI modes.
	(define_mode_attr sseinsnmode): Allow V4TI, V32HI, V64QI modes.
	(define_mode_attr sseintvecmodelower): Allow V8DF, V4TI modes.
	(define_mode_attr ssePSmode2): New.
	(define_mode_attr ssescalarsize): Allow V64QI, V32QI, V16QI, V8HI,
	V16HI, V32HI modes.
	(define_mode_attr dbpsadbwmode): New.
	(define_mode_attr bcstscalarsuff): Allow V64QI, V32QI, V16QI, V32HI,
	V16HI, V8HI, V8SI, V4SI, V4DI, V2DI, V8SF, V4SF, V4DF, V2DF modes.
	(vi8_sse4_1_avx2_avx512): New.
	(define_insn <sse4_1_avx2>_movntdqa): Use <vi8_sse4_1_avx2_avx512>
	mode attribute.
	(define_mode_attr blendbits): Move before its immediate use.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r213966
2014-08-14 13:39:50 +00:00
Alexander Ivchenko 2534573e53 sse.md: Allow V64QI, V32QI, V32HI, V4HI modes.
gcc/
	* config/i386/sse.md: Allow V64QI, V32QI, V32HI, V4HI modes.
	* config/i386/subst.md
	(define_mode_iterator SUBST_V): Update.
	(define_mode_iterator SUBST_A): Ditto.
	(define_subst_attr "mask_operand7"): New.
	(define_subst_attr "mask_operand10"): New.
	(define_subst_attr "mask_operand_arg34") : New.
	(define_subst_attr "mask_expand_op3"): New.
	(define_subst_attr "mask_mode512bit_condition"): Handle TARGET_AVX512VL.
	(define_subst_attr "sd_mask_mode512bit_condition"): Ditto.
	(define_subst_attr "mask_avx512vl_condition"): New.
	(define_subst_attr "round_mask_operand4"): Ditto.
	(define_subst_attr "round_mask_scalar_op3"): Delete.
	(define_subst_attr "round_mask_op4"): New.
	(define_subst_attr "round_mode512bit_condition"): Allow V8DImode,
	V16SImode.
	(define_subst_attr "round_modev8sf_condition"): New.
	(define_subst_attr "round_modev4sf_condition"): GET_MODE instead of
	<MODE>mode.
	(define_subst_attr "round_saeonly_mask_operand4"): New.
	(define_subst_attr "round_saeonly_mask_op4"): New.
	(define_subst_attr "round_saeonly_mode512bit_condition"): Allow
	V8DImode, V16SImode.
	(define_subst_attr "round_saeonly_modev8sf_condition"): New.
	(define_subst_attr "mask_expand4_name" "mask_expand4"): New.
	(define_subst_attr "mask_expand4_args"): New.
	(define_subst "mask_expand4"): New.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r213965
2014-08-14 13:30:51 +00:00
Alexander Ivchenko e2131cc732 i386.md (define_attr "isa"): Add avx512bw,noavx512bw.
gcc/
        * config/i386/i386.md
	(define_attr "isa"): Add avx512bw,noavx512bw.
	(define_attr "enabled"): Ditto.
	(define_split): Add 32/64-bit mask logic.
	(define_insn "*k<logic>qi"): New.
	(define_insn "*k<logic>hi"): New.
	(define_insn "*anddi_1"): Add mask version.
	(define_insn "*andsi_1"): Ditto.
	(define_insn "*<code><mode>_1"): Ditto.
	(define_insn "*<code>hi_1"): Ditto.
	(define_insn "kxnor<mode>"): New.
	(define_insn "kunpcksi"): New.
	(define_insn "kunpckdi"): New.
	(define_insn "*one_cmpl<mode>2_1"): Add mask version.
	(define_insn "*one_cmplhi2_1"): Ditto.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r213964
2014-08-14 13:25:36 +00:00
Alexander Ivchenko 1d944b8a0a i386.c (ix86_preferred_simd_mode): Allow V64QImode and V32HImode.
gcc/
	* config/i386/i386.c (ix86_preferred_simd_mode): Allow V64QImode and
	V32HImode.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r213963
2014-08-14 13:20:25 +00:00
Alexander Ivchenko 9e4a4dd651 i386.c (print_reg): Сorrectly print 64-bit mask registers.
gcc/
	* config/i386/i386.c (print_reg): Сorrectly print 64-bit mask
	registers.
	(inline_secondary_memory_needed): Allow 64 bit wide mask registers.
	(ix86_hard_regno_mode_ok): Allow 32/64-bit mask registers and
	xmm/ymm16+ when availble.
	* config/i386/i386.h
	(HARD_REGNO_NREGS): Add mask regs.
	(VALID_AVX512F_REG_MODE): Ditto.
	(VALID_AVX512F_REG_MODE) : Define.
	(VALID_MASK_AVX512BW_MODE): Ditto.
	(reg_class) (MASK_REG_P(X)): Define.
	* config/i386/i386.md: Do not split long moves with mask register,
	use kmovb if avx512bw is availible.
	(movdi_internal): Handle mask registers.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r213962
2014-08-14 13:18:42 +00:00
Richard Biener 7d39012c24 re PR tree-optimization/62081 (ICE: in fix_loop_structure, at loop-init.c:208 with -fno-tree-ch -fno-tree-cselim -fno-tree-dominator-opts -fno-tree-reassoc -fno-tree-sink)
2014-08-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/62081
	* tree-ssa-loop.c (pass_fix_loops): New pass.
	(pass_tree_loop::gate):  Do not fixup loops here.
	* tree-pass.h (make_pass_fix_loops): Declare.
	* passes.def: Schedule pass_fix_loops before GIMPLE loop passes.

From-SVN: r213961
2014-08-14 13:14:24 +00:00
Richard Biener 0cff9154ec tree.c (type_hash_lookup, [...]): Merge into ...
2014-08-14  Richard Biener  <rguenther@suse.de>

	* tree.c (type_hash_lookup, type_hash_add): Merge into ...
	(type_hash_canon): ... this and avoid 2nd lookup for the add.

From-SVN: r213956
2014-08-14 11:15:41 +00:00
Richard Biener 35770bb20f re PR middle-end/62090 (ice in compute_may_aliases)
2014-08-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/62090
	* builtins.c (fold_builtin_sprintf): Move to gimple-fold.c.
	(fold_builtin_2): Do not fold sprintf.
	(fold_builtin_3): Likewise.
	* gimple-fold.c (gimple_fold_builtin_sprintf): New function
	moved from builtins.c.
	(gimple_fold_builtin): Fold sprintf.

	* gcc.dg/pr62090.c: New testcase.

From-SVN: r213951
2014-08-14 09:02:18 +00:00
Richard Biener 121bc7dc36 re PR tree-optimization/62079 (ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions)
2014-08-14  Richard Biener  <rguenther@suse.de>

	PR rtl-optimization/62079
	* recog.c (peephole2_optimize): If peep2_do_cleanup_cfg
	run cleanup_cfg.

	* g++.dg/pr62079.C: New testcase.

From-SVN: r213950
2014-08-14 08:56:49 +00:00
Ilya Enkovich 8e857bbfab ipa-devirt.c (get_polymorphic_call_info): Use fndecl instead of current_function_decl.
gcc/
	* ipa-devirt.c (get_polymorphic_call_info): Use fndecl instead of
	current_function_decl.

From-SVN: r213947
2014-08-14 08:46:44 +00:00
Ilya Enkovich 1113596f06 cgraph.c (cgraph_node::function_symbol): Fix wrong cgraph_function_node to cgraph_node::function_symbol refactoring.
gcc/
	* cgraph.c (cgraph_node::function_symbol): Fix wrong
	cgraph_function_node to cgraph_node::function_symbol
	refactoring.

From-SVN: r213946
2014-08-14 08:45:45 +00:00
Zhenqiang Chen 4d2df0f470 arm.c (arm_option_override): Set max_insns_skipped to MAX_INSN_PER_IT_BLOCK when optimize_size for THUMB2.
ChangeLog:
2014-08-14  Zhenqiang Chen  <zhenqiang.chen@arm.com>

	* config/arm/arm.c (arm_option_override): Set max_insns_skipped
	to MAX_INSN_PER_IT_BLOCK when optimize_size for THUMB2.

testsuite/ChangeLog:
2014-08-14  Zhenqiang Chen  <zhenqiang.chen@arm.com>

	* gcc.target/arm/max-insns-skipped.c: New test.

From-SVN: r213939
2014-08-14 04:47:43 +00:00
Chen Gang 7bf721898d Remove redundant '@' to avoid compiling warning
2014-08-13  Chen Gang  gang.chen.5i5j@gmail.com

	* microblaze/microblaze.md: Remove redundant '@' to avoid compiling
	warning.

From-SVN: r213913
2014-08-13 16:00:44 +00:00
Roman Gareev 0bcb976e6a pr35356-2.c: Update according to the ISL code generator.
[gcc/testsuite]

	* gcc.dg/graphite/pr35356-2.c: Update according to the ISL code
	generator.

From-SVN: r213905
2014-08-13 11:10:25 +00:00
Jakub Jelinek c7cf969cdb re PR target/62025 (Miscompilation of openssl sha512.c)
PR target/62025
	* sched-deps.c (find_inc): Check if inc_insn doesn't clobber
	any registers that are used in mem_insn.

From-SVN: r213887
2014-08-12 23:24:40 +02:00
Steve Ellcey 2e45addf83 mips.h (ASM_SPEC): Pass float options to assembler.
2014-08-12  Steve Ellcey  <sellcey@mips.com>

	* config/mips/mips.h (ASM_SPEC): Pass float options to assembler.

From-SVN: r213872
2014-08-12 15:39:04 +00:00
Steve Ellcey 909310bc4d t-mti-elf (MULTILIB_OPTIONS): Remove fp64 multilib.
2014-08-12  Steve Ellcey  <sellcey@mips.com>

	* config/mips/t-mti-elf (MULTILIB_OPTIONS): Remove fp64 multilib.
	(MULTILIB_DIRNAMES): Ditto.
	* config/mips/t-mti-elf (MULTILIB_OPTIONS): Ditto.
	* config/mips/t-mti-elf (MULTILIB_EXCEPTIONS): Ditto.
	* config/mips/t-mti-linux (MULTILIB_OPTIONS): Ditto.
	* config/mips/t-mti-linux (MULTILIB_DIRNAMES): Ditto.
	* config/mips/t-mti-linux (MULTILIB_EXCEPTIONS): Ditto.
	* config/mips/mti-linux.h (SYSROOT_SUFFIX_SPEC): Ditto.

From-SVN: r213868
2014-08-12 15:10:42 +00:00
Ramana Radhakrishnan e19707f507 re PR target/61413 (__ARM_SIZEOF_WCHAR_T is constant 32 -- should be 4 or 2)
Fix PR target/61413


2014-08-12  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/61413
	* config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Fix definition
	of __ARM_SIZEOF_WCHAR_T.

From-SVN: r213864
2014-08-12 14:59:23 +00:00
Ramana Radhakrishnan d31e00d4e9 re PR target/62098 (incorrect code generated by arm gcc)
Fix PR target/62098

2014-08-12  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/62098
	* config/arm/vfp.md (*combine_vcvtf2i): Fix constraint.
	Remove unnecessary attributes.

From-SVN: r213861
2014-08-12 14:32:07 +00:00
Yury Gribov 63a4184f75 internal-fn.c (init_internal_fns): Fix off-by-one.
2014-08-12  Yury Gribov  <y.gribov@samsung.com>
    
gcc/
	* internal-fn.c (init_internal_fns): Fix off-by-one.

From-SVN: r213848
2014-08-12 07:34:33 +00:00
Alexander Ivchenko 537ddba3f0 i386.c (standard_sse_constant_opcode): Use vpxord/vpternlog if avx512 is availible.
gcc/
	* config/i386/i386.c (standard_sse_constant_opcode): Use
	vpxord/vpternlog if avx512 is availible.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r213847
2014-08-12 07:28:15 +00:00
Thomas Preud'homme 3d8208ce68 re PR middle-end/62103 (Incorrect folding of bitfield in a union on big endian targets)
2014-08-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR middle-end/62103
    * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
    bitfields, that is when size doesn't match the size of type or the
    size of the constructor.

    gcc/testsuite/
    PR middle-end/62103
    * gcc.c-torture/execute/bitfld-6.c: New test.

From-SVN: r213846
2014-08-12 02:36:37 +00:00
John David Anglin 31fd809b65 Revert last change.
From-SVN: r213835
2014-08-11 19:51:38 +00:00
Michael Meissner 59f5868d30 constraints.md (wh constraint): New constraint, for FP registers if direct move is available.
2014-08-11  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/constraints.md (wh constraint): New constraint,
	for FP registers if direct move is available.
	(wi constraint): New constraint, for VSX/FP registers that can
	handle 64-bit integers.
	(wj constraint): New constraint for VSX/FP registers that can
	handle 64-bit integers for direct moves.
	(wk constraint): New constraint for VSX/FP registers that can
	handle 64-bit doubles for direct moves.
	(wy constraint): Make documentation match implementation.

	* config/rs6000/rs6000.c (struct rs6000_reg_addr): Add
	scalar_in_vmx_p field to simplify tests of whether SFmode or
	DFmode can go in the Altivec registers.
	(rs6000_hard_regno_mode_ok): Use scalar_in_vmx_p field.
	(rs6000_setup_reg_addr_masks): Likewise.
	(rs6000_debug_print_mode): Add debug support for scalar_in_vmx_p
	field, and wh/wi/wj/wk constraints.
	(rs6000_init_hard_regno_mode_ok): Setup scalar_in_vmx_p field, and
	the wh/wi/wj/wk constraints.
	(rs6000_preferred_reload_class): If SFmode/DFmode can go in the
	upper registers, prefer VSX registers unless the operation is a
	memory operation with REG+OFFSET addressing.

	* config/rs6000/vsx.md (VSr mode attribute): Add support for
	DImode.  Change SFmode to use ww constraint instead of d to allow
	SF registers in the upper registers.
	(VSr2): Likewise.
	(VSr3): Likewise.
	(VSr5): Fix thinko in comment.
	(VSa): New mode attribute that is an alternative to wa, that
	returns the VSX register class that a mode can go in, but may not
	be the preferred register class.
	(VS_64dm): New mode attribute for appropriate register classes for
	referencing 64-bit elements of vectors for direct moves and normal
	moves.
	(VS_64reg): Likewise.
	(vsx_mov<mode>): Change wa constraint to <VSa> to limit the
	register allocator to only registers the data type can handle.
	(vsx_le_perm_load_<mode>): Likewise.
	(vsx_le_perm_store_<mode>): Likewise.
	(vsx_xxpermdi2_le_<mode>): Likewise.
	(vsx_xxpermdi4_le_<mode>): Likewise.
	(vsx_lxvd2x2_le_<mode>): Likewise.
	(vsx_lxvd2x4_le_<mode>): Likewise.
	(vsx_stxvd2x2_le_<mode>): Likewise.
	(vsx_add<mode>3): Likewise.
	(vsx_sub<mode>3): Likewise.
	(vsx_mul<mode>3): Likewise.
	(vsx_div<mode>3): Likewise.
	(vsx_tdiv<mode>3_internal): Likewise.
	(vsx_fre<mode>2): Likewise.
	(vsx_neg<mode>2): Likewise.
	(vsx_abs<mode>2): Likewise.
	(vsx_nabs<mode>2): Likewise.
	(vsx_smax<mode>3): Likewise.
	(vsx_smin<mode>3): Likewise.
	(vsx_sqrt<mode>2): Likewise.
	(vsx_rsqrte<mode>2): Likewise.
	(vsx_tsqrt<mode>2_internal): Likewise.
	(vsx_fms<mode>4): Likewise.
	(vsx_nfma<mode>4): Likewise.
	(vsx_eq<mode>): Likewise.
	(vsx_gt<mode>): Likewise.
	(vsx_ge<mode>): Likewise.
	(vsx_eq<mode>_p): Likewise.
	(vsx_gt<mode>_p): Likewise.
	(vsx_ge<mode>_p): Likewise.
	(vsx_xxsel<mode>): Likewise.
	(vsx_xxsel<mode>_uns): Likewise.
	(vsx_copysign<mode>3): Likewise.
	(vsx_float<VSi><mode>2): Likewise.
	(vsx_floatuns<VSi><mode>2): Likewise.
	(vsx_fix_trunc<mode><VSi>2): Likewise.
	(vsx_fixuns_trunc<mode><VSi>2): Likewise.
	(vsx_x<VSv>r<VSs>i): Likewise.
	(vsx_x<VSv>r<VSs>ic): Likewise.
	(vsx_btrunc<mode>2): Likewise.
	(vsx_b2trunc<mode>2): Likewise.
	(vsx_floor<mode>2): Likewise.
	(vsx_ceil<mode>2): Likewise.
	(vsx_<VS_spdp_insn>): Likewise.
	(vsx_xscvspdp): Likewise.
	(vsx_xvcvspuxds): Likewise.
	(vsx_float_fix_<mode>2): Likewise.
	(vsx_set_<mode>): Likewise.
	(vsx_extract_<mode>_internal1): Likewise.
	(vsx_extract_<mode>_internal2): Likewise.
	(vsx_extract_<mode>_load): Likewise.
	(vsx_extract_<mode>_store): Likewise.
	(vsx_splat_<mode>): Likewise.
	(vsx_xxspltw_<mode>): Likewise.
	(vsx_xxspltw_<mode>_direct): Likewise.
	(vsx_xxmrghw_<mode>): Likewise.
	(vsx_xxmrglw_<mode>): Likewise.
	(vsx_xxsldwi_<mode>): Likewise.
	(vsx_xscvdpspn): Tighten constraints to only use register classes
	the types use.
	(vsx_xscvspdpn): Likewise.
	(vsx_xscvdpspn_scalar): Likewise.

	* config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wh, wi,
	wj, and wk constraints.
	(GPR_REG_CLASS_P): New helper macro for register classes targeting
	general purpose registers.

	* config/rs6000/rs6000.md (f32_dm): Use wh constraint for SDmode
	direct moves.
	(zero_extendsidi2_lfiwz): Use wj constraint for direct move of
	DImode instead of wm.  Use wk constraint for direct move of DFmode
	instead of wm.
	(extendsidi2_lfiwax): Likewise.
	(lfiwax): Likewise.
	(lfiwzx): Likewise.
	(movdi_internal64): Likewise.

	* doc/md.texi (PowerPC and IBM RS6000): Document wh, wi, wj, and
	wk constraints. Make the wy constraint documentation match them
	implementation.

From-SVN: r213834
2014-08-11 19:48:17 +00:00
John David Anglin b2f86285bd re PR target/62038 (Out of range branch target in thunk)
PR target/62038
	* config/pa/pa.c (pa_asm_output_mi_thunk): Use a branch with %r31 link
	register.

From-SVN: r213829
2014-08-11 19:07:16 +00:00
Mircea Namolaru b47595f765 Replacement of isl_int by isl_val
From-SVN: r213816
2014-08-11 15:05:48 +00:00
Richard Biener 7cadcdc162 re PR tree-optimization/62075 (Vectorizer ICE on dolphin)
2014-08-11  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/62075
	* tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
	handle uses in patterns.

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

From-SVN: r213815
2014-08-11 14:48:24 +00:00
Alexander Ivchenko f4af595f28 gcc/
* common/config/i386/i386-common.c
	(OPTION_MASK_ISA_AVX512VL_SET): Define.
	(OPTION_MASK_ISA_AVX512F_UNSET): Update.
	(ix86_handle_option): Handle OPT_mavx512vl.
	* config/i386/cpuid.h (bit_AVX512VL): Define.
	* config/i386/driver-i386.c (host_detect_local_cpu): Detect avx512vl,
	set -mavx512vl accordingly.
	* config/i386/i386-c.c (ix86_target_macros_internal): Handle
	OPTION_MASK_ISA_AVX512VL.
	* config/i386/i386.c (ix86_target_string): Handle -mavx512vl.
	(ix86_option_override_internal): Define PTA_AVX512VL, handle
	PTA_AVX512VL and OPTION_MASK_ISA_AVX512VL.
	(ix86_valid_target_attribute_inner_p): Handle OPT_mavx512vl.
	* config/i386/i386.h (TARGET_AVX512VL): Define.
	(TARGET_AVX512VL_P(x)): Ditto.
	* config/i386/i386.opt: Add mavx512vl.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r213813
2014-08-11 11:39:14 +00:00
Felix Yang d4759fc61b re PR c/62073 (Segmentation fault with tree vectorize)
2014-08-11  Felix Yang  <fei.yang0953@gmail.com>

	PR tree-optimization/62073
	* tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
	a basic block.

	* gcc.dg/vect/pr62073.c: New test.

From-SVN: r213812
2014-08-11 11:24:35 +00:00
Alexander Ivchenko b525d9437f i386-common.c (OPTION_MASK_ISA_AVX512BW_SET): Define.
gcc/
        * common/config/i386/i386-common.c
	(OPTION_MASK_ISA_AVX512BW_SET) : Define.
	(OPTION_MASK_ISA_AVX512BW_UNSET): Ditto.
	(OPTION_MASK_ISA_AVX512VL_UNSET) : Ditto.
	(ix86_handle_option): Handle OPT_mavx512bw.
	* config/i386/cpuid.h (bit_AVX512BW): Define.
	* config/i386/driver-i386.c (host_detect_local_cpu): Detect avx512bw,
	set -mavx512bw accordingly.
	* config/i386/i386-c.c (ix86_target_macros_internal): Handle
	OPTION_MASK_ISA_AVX512BW.
	* config/i386/i386.c (ix86_target_string): Handle -mavx512bw.
	(ix86_option_override_internal): Define PTA_AVX512BW, handle
	PTA_AVX512BW and OPTION_MASK_ISA_AVX512BW.
	(ix86_valid_target_attribute_inner_p): Handle OPT_mavx512bw.
	* config/i386/i386.h (TARGET_AVX512BW): Define.
	(TARGET_AVX512BW_P(x)): Ditto.
	* config/i386/i386.opt: Add mavx512bw.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r213811
2014-08-11 11:22:26 +00:00
Richard Biener 5f732aeb8e re PR tree-optimization/62070 (ICE: verify_ssa failed)
2014-08-11  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/62070
	* tree-ssa-loop-manip.c (gimple_duplicate_loop_to_header_edge):
	Remove SSA checking.

	* gcc.dg/pr62070.c: New testcase.

From-SVN: r213810
2014-08-11 10:55:10 +00:00
Yury Gribov c62ccb9a0a Move inlining of Asan memory checks to sanopt pass.
Change asan-instrumentation-with-call-threshold to more closely match LLVM.

2014-08-11  Yury Gribov  <y.gribov@samsung.com>

gcc/
	* asan.c (asan_check_flags): New enum.
	(build_check_stmt_with_calls): Removed function.
	(build_check_stmt): Split inlining logic to
	asan_expand_check_ifn.
	(instrument_derefs): Rename parameter.
	(instrument_mem_region_access): Rename parameter.
	(instrument_strlen_call): Likewise.
	(asan_expand_check_ifn): New function.
	(asan_instrument): Remove old code.
	(pass_sanopt::execute): Change handling of
	asan-instrumentation-with-call-threshold.
	(asan_clear_shadow): Fix formatting.
	(asan_function_start): Likewise.
	(asan_emit_stack_protection): Likewise.
	* doc/invoke.texi (asan-instrumentation-with-call-threshold):
	Update description.
	* internal-fn.c (expand_ASAN_CHECK): New function.
	* internal-fn.def (ASAN_CHECK): New internal function.
	* params.def (PARAM_ASAN_INSTRUMENTATION_WITH_CALL_THRESHOLD):
	Update description.
	(PARAM_ASAN_USE_AFTER_RETURN): Likewise.
	* tree.c: Small comment fix.

gcc/testsuite/
	* c-c++-common/asan/inc.c: Update test.
	* c-c++-common/asan/instrument-with-calls-2.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-1.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-2.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-3.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-4.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-5.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-6.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-7.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-8.c: Likewise.
	* c-c++-common/asan/no-redundant-instrumentation-9.c: Likewise.

From-SVN: r213807
2014-08-11 06:12:12 +00:00
Yury Gribov b78475cf73 Added fnspec to internal functions.
2014-08-11  Yury Gribov  <y.gribov@samsung.com>

gcc/
        * gimple.c (gimple_call_fnspec): Support internal functions.
        (gimple_call_return_flags): Use const.
        * Makefile.in (GTFILES): Add internal-fn.h to list of GC files.
        * internal-fn.def: Add fnspec information.
        * internal-fn.h (internal_fn_fnspec): New function.
        (init_internal_fns): Declare new function.
        * internal-fn.c (internal_fn_fnspec_array): New global variable.
        (init_internal_fns): New function.
        * tree-core.h: Update macro call.
        * tree.c (build_common_builtin_nodes): Initialize internal fns.

From-SVN: r213806
2014-08-11 06:06:29 +00:00
Gerald Pfeifer f473c082d8 lto-streamer.h (struct output_block::symbol): Change from struct symtab_node to plain symtab_node.
* lto-streamer.h (struct output_block::symbol): Change from
	struct symtab_node to plain symtab_node.
	(referenced_from_this_partition_p): Change first parameter
	from struct symtab_node to plain symtab_node.

From-SVN: r213805
2014-08-11 02:10:00 +00:00
Marek Polacek f3bede7188 re PR c/51849 (-Wc99-compat would be considered useful)
PR c/51849
gcc/
	* gcc/doc/invoke.texi: Document -Wc90-c99-compat.
gcc/c-family/
	* c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
	* c.opt (Wc90-c99-compat): Add option.
gcc/c/
	* c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
	Call pedwarn_c90 instead of pedwarn.
	(check_bitfield_type_and_width): Likewise.
	(declspecs_add_qual): Likewise.
	(declspecs_add_type): Likewise.
	(warn_variable_length_array): Unify function for -pedantic and -Wvla.
	Adjust to only call pedwarn_c90.
	(grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
	pedwarn_c90 instead of pedwarn.
	* c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
	* c-parser.c (disable_extension_diagnostics): Handle
	warn_c90_c99_compat.
	(restore_extension_diagnostics): Likewise.
	(c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
	pedwarn_c90 instead of pedwarn.
	(c_parser_initelt): Likewise.
	(c_parser_postfix_expression): Likewise.
	(c_parser_postfix_expression_after_paren_type): Likewise.
	(c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
	* c-tree.h: Fix formatting.
	* c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
	pedwarn_c90 instead of pedwarn.
gcc/testsuite/
	* gcc.dg/Wc90-c99-compat-1.c: New test.
	* gcc.dg/Wc90-c99-compat-2.c: New test.
	* gcc.dg/Wc90-c99-compat-3.c: New test.
	* gcc.dg/Wc90-c99-compat-4.c: New test.
	* gcc.dg/Wc90-c99-compat-5.c: New test.
	* gcc.dg/Wc90-c99-compat-6.c: New test.
	* gcc.dg/wvla-1.c: Adjust dg-warning.
	* gcc.dg/wvla-2.c: Adjust dg-warning.
	* gcc.dg/wvla-4.c: Adjust dg-warning.
	* gcc.dg/wvla-6.c: Adjust dg-warning.
libcpp/
	* lex.c (_cpp_lex_direct): Warn when -Wc90-c99-compat is in effect.
	* charset.c (_cpp_valid_ucn): Likewise.
	* include/cpplib.h (cpp_options): Add cpp_warn_c90_c99_compat.
	* macro.c (replace_args): Warn when -Wc90-c99-compat is in effect.
	(parse_params): Likewise.

From-SVN: r213786
2014-08-10 06:10:49 +00:00
Jan Hubicka 726540aa29 devirt-35.C: Fix template.
* g++.dg/ipa/devirt-35.C: Fix template.
	* g++.dg/ipa/devirt-36.C: Likewise.
	* g++.dg/ipa/devirt-37.C: New testcase.
	* ipa-devirt.c (get_dynamic_type): Handle case when instance is in
	DECL correctly; do not give up on types in static storage.

From-SVN: r213781
2014-08-09 22:07:55 +00:00
Paolo Carlini 6a6bdc3d09 invoke.texi ([Wnarrowing]): Update for non-constants in C++11.
2014-08-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* doc/invoke.texi ([Wnarrowing]): Update for non-constants in C++11.

gcc/cp
2014-08-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
	return type to bool; in C++11 for constants give errors, not pedwarns.
	* cp-tree.h (check_narrowing): Adjust declaration.
	* call.c (convert_like_real): Update calls.
	* semantics.c (finish_compound_literal): Likewise.

gcc/testsuite
2014-08-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/cpp0x/Wnarrowing1.C: Adjust for errors.
	* g++.dg/cpp0x/enum29.C: Adjust.

/libstdc++-v3
2014-08-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/pod_char_traits.h (char_traits<__gnu_cxx::
	character<_Value, _Int, _St> >::eof): Fix vs narrowing conversion.

From-SVN: r213776
2014-08-09 08:58:33 +00:00
Roman Gareev b5bdf598f9 [gcc/]
* graphite-isl-ast-to-gimple.c:
	(translate_isl_ast_node_user): Use nb_loops instead of loop->num + 1.

[gcc/testsuite]

	* gcc.dg/graphite/isl-ast-gen-user-1.c: New testcase.

From-SVN: r213774
2014-08-09 05:57:47 +00:00
Guozhi Wei b435752c2e rs6000.md (*movdi_internal64): Add a new constraint.
* config/rs6000/rs6000.md (*movdi_internal64): Add a new constraint.

From-SVN: r213767
2014-08-08 23:00:28 +00:00
Cary Coutant 4dd7c3b285 Remove skeleton type units that were being produced with -gsplit-dwarf.
These sections were originally intended as targets for .gdb_index
entries that needed to point to type units.  Because of the limitations
of the .debug_gnu_pubnames/pubtypes sections with split DWARF, we were
not able to pass along enough information to the gold linker to generate
those index entries properly, and they had to point to the CU instead.
GDB had to deal with that, and was updated a while ago to no longer
depend on the skeleton TU sections at all. This allows us to reduce
object file sizes with split DWARF by about 30%.

gcc/
	* dwarf2out.c (get_skeleton_type_unit): Remove.
	(output_skeleton_debug_sections): Remove skeleton type units.
	(output_comdat_type_unit): Likewise.
	(dwarf2out_finish): Likewise.

From-SVN: r213765
2014-08-08 13:33:26 -07:00
Yi Yang 7ca26091fc Remove a redundant assignment "*predictor = PRED_BUILTIN_EXPECT;", since six
lines later *predictor is assigned again.

--

2014-08-08  Yi Yang  <ahyangyi@google.com>

gcc:
    * predict.c (expr_expected_value_1): Remove the redundant assignment.

From-SVN: r213760
2014-08-08 12:06:51 -05:00
Richard Biener 207c68cd61 lto-streamer.h (struct lto_input_block): Make it a class with a constructor.
2014-08-08  Richard Biener  <rguenther@suse.de>

	* lto-streamer.h (struct lto_input_block): Make it a class
	with a constructor.
	(LTO_INIT_INPUT_BLOCK, LTO_INIT_INPUT_BLOCK_PTR): Remove.
	(struct lto_function_header, struct lto_simple_header,
	struct lto_simple_header_with_strings,
	struct lto_decl_header, struct lto_function_header): Make
	a simple inheritance hieararchy.  Remove unused fields.
	(struct lto_asm_header): Remove.
	* lto-streamer-out.c (produce_asm): Adjust.
	(lto_output_toplevel_asms): Likewise.
	(produce_asm_for_decls): Likewise.
	* lto-section-out.c (lto_destroy_simple_output_block): Likewise.
	* data-streamer-in.c (string_for_index): Likewise.
	* ipa-inline-analysis.c (inline_read_section): Likewise.
	* ipa-prop.c (ipa_prop_read_section): Likewise.
	(read_replacements_section): Likewise.
	* lto-cgraph.c (input_cgraph_opt_section): Likewise.
	* lto-section-in.c (lto_create_simple_input_block): Likewise.
	(lto_destroy_simple_input_block): Likewise.
	* lto-streamer-in.c (lto_read_body_or_constructor): Likewise.
	(lto_input_toplevel_asms): Likewise.

	lto/
	* lto.c (lto_read_decls): Adjust for lto_input_block changes.

From-SVN: r213759
2014-08-08 12:55:31 +00:00
Alexander Ivchenko 07165dd72c gcc/
* common/config/i386/i386-common.c
	(OPTION_MASK_ISA_AVX512DQ_SET): Define.
	(OPTION_MASK_ISA_AVX512DQ_UNSET): Ditto.
	(ix86_handle_option): Handle OPT_mavx512dq.
	* config/i386/cpuid.h (bit_AVX512DQ): Define.
	* config/i386/driver-i386.c (host_detect_local_cpu): Detect avx512dq,
	set -mavx512dq accordingly.
	* config/i386/i386-c.c (ix86_target_macros_internal): Handle
	OPTION_MASK_ISA_AVX512DQ.
	* config/i386/i386.c (ix86_target_string): Handle -mavx512dq.
	(ix86_option_override_internal): Define PTA_AVX512DQ, handle
	PTA_AVX512DQ and OPTION_MASK_ISA_AVX512DQ.
	(ix86_valid_target_attribute_inner_p): Handle OPT_mavx512dq.
	* config/i386/i386.h (TARGET_AVX512DQ): Define.
	(TARGET_AVX512DQ_P(x)): Ditto.
	* config/i386/i386.opt: Add mavx512dq.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r213757
2014-08-08 11:31:34 +00:00
Richard Biener fef5a0d95e builtins.c (c_getstr, [...]): Export.
2014-08-08  Richard Biener  <rguenther@suse.de>

	* builtins.c (c_getstr, readonly_data_expr, init_target_chars,
	target_percent, target_percent_s): Export.
	(var_decl_component_p, fold_builtin_memory_op, fold_builtin_memset,
	fold_builtin_bzero, fold_builtin_strcpy, fold_builtin_strncpy,
	fold_builtin_strcat, fold_builtin_fputs, fold_builtin_memory_chk,
	fold_builtin_stxcpy_chk, fold_builtin_stxncpy_chk,
	fold_builtin_sprintf_chk_1, fold_builtin_snprintf_chk_1):
	Move to gimple-fold.c.
	(fold_builtin_2): Remove handling of bzero, fputs, fputs_unlocked,
	strcat and strcpy.
	(fold_builtin_3): Remove handling of memset, bcopy, memcpy,
	mempcpy, memmove, strncpy, strcpy_chk and stpcpy_chk.
	(fold_builtin_4): Remove handling of memcpy_chk, mempcpy_chk,
	memmove_chk, memset_chk, strncpy_chk and stpncpy_chk.
	(rewrite_call_expr_array): Remove.
	(fold_builtin_sprintf_chk): Likewise.
	(fold_builtin_snprintf_chk): Likewise.
	(fold_builtin_varargs): Remove handling of sprintf_chk,
	vsprintf_chk, snprintf_chk and vsnprintf_chk.
	(gimple_fold_builtin_sprintf_chk): Remove.
	(gimple_fold_builtin_snprintf_chk): Likewise.
	(gimple_fold_builtin_varargs): Likewise.
	(fold_call_stmt): Do not call gimple_fold_builtin_varargs.
	* predict.c (optimize_bb_for_size_p): Handle NULL bb.
	* gimple.c (gimple_seq_add_seq_without_update): New function.
	* gimple.h (gimple_seq_add_seq_without_update): Declare.
	* gimple-fold.c: Include output.h.
	(gsi_replace_with_seq_vops): New function, split out from ...
	(gimplify_and_update_call_from_tree): ... here.
	(replace_call_with_value): New function.
	(replace_call_with_call_and_fold): Likewise.
	(var_decl_component_p): Moved from builtins.c.
	(gimple_fold_builtin_memory_op): Moved from builtins.c
	fold_builtin_memory_op and rewritten to GIMPLE.
	(gimple_fold_builtin_memset): Likewise.
	(gimple_fold_builtin_strcpy): Likewise.
	(gimple_fold_builtin_strncpy): Likewise.
	(gimple_fold_builtin_strcat): Likewise.
	(gimple_fold_builtin_fputs): Likewise.
	(gimple_fold_builtin_memory_chk): Likewise.
	(gimple_fold_builtin_stxcpy_chk): Likewise.
	(gimple_fold_builtin_stxncpy_chk): Likewise.
	(gimple_fold_builtin_snprintf_chk): Likewise.
	(gimple_fold_builtin_sprintf_chk): Likewise.
	(gimple_fold_builtin_strlen): New function.
	(gimple_fold_builtin_with_strlen): New function split out from
	gimple_fold_builtin.
	(gimple_fold_builtin): Change signature and handle
	bzero, memset, bcopy, memcpy, mempcpy and memmove folding
	here.  Call gimple_fold_builtin_with_strlen.
	(gimple_fold_call): Adjust.

	* gcc.dg/strlenopt-8.c: Remove XFAIL.
	* gcc.dg/tree-prof/stringop-2.c: Adjust.
	* gfortran.dg/array_memcpy_4.f90: Likewise.
	* gfortran.dg/trim_optimize_1.f90: Likewise.
	* gfortran.dg/trim_optimize_2.f90: Likewise.

From-SVN: r213753
2014-08-08 09:18:40 +00:00
Kugan Vivekanandarajah 8c9a36b7ca calls.c (precompute_arguments): Check promoted_for_signed_and_unsigned_p and set the promoted mode.
gcc
2014-08-08  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* calls.c (precompute_arguments): Check
	 promoted_for_signed_and_unsigned_p and set the promoted mode.
	(promoted_for_signed_and_unsigned_p): New function.
	(expand_expr_real_1): Check promoted_for_signed_and_unsigned_p
	and set the promoted mode.
	* expr.h (promoted_for_signed_and_unsigned_p): New function definition.
	* cfgexpand.c (expand_gimple_stmt_1): Call emit_move_insn if
	SUBREG is promoted with SRP_SIGNED_AND_UNSIGNED.

gcc/testsuite
2014-08-08  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* gcc.dg/zero_sign_ext_test.c: New test.

From-SVN: r213750
2014-08-08 05:31:44 +00:00
Kugan Vivekanandarajah 362d42dcc9 calls.c (precompute_arguments): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET.
gcc/
2014-08-08  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* calls.c (precompute_arguments): Use new SUBREG_PROMOTED_SET
	instead of SUBREG_PROMOTED_UNSIGNED_SET.
	(expand_call): Likewise.
	* cfgexpand.c (expand_gimple_stmt_1): Use SUBREG_PROMOTED_SIGN
	to get promoted mode.
	* combine.c (record_promoted_value): Skip > 0 comparison with
	SUBREG_PROMOTED_UNSIGNED_P as it now returns only 0 or 1.
	* expr.c (convert_move): Use SUBREG_CHECK_PROMOTED_SIGN instead
	of SUBREG_PROMOTED_UNSIGNED_P.
	(convert_modes): Likewise.
	(store_expr): Use SUBREG_PROMOTED_SIGN to get promoted mode.
	Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P.
	(expand_expr_real_1): Use new SUBREG_PROMOTED_SET instead of
	SUBREG_PROMOTED_UNSIGNED_SET.
	* function.c (assign_parm_setup_reg): Use new SUBREG_PROMOTED_SET
	instead of SUBREG_PROMOTED_UNSIGNED_SET.
	* ifcvt.c (noce_emit_cmove): Updated to use SUBREG_PROMOTED_GET and
	SUBREG_PROMOTED_SET.
	* internal-fn.c (ubsan_expand_si_overflow_mul_check): Use
	SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET.
	* optabs.c (widen_operand): Use SUBREG_CHECK_PROMOTED_SIGN instead
	of SUBREG_PROMOTED_UNSIGNED_P.
	* rtl.h (SUBREG_PROMOTED_UNSIGNED_SET): Remove.
	(SUBREG_PROMOTED_SET): New define.
	(SUBREG_PROMOTED_GET): Likewise.
	(SUBREG_PROMOTED_SIGN): Likewise.
	(SUBREG_PROMOTED_SIGNED_P): Likewise.
	(SUBREG_CHECK_PROMOTED_SIGN): Likewise.
	(SUBREG_PROMOTED_UNSIGNED_P): Updated.
	* rtlanal.c (unsigned_reg_p): Use new SUBREG_PROMOTED_GET
	instead of SUBREG_PROMOTED_UNSIGNED_GET.
	(nonzero_bits1): Skip > 0 comparison with the results as
	SUBREG_PROMOTED_UNSIGNED_P now returns only 0 or 1.
	(num_sign_bit_copies1): Use SUBREG_PROMOTED_SIGNED_P instead
	of !SUBREG_PROMOTED_UNSIGNED_P.
	* simplify-rtx.c (simplify_unary_operation_1): Use new
	SUBREG_PROMOTED_SIGNED_P instead of !SUBREG_PROMOTED_UNSIGNED_P.
	(simplify_subreg): Use new SUBREG_PROMOTED_SIGNED_P,
	SUBREG_PROMOTED_UNSIGNED_P and SUBREG_PROMOTED_SET instead of
	SUBREG_PROMOTED_UNSIGNED_P and SUBREG_PROMOTED_UNSIGNED_SET.

From-SVN: r213749
2014-08-08 05:24:12 +00:00
Jan Hubicka 7d0aa05b9e ipa-devirt.c: Include gimple-pretty-print.h
* ipa-devirt.c: Include gimple-pretty-print.h
	(referenced_from_vtable_p): Exclude DECL_EXTERNAL from
	further tests.
	(decl_maybe_in_construction_p): Fix conditional on cdtor check
	(get_polymorphic_call_info): Fix return value
	(type_change_info): New sturcture based on ipa-prop
	variant.
	(noncall_stmt_may_be_vtbl_ptr_store): New predicate
	based on ipa-prop variant.
	(extr_type_from_vtbl_ptr_store): New function
	based on ipa-prop variant.
	(record_known_type): New function.
	(check_stmt_for_type_change): New function.
	(get_dynamic_type): New function.
	* ipa-prop.c (ipa_analyze_call_uses): Use get_dynamic_type.
	* tree-ssa-pre.c: ipa-utils.h
	(eliminate_dom_walker::before_dom_children): Use ipa-devirt
	machinery; sanity check with ipa-prop devirtualization.
	* trans-mem.c (ipa_tm_insert_gettmclone_call): Clear
	polymorphic flag.

	* g++.dg/ipa/devirt-35.C: New testcase.
	* g++.dg/ipa/devirt-36.C: New testcase.

From-SVN: r213739
2014-08-07 20:58:17 +00:00
Trevor Saunders 9f25a338f9 remove pointer-set.[ch]
gcc/

	* Makefile.in: Remove references to pointer-set.c and pointer-set.h.
	* alias.c, cfgexpand.c, cgraphbuild.c,
	config/aarch64/aarch64-builtins.c, config/aarch64/aarch64.c,
	config/alpha/alpha.c, config/darwin.c, config/i386/i386.c,
	config/i386/winnt.c, config/ia64/ia64.c, config/m32c/m32c.c,
	config/mep/mep.c, config/mips/mips.c, config/rs6000/rs6000.c,
	config/s390/s390.c, config/sh/sh.c, config/sparc/sparc.c,
	config/spu/spu.c, config/stormy16/stormy16.c, config/tilegx/tilegx.c,
	config/tilepro/tilepro.c, config/xtensa/xtensa.c, dominance.c,
	dse.c, except.c, gengtype.c, gimple-expr.c,
	gimple-ssa-strength-reduction.c, gimplify.c, ifcvt.c,
	ipa-visibility.c, lto-streamer.h, omp-low.c, predict.c, stmt.c,
	tree-affine.c, tree-cfg.c, tree-eh.c, tree-inline.c, tree-nested.c,
	tree-scalar-evolution.c, tree-ssa-loop-im.c, tree-ssa-loop-niter.c,
	tree-ssa-phiopt.c, tree-ssa-structalias.c, tree-ssa-uninit.c,
	tree-ssa.c, tree.c, var-tracking.c, varpool.c: Remove includes of
	pointer-set.h.
	* pointer-set.c: Remove file.
	* pointer-set.h: Remove file.

gcc/c-family/

	* c-gimplify.c, cilk.c: Remove includes of pointer-set.h.

gcc/c/

	* c-typeck.c: Remove include of pointer-set.h.

gcc/cp/

	* class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
	optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.

From-SVN: r213738
2014-08-07 20:52:50 +00:00
Kyrylo Tkachov 16918afd48 [ARM] Delete f_sels, f_seld types, use fcsel instead.
* config/arm/arm.md (*cmov<mode>): Set type attribute to fcsel.
	* config/arm/types.md (f_sels, f_seld): Delete.

From-SVN: r213713
2014-08-07 14:30:01 +00:00
Kyrylo Tkachov a636bb4062 [AArch64] Restrict usage of FP/SIMD registers for TImode reload and absdi2 patterns for non-float/simd targets.
* config/aarch64/aarch64.md (absdi2): Set simd attribute.
	(aarch64_reload_mov<mode>): Predicate on TARGET_FLOAT.
	(aarch64_movdi_<mode>high): Likewise.
	(aarch64_mov<mode>high_di): Likewise.
	(aarch64_movdi_<mode>low): Likewise.
	(aarch64_mov<mode>low_di): Likewise.
	(aarch64_movtilow_tilow): Likewise.
	Add comment explaining usage of fp,simd attributes and of
	TARGET_FLOAT and TARGET_SIMD.

From-SVN: r213712
2014-08-07 14:27:59 +00:00
Ian Bolton c747993a62 [AArch64] Use MOVN to generate 64-bit negative immediates where sensible
* config/aarch64/aarch64.c (aarch64_expand_mov_immediate):
	Use MOVN when one of the half-words is 0xffff.

Co-Authored-By: Kyrylo Tkachov <kyrylo.tkachov@arm.com>

From-SVN: r213711
2014-08-07 13:42:22 +00:00
Marat Zakirov 4da2eb985b thumb1.md (*thumb1_movqi_insn): Copy of thumb1_movhi_insn.
2014-08-07  Marat Zakirov  <m.zakirov@samsung.com>

	* config/arm/thumb1.md (*thumb1_movqi_insn): Copy of thumb1_movhi_insn.

From-SVN: r213710
2014-08-07 13:29:07 +00:00
Maxim Kuvyrkov 4bd12f3d25 Add statistical printout of rank_for_schedule decisions
* haifa-sched.c (SCHED_SORT): Delete.  Macro used exactly once.
	(enum rfs_decition:RFS_*): New constants wrapped in an enum.
	(rfs_str): String corresponding to RFS_* constants.
	(rank_for_schedule_stats_t): New typedef.
	(rank_for_schedule_stats): New static variable.
	(rfs_result): New static function.
	(rank_for_schedule): Track statistics for deciding heuristics.
	(rank_for_schedule_stats_diff, print_rank_for_schedule_stats): New
	static functions.
	(ready_sort): Use them for debug printouts.
	(schedule_block): Init statistics state.  Print statistics on
	rank_for_schedule decisions.

From-SVN: r213709
2014-08-07 11:16:29 +00:00
Maxim Kuvyrkov 88366b18d6 Fix INSN_TICK heuristic for SCHED_PRESSURE
* haifa-sched.c (rank_for_schedule): Fix INSN_TICK-based heuristics.

From-SVN: r213708
2014-08-07 11:16:16 +00:00
Ilya Tocar 9d04ba2937 sse.md (vec_extract_lo_<mode><mask_name>): Fix constraint.
gcc/
	* config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Fix
	constraint.

From-SVN: r213704
2014-08-07 10:52:13 +00:00
Trevor Saunders 39c8aaa4bf convert the rest of the users of pointer_map to hash_map
gcc/

	* hash-map.h (default_hashmap_traits): Adjust overloads of hash
	function to not conflict.
	* alias.c, cfgexpand.c, dse.c, except.h, gimple-expr.c,
	gimple-ssa-strength-reduction.c, gimple-ssa.h, ifcvt.c,
	lto-streamer-out.c, lto-streamer.h, tree-affine.c, tree-affine.h,
	tree-predcom.c, tree-scalar-evolution.c, tree-ssa-loop-im.c,
	tree-ssa-loop-niter.c, tree-ssa.c, value-prof.c: Use hash_map instead
	of pointer_map.

gcc/cp/

	* cp-tree.h, pt.c: Use hash_map instead of pointer_map.

gcc/lto/

	* lto-partition.c, lto.c: Use hash_map instead of pointer_map.

From-SVN: r213703
2014-08-07 10:44:14 +00:00
Marek Polacek 044331a86c fold-const.c (fold_binary_loc): Add folding of (PTR0 - (PTR1 p+ A) -> (PTR0 - PTR1) - A.
* fold-const.c (fold_binary_loc): Add folding of 
	(PTR0 - (PTR1 p+ A) -> (PTR0 - PTR1) - A.
c/
	* c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
testsuite/
	* gcc.dg/fold-reassoc-3.c: New test.

From-SVN: r213700
2014-08-07 08:12:04 +00:00
Ilya Enkovich ce597aedd7 elfos.h (ASM_DECLARE_OBJECT_NAME): Use decl size instead of type size.
gcc/
	* config/elfos.h (ASM_DECLARE_OBJECT_NAME): Use decl size
	instead of type size.
	(ASM_FINISH_DECLARE_OBJECT): Likewise.

gcc/testsuite/
	* gcc.target/i386/struct-size.c: New.

From-SVN: r213699
2014-08-07 08:04:55 +00:00
Tom de Vries ddccb16a72 Remove duplicate ChangeLog entries
From-SVN: r213697
2014-08-07 07:41:33 +00:00
Marat Zakirov 0a2938aee4 thumb1.md (*thumb1_movhi_insn): Handle stack pointer.
2014-08-07  Marat Zakirov  <m.zakirov@samsung.com>

	* config/arm/thumb1.md (*thumb1_movhi_insn): Handle stack pointer.
	(*thumb1_movqi_insn): Likewise.
	* config/arm/thumb2.md (*thumb2_movhi_insn): Likewise.

From-SVN: r213695
2014-08-07 07:34:33 +00:00
Tom de Vries 87db77bb25 Remove cproj-fails-with-broken-glibc.c
2014-08-07  Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/cproj-fails-with-broken-glibc.c: Remove test.
	* lib/target-supports.exp (check_effective_target_glibc)
	(check_effective_target_glibc_2_12_or_later)
	(check_effective_target_glibc_2_11_or_earlier): Remove proc.

	* doc/sourcebuild.texi (glibc, glibc_2_12_or_later)
	(glibc_2_11_or_earlier): Remove effective-target keywords.

From-SVN: r213694
2014-08-07 07:22:35 +00:00
Tom de Vries b85e2cb05e For cproj test-case, use glibc version xfail
2014-08-04  Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/cproj-fails-with-broken-glibc.c: Use xfail for broken glibc
	version instead of required-target.
	* lib/target-supports.exp
	(check_effective_target_not_glibc_2_11_or_earlier): Replace by ...
	(check_effective_target_glibc_2_11_or_earlier): ... this.

	* doc/sourcebuild.texi (glibc, glibc_2_12_or_later)
	(glibc_2_11_or_earlier): Document effective-target keywords.

From-SVN: r213693
2014-08-07 07:22:24 +00:00
Kugan Vivekanandarajah 8a17543b56 arm.c (bdesc_2arg): Fix typo.
gcc/
2014-08-07  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* config/arm/arm.c (bdesc_2arg): Fix typo.
	(arm_atomic_assign_expand_fenv): Remove The default implementation.

From-SVN: r213692
2014-08-07 06:22:05 +00:00
Zhenqiang Chen b88fe5e918 tree-ssa-loop-ivopts.c (get_address_cost): Try aligned offset.
ChangeLog
2014-08-07  Zhenqiang Chen  <zhenqiang.chen@arm.com>

	* tree-ssa-loop-ivopts.c (get_address_cost): Try aligned offset.

testsuite/ChangeLog
2014-08-07  Zhenqiang Chen  <zhenqiang.chen@arm.com>

	* gcc.target/arm/get_address_cost_aligned_max_offset.c: New test.

From-SVN: r213691
2014-08-07 04:54:06 +00:00
Vladimir Makarov f50d71ec0f re PR debug/61923 (-fcompare-debug errors while building Linux kernel.)
2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>

	PR debug/61923
	* haifa-sched.c (advance_one_cycle): Fix dump.
	(schedule_block): Don't advance cycle if we are already at the
	beginning of the cycle.

2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>

	PR debug/61923
	* gcc.target/i386/pr61923.c: New test.

From-SVN: r213675
2014-08-06 15:40:26 +00:00
Martin Jambor 9d6171dce1 re PR ipa/61393 ([trans-mem] O3 optimization level constant propagation problem)
2014-08-06  Martin Jambor  <mjambor@suse.cz>

	PR ipa/61393
	* cgraphclones.c (cgraph_node::create_clone): Also copy tm_clone.

From-SVN: r213666
2014-08-06 15:59:18 +02:00
Richard Biener b12c44e901 re PR lto/62034 (ICE for big statically initialized arrays compiled with LTO)
2014-08-06  Richard Biener  <rguenther@suse.de>

	PR lto/62034
	* lto-streamer-in.c (lto_input_tree_1): Assert we do not read
	SCCs here.
	(lto_input_tree): Pop SCCs here.

From-SVN: r213664
2014-08-06 13:53:09 +00:00
Richard Biener abf3045448 re PR bootstrap/61320 (ICE in jcf-parse.c:1622 (parse_class_file)
2014-08-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/61320
	* tree-ssa-loop-ivopts.c (may_be_unaligned_p): Properly
	handle misaligned loads.

From-SVN: r213661
2014-08-06 11:41:13 +00:00
Alan Lawrence f901401e53 [PATCH AArch64] Prefer dup to zip for vec_perm_const; enable dup for bigendian; add testcase.
gcc/:
	* config/aarch64/aarch64.c (aarch64_evpc_dup): Enable for bigendian.
	(aarch64_expand_vec_perm_const): Check for dup before zip.

gcc/testsuite:

	* gcc.target/aarch64/vdup_n_2.c: New test.

From-SVN: r213659
2014-08-06 10:17:05 +00:00
Kyrylo Tkachov 4aa81c2e6a [AArch64] Use REG_P and CONST_INT_P instead of GET_CODE + comparison.
* config/aarch64/aarch64.c (aarch64_classify_address): Use REG_P and
	CONST_INT_P instead of GET_CODE and compare.
	(aarch64_select_cc_mode): Likewise.
	(aarch64_print_operand): Likewise.
	(aarch64_rtx_costs): Likewise.
	(aarch64_simd_valid_immediate): Likewise.
	(aarch64_simd_check_vect_par_cnst_half): Likewise.
	(aarch64_simd_emit_pair_result_insn): Likewise.

From-SVN: r213651
2014-08-06 08:32:07 +00:00
David Malcolm 17ef89b220 gdbhooks.py: add "break-on-pass" command
gcc/
2014-08-05  David Malcolm  <dmalcolm@redhat.com>

        * gdbhooks.py (find_gcc_source_dir): New helper function.
        (class PassNames): New class, locating and parsing passes.def.
        (class BreakOnPass): New command "break-on-pass".

From-SVN: r213646
2014-08-05 21:01:47 +00:00
Trevor Saunders 6ef6945c9c fix pr62009 use after free in redirect_edge_var_map_dup
The change to get the entry for the old edge before inserting the new
one was incorrect because if inserting the new one resized the table
then the pointer to the entry for the old one would become invalid.

gcc/

	* tree-ssa.c (redirect_edge_var_map_dup): insert newe before
	getting olde.

From-SVN: r213644
2014-08-05 19:52:08 +00:00
Richard Biener 96b3c03f4e re PR rtl-optimization/61672 (Less redundant instructions deleted by pre_delete after r208113.)
2014-08-05  Richard Biener  <rguenther@suse.de>

	PR rtl-optimization/61672
	* emit-rtl.h (mem_attrs_eq_p): Declare.
	* emit-rtl.c (mem_attrs_eq_p): Export.  Handle NULL mem-attrs.
	* cse.c (exp_equiv_p): Use mem_attrs_eq_p.
	* cfgcleanup.c (merge_memattrs): Likewise.
	Include emit-rtl.h.

From-SVN: r213638
2014-08-05 13:05:06 +00:00
Kyrylo Tkachov b8a5fbd280 [AArch64] Fix types for vqdmlals_lane_s32 and vqdmlsls_lane_s32 intrinsics.
* config/aarch64/arm_neon.h (vqdmlals_lane_s32): Use scalar types
	rather than singleton vectors.
	(vqdmlsls_lane_s32): Likewise.

	* gcc.target/aarch64/scalar_intrinsics.c (test_vqdmlals_lane_s32):
	Fix types.
	(test_vqdmlsls_lane_s32): Likewise.
	* gcc.target/aarch64/simd/vqdmlals_lane_s32.c: Likewise.
	* gcc.target/aarch64/simd/vqdmlsls_lane_s32.c: Likewise.

From-SVN: r213636
2014-08-05 10:46:31 +00:00
Kyrylo Tkachov d2937a2e3f [AArch64] Implement some saturating math NEON intrinsics.
* config/aarch64/aarch64-simd.md (aarch64_sqdmulh_laneq<mode>):
	Use VSDQ_HSI mode iterator.
	(aarch64_sqrdmulh_laneq<mode>): Likewise.
	(aarch64_sq<r>dmulh_laneq<mode>_internal): New define_insn.
	* config/aarch64/aarch64-simd-builtins.def (sqdmulh_laneq):
	Use BUILTIN_VDQHS macro.
	(sqrdmulh_laneq): Likewise.
	* config/aarch64/arm_neon.h (vqdmlalh_laneq_s16): New intrinsic.
	(vqdmlals_laneq_s32): Likewise.
	(vqdmlslh_laneq_s16): Likewise.
	(vqdmlsls_laneq_s32): Likewise.
	(vqdmulhh_laneq_s16): Likewise.
	(vqdmulhs_laneq_s32): Likewise.
	(vqrdmulhh_laneq_s16): Likewise.
	(vqrdmulhs_laneq_s32): Likewise.

	* gcc.target/aarch64/simd/vqdmlalh_laneq_s16_1.c: New test.
	* gcc.target/aarch64/simd/vqdmlals_laneq_s32_1.c: Likewise.
	* gcc.target/aarch64/simd/vqdmlslh_laneq_s16_1.c: Likewise.
	* gcc.target/aarch64/simd/vqdmlsls_laneq_s32_1.c: Likewise.
	* gcc.target/aarch64/simd/vqdmulhh_laneq_s16_1.c: Likewise.
	* gcc.target/aarch64/simd/vqdmulhs_laneq_s32_1.c: Likewise.
	* gcc.target/aarch64/simd/vqrdmulhh_laneq_s16_1.c: Likewise.
	* gcc.target/aarch64/simd/vqrdmulhs_laneq_s32_1.c: Likewise.

From-SVN: r213635
2014-08-05 10:43:41 +00:00
Kyrylo Tkachov ada5287e55 [AArch64] Implement some vmul*_lane*_f* intrinsics in arm_neon.h.
* config/aarch64/arm_neon.h (vmul_f64): New intrinsic.
	(vmuld_laneq_f64): Likewise.
	(vmuls_laneq_f32): Likewise.
	(vmul_n_f64): Likewise.
	(vmuld_lane_f64): Reimplement in C.
	(vmuls_lane_f32): Likewise.

	* gcc.target/aarch64/simd/vmul_f64_1.c: New test.
	* gcc.target/aarch64/simd/vmul_n_f64_1.c: Likewise.
	* gcc.target/aarch64/simd/vmuld_lane_f64_1.c: Likewise.
	* gcc.target/aarch64/simd/vmuld_laneq_f64_1.c: Likewise.
	* gcc.target/aarch64/simd/vmuls_lane_f32_1.c: Likewise.
	* gcc.target/aarch64/simd/vmuls_laneq_f32_1.c: Likewise.

From-SVN: r213634
2014-08-05 10:39:31 +00:00
Kyrylo Tkachov ad784b91ac [ARM/AArch64] Add CRC32 scheduling information to Cortex-A53 and Cortex-A57.
* config/arm/cortex-a15.md (cortex_a15_alu_shift): Add crc type
	to reservation.
	* config/arm/cortex-a53.md (cortex_a53_alu_shift): Likewise.

From-SVN: r213632
2014-08-05 10:27:07 +00:00
Kyrylo Tkachov 66224c7d68 [ARM] Adjust clz, rbit and rev patterns for -mrestrict-it.
* config/arm/arm.md (clzsi2): Set predicable_short_it attr to no.
	(rbitsi2): Likewise.
	(*arm_rev): Set predicable and predicable_short_it attributes.

From-SVN: r213630
2014-08-05 09:56:31 +00:00
Kyrylo Tkachov 371e764dd9 [convert.c] PR 61876: Guard transformation to lrint by -fno-math-errno.
* convert.c (convert_to_integer): Guard transformation to lrint by
	-fno-math-errno.

From-SVN: r213628
2014-08-05 09:52:21 +00:00
James Greenhalgh bc5e395d60 [AArch64] Some aarch64-builtins.c cleanup.
gcc/

	* config/aarch64/aarch64-builtins.c
	(aarch64_simd_builtin_type_mode): Delete.
	(v8qi_UP): Remap to V8QImode.
	(v4hi_UP): Remap to V4HImode.
	(v2si_UP): Remap to V2SImode.
	(v2sf_UP): Remap to V2SFmode.
	(v1df_UP): Remap to V1DFmode.
	(di_UP): Remap to DImode.
	(df_UP): Remap to DFmode.
	(v16qi_UP):V16QImode.
	(v8hi_UP): Remap to V8HImode.
	(v4si_UP): Remap to V4SImode.
	(v4sf_UP): Remap to V4SFmode.
	(v2di_UP): Remap to V2DImode.
	(v2df_UP): Remap to V2DFmode.
	(ti_UP): Remap to TImode.
	(ei_UP): Remap to EImode.
	(oi_UP): Remap to OImode.
	(ci_UP): Map to CImode.
	(xi_UP): Remap to XImode.
	(si_UP): Remap to SImode.
	(sf_UP): Remap to SFmode.
	(hi_UP): Remap to HImode.
	(qi_UP): Remap to QImode.
	(aarch64_simd_builtin_datum): Make mode a machine_mode.
	(VAR1): Build builtin name.
	(aarch64_init_simd_builtins): Remove dead code.

From-SVN: r213627
2014-08-05 09:49:05 +00:00
Roman Gareev 6a12a0041b [gcc/]
* graphite-isl-ast-to-gimple.c:
	(set_options): New function.
	(scop_to_isl_ast): Add calling of set_options.

From-SVN: r213623
2014-08-05 08:42:09 +00:00
Jakub Jelinek 8cab83f05f loop-unroll.c (struct iv_to_split): Remove n_loc and loc fields.
* loop-unroll.c (struct iv_to_split): Remove n_loc and loc fields.
	(analyze_iv_to_split_insn): Don't initialize them.
	(get_ivts_expr): Removed.
	(allocate_basic_variable, insert_base_initialization): Use
	SET_SRC instead of *get_ivts_expr.
	(split_iv): Use &SET_SRC instead of get_ivts_expr.

From-SVN: r213621
2014-08-05 10:09:00 +02:00
Roman Gareev 574921c272 graphite-isl-ast-to-gimple.c: Add a new struct ast_build_info.
[gcc/]

	* graphite-isl-ast-to-gimple.c: Add a new struct ast_build_info.
	(translate_isl_ast_for_loop): Add checking of the 
	flag_loop_parallelize_all.
	(ast_build_before_for): New function.
	(scop_to_isl_ast): Add checking of the 
	flag_loop_parallelize_all.
	* graphite-dependences.c: Move the defenition of the
	scop_get_dependences from graphite-optimize-isl.c to this file.
	(apply_schedule_on_deps): Add checking of the ux's emptiness.
	(carries_deps): Add checking of the x's value.
	* graphite-optimize-isl.c: Move the defenition of the
	scop_get_dependences to graphite-dependences.c.
	* graphite-poly.h: Add declarations of scop_get_dependences
	and carries_deps.

From-SVN: r213619
2014-08-05 03:41:29 +00:00
Rohit Arul Raj 23742a9e1b re PR middle-end/60102 (powerpc fp-bit ices at dwf_regno)
PR target/60102

[libgcc]
2014-07-31  Rohit  <rohitarulraj@freescale.com>
	* config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Update
	  based on change in SPE high register numbers and 3 HTM registers.

[gcc]
2014-07-31  Rohit  <rohitarulraj@freescale.com>
	* config/rs6000/rs6000.c
	  (rs6000_reg_names) : Add SPE high register names.
	  (alt_reg_names) : Likewise.
	  (rs6000_dwarf_register_span) : For SPE high registers, replace
	  dwarf register numbers with GCC hard register numbers.
	  (rs6000_init_dwarf_reg_sizes_extra) : Likewise.
	  (rs6000_dbx_register_number): For SPE high registers, return dwarf
	  register number for the corresponding GCC hard register number.

	* config/rs6000/rs6000.h
	  (FIRST_PSEUDO_REGISTER) : Update based on 32 newly added GCC hard
	  register numbers for SPE high registers.
	  (DWARF_FRAME_REGISTERS) :  Likewise.
	  (DWARF_REG_TO_UNWIND_COLUMN) : Likewise.
	  (DWARF_FRAME_REGNUM) : Likewise.
	  (FIXED_REGISTERS) : Likewise.
	  (CALL_USED_REGISTERS) : Likewise.
	  (CALL_REALLY_USED_REGISTERS) : Likewise.
	  (REG_ALLOC_ORDER) : Likewise.
	  (enum reg_class) : Likewise.
	  (REG_CLASS_NAMES) : Likewise.
	  (REG_CLASS_CONTENTS) : Likewise.
	  (SPE_HIGH_REGNO_P) : New macro to identify SPE high registers.	

	* gcc.target/powerpc/pr60102.c: New testcase.

From-SVN: r213596
2014-08-04 16:34:34 +00:00
Richard Biener 3daa26d0e9 gimple-fold.h (gimple_fold_builtin): Remove.
2014-08-04  Richard Biener  <rguenther@suse.de>

	* gimple-fold.h (gimple_fold_builtin): Remove.
	* gimple-fold.c (gimple_fold_builtin): Make static.
	* tree-ssa-ccp.c (pass_fold_builtins::execute): Use
	fold_stmt, not gimple_fold_builtin.

From-SVN: r213585
2014-08-04 13:08:34 +00:00
Martin Liska 31acf1bb11 IPA C++ refactoring 3/N
* cgraph.h (csi_end_p): Removed.
	(csi_next): Likewise.
	(csi_node): Likewise.
	(csi_start): Likewise.
	(cgraph_node_in_set_p): Likewise.
	(cgraph_node_set_size): Likewise.
	(vsi_end_p): Likewise.
	(vsi_next): Likewise.
	(vsi_node): Likewise.
	(vsi_start): Likewise.
	(varpool_node_set_size): Likewise.
	(cgraph_node_set_nonempty_p): Likewise.
	(varpool_node_set_nonempty_p): Likewise.
	* cgraphunit.c (cgraph_process_new_functions): vec replaces
	cgraph_node_set.
	* ipa-inline-transform.c: Likewise.
	* ipa-utils.c (cgraph_node_set_new): Removed.
	(cgraph_node_set_add): Likewise.
	(cgraph_node_set_remove): Likewise.
	(cgraph_node_set_find): Likewise.
	(dump_cgraph_node_set): Likewise.
	(debug_cgraph_node_set): Likewise.
	(free_cgraph_node_set): Likewise.
	(varpool_node_set_new): Likewise.
	(varpool_node_set_add): Likewise.
	(varpool_node_set_remove): Likewise.
	(varpool_node_set_find): Likewise.
	(dump_varpool_node_set): Likewise.
	(free_varpool_node_set): Likewise.
	(debug_varpool_node_set): Likewise.
	* tree-emutls.c (struct tls_var_data):
	(emutls_index): Removed.
	(emutls_decl): Likewise.
	(gen_emutls_addr): Function implementation uses newly added
	hash_map<varpool_node *, tls_var_data>.
	(clear_access_vars): Likewise.
	(create_emultls_var): Likewise.
	(ipa_lower_emutls): Likewise.
	(reset_access): New function.

From-SVN: r213573
2014-08-04 11:56:50 +00:00
Ganesh Gopalasubramanian 890e586486 Add MOVBE and RDRND for AMD bdver4
From-SVN: r213572
2014-08-04 11:25:04 +00:00
Kyrylo Tkachov e7a45277aa [doc] Document clrsb optab and fix some inconsistencies.
* doc/md.texi (clrsb): Document.
	(clz): Change reference to x into operand 1.
	(ctz): Likewise.
	(popcount): Likewise.

Co-Authored-By: James Greenhalgh <james.greenhalgh@arm.com>

From-SVN: r213557
2014-08-04 10:06:28 +00:00
Kyrylo Tkachov 97334291c2 Fix ChangeLog date from r213551.
From-SVN: r213556
2014-08-04 10:04:39 +00:00
Kyrylo Tkachov 0d03cda4fc PR 61713: ICE when expanding single-threaded version of atomic_test_and_set.
PR target/61713
	* gcc/optabs.c (expand_atomic_test_and_set): Do not try to emit
	move to subtarget in serial version if result is ignored.

	PR target/61713
	* gcc.dg/pr61756.c: New test.

From-SVN: r213555
2014-08-04 10:03:32 +00:00
Ramana Radhakrishnan dc549f34cb [sched-deps] Generalise usage of macro fusion to work on any two insns.
* sched-deps.c (try_group_insn): Generalise macro fusion hook usage
	to any two insns.  Update comment.  Rename to sched_macro_fuse_insns.
	(sched_analyze_insn): Update use of try_group_insn to
	sched_macro_fuse_insns.
	* config/i386/i386.c (ix86_macro_fusion_pair_p): Reject 2nd
	arguments that are not conditional jumps.

Co-Authored-By: Kyrylo Tkachov <kyrylo.tkachov@arm.com>

From-SVN: r213551
2014-08-04 09:57:49 +00:00