Commit Graph

146104 Commits

Author SHA1 Message Date
Martin Jambor
91bb9f80e5 Indirect inlining of targets from references of global constants
2016-05-18  Martin Jambor  <mjambor@suse.cz>

	PR ipa/69708
	* cgraph.h (cgraph_indirect_call_info): New field
	guaranteed_unmodified.
	* ipa-cp.c (ipa_get_indirect_edge_target_1): Also pass parameter value
	to ipa_find_agg_cst_for_param, check guaranteed_unmodified when
	appropriate.
	* ipa-inline-analysis.c (evaluate_conditions_for_known_args): Also
	pass the parameter value to ipa_find_agg_cst_for_param.
	* ipa-prop.c (ipa_load_from_parm_agg): New parameter
	guaranteed_unmodified, store AA results there instead of bailing out
	if present.
	(ipa_note_param_call): Also initialize guaranteed_unmodified flag.
	(ipa_analyze_indirect_call_uses): Also set guaranteed_unmodified flag.
	(find_constructor_constant_at_offset): New function.
	(ipa_find_agg_cst_from_init): Likewise.
	(ipa_find_agg_cst_for_param): Also seearch for aggregate values in
	static initializers of contants, report back through a new paameter
	from_global_constant if that was the case.
	(try_make_edge_direct_simple_call): Also pass parameter value to
	ipa_find_agg_cst_for_param, check guaranteed_unmodified when
	appropriate.
	(ipa_write_indirect_edge_info): Stream new flag guaranteed_unmodified.
	(ipa_read_indirect_edge_info): Likewise.
	* ipa-prop.h (ipa_find_agg_cst_for_param): Update declaration.
	(ipa_load_from_parm_agg): Likewise.

testsuite/
	* gcc.dg/ipa/iinline-cstagg-1.c: New test.
	* gcc.dg/ipa/ipcp-cstagg-1.c: Likewise.
	* gcc.dg/ipa/ipcp-cstagg-2.c: Likewise.
	* gcc.dg/ipa/ipcp-cstagg-3.c: Likewise.
	* gcc.dg/ipa/ipcp-cstagg-4.c: Likewise.

From-SVN: r236416
2016-05-18 18:38:56 +02:00
Paolo Carlini
c584aca60c re PR c++/69793 (ICE on invalid code in "cp_lexer_peek_nth_token")
/cp
2016-05-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/69793
	* parser.c (cp_parser_template_id): Don't call cp_lexer_peek_nth_token
	when the previous cp_lexer_peek_token returns CPP_EOF.

/testsuite
2016-05-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/69793
	* g++.dg/template/crash122.C: New.

From-SVN: r236414
2016-05-18 16:26:35 +00:00
Uros Bizjak
28644f75a9 re PR target/71161 (Lots of ASAN and libgo runtime FAILs after r236090)
PR target/71161
	* elf.c (phdr_callback) [__i386__]: Add
	__attribute__((__force_align_arg_pointer__)).

From-SVN: r236397
2016-05-18 16:40:54 +02:00
Jiong Wang
3c11e1af83 [Patch, lra] Guard in_class_p with REG_P check
gcc/

	PR rtl-optimization/71150
	* lra-constraint (process_addr_reg): Guard "in_class_p" with REG_P
	check.

From-SVN: r236396
2016-05-18 14:37:28 +00:00
Paolo Carlini
20309c6e2f re PR c++/70466 ([ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real, at cp/call.c:6371 with -std=c++11)
/cp
2016-05-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/70466
	* call.c (convert_like_real): Check that we are actually converting
	from an init list.

/testsuite
2016-05-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/70466
	* g++.dg/template/pr70466-1.C: New.
	* g++.dg/template/pr70466-2.C: Likewise.

From-SVN: r236395
2016-05-18 14:18:06 +00:00
Michael Meissner
50c78b9ab3 re PR target/70915 (Improve loading 0/-1 in VSX registers on PowerPC)
[gcc]
2016-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/70915
	* config/rs6000/constraints.md (wE constraint): New constraint
	for a vector constant that can be loaded with XXSPLTIB.
	(wM constraint): New constraint for a vector constant of a 1's.
	(wS constraint): New constraint for a vector constant that can be
	loaded with XXSPLTIB and a vector sign extend instruction.
	* config/rs6000/predicates.md (xxspltib_constant_split): New
	predicates for wE/wS constraints.
	(xxspltib_constant_nosplit): Likewise.
	(easy_vector_constant): Add support for constants that can be
	loaded via XXSPLTIB.
	(all_ones_constant): New predicate for vector constant with all
	1's set.
	(splat_input_operand): Add support for ISA 3.0 word splat
	operations.
	* config/rs6000/rs6000.c (xxspltib_constant_p): New function to
	return if a constant can be loaded with the ISA 3.0 XXSPLTIB
	instruction and possibly with a sign extension.
	(output_vec_const_move): Add support for XXSPLTIB. If we are
	loading up 0/-1 into Altivec registers, prefer using VSPLTISW
	instead of XXLXOR/XXLORC.
	(rs6000_expand_vector_init): Add support for ISA 3.0 word splat
	operations.
	(rs6000_legitimize_reload_address): Likewise.
	(rs6000_output_move_128bit): Use output_vec_const_move to emit
	constants.
	* config/rs6000/vsx.md (VSX_M): Add TImode (if -mvsx-timode) and
	combine VSX_M and VSX_M2 into one iterator.
	(VSX_M2): Likewise.
	(VSINT_84): New iterators for loading constants with XXSPLTIB.
	(VSINT_842): Likewise.
	(UNSPEC_VSX_SIGN_EXTEND): New UNSPEC.
	(xxspltib_v16qi): New insns to load up constants with the ISA 3.0
	XXSPLTIB instruction.
	(xxspltib_<mode>_nosplit): Likewise.
	(xxspltib_<mode>_split): New insn to load up constants with
	XXSPLTIB and a sign extend instruction.
	(vsx_mov<mode>): Replace single move that handled all vector types
	with separate 32-bit and 64-bit moves.  Combine the movti_<bit>
	moves (when -mvsx-timode is in effect) into the main vector
	moves.  Eliminate separate moves for <VSr> <VSa>, where the
	preferred register class (<VSr>) is listed first, and the
	secondary register class (<VSa>) is listed second with a '?' to
	discourage use.  Prefer loading 0/-1 in any VSX register for ISA
	3.0, and Altivec registers for ISA 2.06/2.07 (PR target/70915) so
	that if the register was involved in a slow operation, the
	clear/set operation does not wait for the slow operation to
	finish.  Adjust the length attributes for 32-bit mode.  Use
	rs6000_output_move_128bit and drop the use of the string
	instructions for 32-bit movti when -mvsx-timode is in effect.  Use
	spacing so that the alternatives and attributes don't generate
	long lines, and put things in columns, so that it is easier to
	match up the operands and attributes with the insn alternatives.
	(vsx_mov<mode>_64bit): Likewise.
	(vsx_mov<mode>_32bit): Likewise.
	(vsx_movti_64bit): Fold movti into normal vector moves.
	(vsx_movti_32bit): Likewise.
	(vsx_splat_<mode>, V4SI/V4SF modes): Add support for ISA 3.0 word
	spat instructions.
	(vsx_splat_v4si_internal): Likewise.
	(vsx_splat_v4sf_internal): Likewise.
	(vector fusion peepholes): Use VSX_M instead of VSX_M2.
	(vsx_sign_extend_qi_<mode>): New ISA 3.0 instructions to sign
	extend vector elements.
	(vsx_sign_extend_hi_<mode>): Likewise.
	(vsx_sign_extend_si_v2di): Likewise.
	* config/rs6000/rs6000-protos.h (xxspltib_constant_p): Add
	declaration.
	* doc/md.texi (PowerPC constraints): Document the wE, wM, and wS
	constraints.  Add trailing period to wL documentation.

[gcc/testsuite]
2016-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/p9-splat-1.c: New tests for ISA 3.0 word
	splat operations and the XXSPLTIB instruction.
	* gcc.target/powerpc/p9-splat-2.c: Likewise.
	* gcc.target/powerpc/p9-splat-3.c: Likewise.
	* gcc.target/powerpc/pr47755.c: Allow vspltisw in addition to
	xxlxor to clear a register.

From-SVN: r236394
2016-05-18 14:04:32 +00:00
Richard Sandiford
cf8be00de9 To...
To: gcc-patches@gcc.gnu.org
Subject: PR 71020: Handle abnormal PHIs in tree-call-cdce.c
From: Richard Sandiford <richard.sandiford@arm.com>
Gcc: private.sent
--text follows this line--
The PR is about a case where tree-call-cdce.c causes two abnormal
PHIs for the same variable to be live at the same time, leading to
a coalescing failure.  It seemed like getting rid of these kinds of
input would be generally useful, so I added a utility to tree-dfa.c.

Tested on x86_64-linux-gnu.

gcc/
	PR middle-end/71020
	* tree-dfa.h (replace_abnormal_ssa_names): Declare.
	* tree-dfa.c (replace_abnormal_ssa_names): New function.
	* tree-call-cdce.c: Include tree-dfa.h.
	(can_guard_call_p): New function, extracted from...
	(can_use_internal_fn): ...here.
	(shrink_wrap_one_built_in_call_with_conds): Remove failure path
	and return void.
	(shrink_wrap_one_built_in_call): Likewise.
	(use_internal_fn): Likewise.
	(shrink_wrap_conditional_dead_built_in_calls): Update accordingly
	and return void.  Call replace_abnormal_ssa_names.
	(pass_call_cdce::execute): Check can_guard_call_p during the
	initial walk.  Assume shrink_wrap_conditional_dead_built_in_calls
	will always change something.

gcc/testsuite/
	* gcc.dg/torture/pr71020.c: New test.

From-SVN: r236393
2016-05-18 14:01:31 +00:00
Martin Jambor
29799e9db1 Respect --param ipa-max-agg-items=0
2016-05-18  Martin Jambor  <mjambor@suse.cz>

	PR ipa/70646
	* ipa-prop.c (determine_locally_known_aggregate_parts): Bail out early
	if parameter PARAM_IPA_MAX_AGG_ITEMS is zero.

From-SVN: r236390
2016-05-18 15:06:24 +02:00
Martin Jambor
848a392af3 [PR 70646] Store size to inlining predicate conditions
2016-05-18  Martin Jambor  <mjambor@suse.cz>

	PR ipa/70646
	* ipa-inline.h (condition): New field size.
	* ipa-inline-analysis.c (add_condition): New parameter SIZE, use it
	for comaprison and store it into the new condition.
	(evaluate_conditions_for_known_args): Use condition size to check
	access sizes for all but CHANGED conditions.
	(unmodified_parm_1): New parameter size_p, store access size into it.
	(unmodified_parm): Likewise.
	(unmodified_parm_or_parm_agg_item): Likewise.
	(eliminated_by_inlining_prob): Pass NULL to unmodified_parm as size_p.
	(set_cond_stmt_execution_predicate): Extract access sizes and store
	them to conditions.
	(set_switch_stmt_execution_predicate): Likewise.
	(will_be_nonconstant_expr_predicate): Likewise.
	(will_be_nonconstant_predicate): Likewise.
	(inline_read_section): Stream condition size.
	(inline_write_summary): Likewise.

testsuite/
	* gcc.dg/ipa/pr70646.c: New test.

From-SVN: r236389
2016-05-18 15:04:23 +02:00
Christophe Lyon
1f2ab7765b vget_lane.c: Add fp16 tests.
* gcc.target/aarch64/advsimd-intrinsics/vget_lane.c: Add fp16 tests.

From-SVN: r236388
2016-05-18 14:57:53 +02:00
Christophe Lyon
7648949323 vreinterpret.c: Add missing tests for vreinterpretq_p{8,16}.
* gcc.target/aarch64/advsimd-intrinsics/vreinterpret.c: Add missing tests for vreinterpretq_p{8,16}.

From-SVN: r236387
2016-05-18 14:54:13 +02:00
Christophe Lyon
bd79378db5 vsli_n.c: Add checks for vsliq_n_s64 and vsliq_n_u64.
* gcc.target/aarch64/advsimd-intrinsics/vsli_n.c: Add checks for vsliq_n_s64 and vsliq_n_u64.

From-SVN: r236385
2016-05-18 14:52:51 +02:00
Christophe Lyon
81ca3ea0f2 arm-neon-ref.h (CHECK, [...]): Print which type was checked.
* gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h (CHECK,
	CHECK_FP, CHECK_CUMULATIVE_SAT): Print which type was checked.

From-SVN: r236384
2016-05-18 14:50:34 +02:00
Christophe Lyon
873cb42569 vmul.c: Remove useless #ifdef.
* gcc.target/aarch64/advsimd-intrinsics/vmul.c: Remove useless #ifdef.
	* gcc.target/aarch64/advsimd-intrinsics/vshl.c: Likewise.
	* gcc.target/aarch64/advsimd-intrinsics/vtst.c: Likewise.

From-SVN: r236383
2016-05-18 14:48:47 +02:00
Christophe Lyon
9d6e7c214f vreinterpret.c: Fix typo in comment.
* gcc.target/aarch64/advsimd-intrinsics/vreinterpret.c: Fix typo in comment.

From-SVN: r236382
2016-05-18 14:46:23 +02:00
Christophe Lyon
b4dbe40e40 Fix ChangeLog date.
From-SVN: r236381
2016-05-18 14:41:50 +02:00
Christophe Lyon
887687b02e noplt_3.c: Scan for "br\t".
* gcc.target/aarch64/noplt_3.c: Scan for "br\t".
	* gcc.target/aarch64/tail_indirect_call_1.c: Scan for "br\t",
	"blr\t" and switch to scan-assembler-times.

From-SVN: r236377
2016-05-18 14:33:36 +02:00
Richard Biener
524c2492c5 tree-ssa-loop-im.c (determine_max_movement): Properly add condition cost to PHI cost instead of total_cost.
2016-05-18  Richard Biener  <rguenther@suse.de>

	* tree-ssa-loop-im.c (determine_max_movement): Properly add
	condition cost to PHI cost instead of total_cost.

From-SVN: r236376
2016-05-18 12:32:46 +00:00
Martin Liska
cf087b415c Set DECL_PT_UID for merged variables in IPA ICF (PR70856).
PR fortran/70856
	* ipa-icf.c (sem_variable::merge): Set DECL_PT_UID for
	merged variables.

From-SVN: r236375
2016-05-18 11:48:50 +00:00
Richard Biener
5f84f6b37a lto-streamer.h (LTO_major_version): Bump to 6.
2016-05-18  Richard Biener  <rguenther@suse.de>

	* lto-streamer.h (LTO_major_version): Bump to 6.

From-SVN: r236374
2016-05-18 11:21:33 +00:00
Segher Boessenkool
fb42ed990f function: Factor out make_*logue_seq
Make new functions make_split_prologue_seq, make_prologue_seq, and
make_epilogue_seq.


	* function.c (make_split_prologue_seq, make_prologue_seq,
	make_epilogue_seq): New functions, factored out from...
	(thread_prologue_and_epilogue_insns): Here.

From-SVN: r236373
2016-05-18 13:07:20 +02:00
Segher Boessenkool
63d0f6ab56 function: Do the CLEANUP_EXPENSIVE after shrink-wrapping, not before
We should do CLEANUP_EXPENSIVE after shrink-wrapping, because shrink-
wrapping creates constructs that CLEANUP_EXPENSIVE can optimise, and
nothing runs CLEANUP_EXPENSIVE later.


	* function.c (rest_of_handle_thread_prologue_and_epilogue): Call
	cleanup_cfg with CLEANUP_EXPENSIVE after shrink-wrapping instead
	of before.  Add a comment.

From-SVN: r236372
2016-05-18 12:58:57 +02:00
Bin Cheng
a1e71b0180 tree-ssa-loop-ivopts.c (get_computation_cost_at): Check inv expression pointer, not pointer to the pointer.
* tree-ssa-loop-ivopts.c (get_computation_cost_at): Check inv
	expression pointer, not pointer to the pointer.

From-SVN: r236371
2016-05-18 10:41:28 +00:00
Jiong Wang
83a5c91041 [testsuite] Guard float64_t with __aarch64__
gcc/testsuite/
        * gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h: Guard float64_t
        with __aarch64__.
        * gcc.target/aarch64/advsimd-intrinsics/vfms_vfma_n.c: Guard variable
        declarations under __aarch64__ and __ARM_FEATURE_FMA.

From-SVN: r236370
2016-05-18 09:43:04 +00:00
Jakub Jelinek
8ee9116515 sse.md (pbroadcast_evex_isa): New mode attr.
* config/i386/sse.md (pbroadcast_evex_isa): New mode attr.
	(avx2_pbroadcast<mode>): Add another alternative with v instead
	of x constraints in it, using <pbroadcast_evex_isa> isa.
	(avx2_pbroadcast<mode>_1): Similarly, add two such alternatives.

	* gcc.target/i386/avx512bw-vpbroadcast-1.c: New test.
	* gcc.target/i386/avx512bw-vpbroadcast-2.c: New test.
	* gcc.target/i386/avx512bw-vpbroadcast-3.c: New test.
	* gcc.target/i386/avx512vl-vpbroadcast-1.c: New test.
	* gcc.target/i386/avx512vl-vpbroadcast-2.c: New test.
	* gcc.target/i386/avx512vl-vpbroadcast-3.c: New test.

From-SVN: r236369
2016-05-18 11:24:59 +02:00
Jakub Jelinek
cf4d516a50 sse.md (<ssse3_avx2>_palignr<mode>): Use constraint x instead of v in second alternative, add avx512bw alternative.
* config/i386/sse.md (<ssse3_avx2>_palignr<mode>): Use
	constraint x instead of v in second alternative, add avx512bw
	alternative.

	* gcc.target/i386/avx512vl-vpalignr-3.c: New test.
	* gcc.target/i386/avx512bw-vpalignr-3.c: New test.

From-SVN: r236368
2016-05-18 11:24:15 +02:00
Jakub Jelinek
a4f164221f sse.md (<ssse3_avx2>_pshufb<mode>3<mask_name>): Use constraint x instead of v in second alternative, add avx512bw alternative.
* config/i386/sse.md (<ssse3_avx2>_pshufb<mode>3<mask_name>): Use
	constraint x instead of v in second alternative, add avx512bw
	alternative.

	* gcc.target/i386/avx512vl-vpshufb-3.c: New test.
	* gcc.target/i386/avx512bw-vpshufb-3.c: New test.

From-SVN: r236367
2016-05-18 11:23:39 +02:00
Jakub Jelinek
7b37ce10ce sse.md (*<ssse3_avx2>_pmulhrsw<mode>3<mask_name>): Use constraint x instead of v in second alternative, add avx512bw alternative.
* config/i386/sse.md (*<ssse3_avx2>_pmulhrsw<mode>3<mask_name>): Use
	constraint x instead of v in second alternative, add avx512bw
	alternative.

	* gcc.target/i386/avx512vl-vpmulhrsw-3.c: New test.
	* gcc.target/i386/avx512bw-vpmulhrsw-3.c: New test.

From-SVN: r236366
2016-05-18 11:23:03 +02:00
Jakub Jelinek
fb7cbdebfc sse.md (avx2_pmaddubsw256, [...]): Add avx512bw alternative.
* config/i386/sse.md (avx2_pmaddubsw256, ssse3_pmaddubsw128): Add
	avx512bw alternative.

	* gcc.target/i386/avx512bw-vpmaddubsw-3.c: New test.

From-SVN: r236365
2016-05-18 11:22:28 +02:00
Kirill Yukhin
5ae46837e1 i386. Extend static buffers. Fix SF mode operand constraint to `Yv' in storehpd pattern.
gcc/
        * gcc/config/i386/sse.md (define_insn "*andnot<mode>3"): Extend static
	array to 128 chars.
	(define_insn "*andnottf3"): Ditto.
	(define_insn "*<code><mode>3"/any_logic): Ditto.
	(define_insn "*<code>tf3"/any_logic): Ditto.
	(define_insn "sse2_storehpd"): Use Yv constraint for scalar
	operand to block AVX-512VL insn variant emit when it is not enabled.

From-SVN: r236364
2016-05-18 09:16:09 +00:00
Kirill Yukhin
1889406050 AVX-512. Use `Yv' for SF mode operand in vec_concat pattern.
gcc/
	* config/i386/sse.md (define_insn "*vec_concatv2sf_sse4_1"): Use 'Yv'
	constraint fot SF mode.

From-SVN: r236363
2016-05-18 09:11:10 +00:00
Petr Murzin
fef31922aa Fix patterns to enable sse-14.c to compile with -masm=intel.
gcc/
        * config/i386/sse.md (define_insn "srcp14<mode>"): Use proper operand
	modifiers.
	(define_insn "rsqrt14<mode>"): Ditto.
	(define_insn "<mask_codefor>avx512dq_cvtps2qqv2di<mask_name>"): Ditto.
	(define_insn "<fixsuffix>fix_truncv2sfv2di2<mask_name>"): Ditto.
	(define_insn "avx512f_<code>v8div16qi2_mask_store"): Ditto.
	(define_insn "vec_set_hi_<mode><mask_name>"): Ditto.
	(define_insn "<mask_codefor>avx512dq_broadcast<mode><mask_name>"):
	Ditto.
	(define_insn "*avx512f_gatherdi<mode>"): Ditto.
	(define_insn "*avx512f_scatterdi<mode>"): Ditto.
	* config/i386/i386.c (ix86_print_operand): Expand check for size
	override codes for Intel syntax.

Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>

From-SVN: r236362
2016-05-18 09:06:11 +00:00
Richard Biener
c9326aef96 re PR tree-optimization/71168 (ICE in find_uses_to_rename_use (tree-ssa-loop-manip.c:379))
2016-05-18  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/71168
	* tree-loop-distribution.c (distribute_loop): Move *destroy_p
	initialization earlier.

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

From-SVN: r236361
2016-05-18 08:10:20 +00:00
James Greenhalgh
628d13d999 [Patch AArch64] Simplify reduc_plus_scal_v2[sd]f sequence
gcc/

	* config/aarch64/aarch64-simd.md
	(aarch64_reduc_plus_internal<mode>): Rename to...
	(reduc_plus_scal): ...This, and remove previous implementation.

From-SVN: r236360
2016-05-18 08:00:33 +00:00
Kugan Vivekanandarajah
f38748638a Adding the testcase which was not addaed as part of r236356.
gcc/testsuite/ChangeLog:

2016-05-17  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR middle-end/63586
	* gcc.dg/tree-ssa/pr63586-2.c: New test.
	* gcc.dg/tree-ssa/pr63586.c: New test.

From-SVN: r236359
2016-05-18 07:50:05 +00:00
Richard Biener
9d87bfce00 passes.def: Put late dse and cd_dce in canonical order.
2016-05-18  Richard Biener  <rguenther@suse.de>

	* passes.def: Put late dse and cd_dce in canonical order.

From-SVN: r236358
2016-05-18 07:41:09 +00:00
Jan Hubicka
ec6a1e3532 ipa-inline-transform.c (preserve_function_body_p): Look for first non-thunk clone.
* ipa-inline-transform.c (preserve_function_body_p): Look for
	first non-thunk clone.
	(save_function_body): Save into first non-thunk.
	* lto-cgraph.c (lto_output_edge): When streaming thunk do not look
	up call stmt id.
	(lto_output_node): Inline thunks don't need body in every
	partition.
	* lto-streamer-in.c: Do not fixup thunk clones.
	* cgraphclones.c (cgraph_node::create_edge_including_clone): Skip
	thunks.
	* tree-inline.c (copy_bb): Be prepared for target node to be new after
	folding suceeds.

From-SVN: r236357
2016-05-18 07:12:46 +00:00
Kugan Vivekanandarajah
df8b0a1119 re PR tree-optimization/63586 (x+x+x+x -> 4*x in gimple)
gcc/testsuite/ChangeLog:

2016-05-17  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR middle-end/63586
	* gcc.dg/tree-ssa/pr63586-2.c: New test.
	* gcc.dg/tree-ssa/pr63586.c: New test.
	* gcc.dg/tree-ssa/reassoc-14.c: Adjust multiplication count.

gcc/ChangeLog:

2016-05-17  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR middle-end/63586
	* tree-ssa-reassoc.c (transform_add_to_multiply): New.
	(reassociate_bb): Call transform_add_to_multiply.

From-SVN: r236356
2016-05-18 00:58:45 +00:00
Kugan Vivekanandarajah
9b856a0188 aarch64.c (all_extensions): Removed unused static variable.
gcc/ChangeLog:

2016-05-17  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* config/aarch64/aarch64.c (all_extensions): Removed unused static variable.

From-SVN: r236355
2016-05-18 00:46:58 +00:00
GCC Administrator
4c184bca38 Daily bump.
From-SVN: r236354
2016-05-18 00:16:19 +00:00
Joseph Myers
5506c15675 * da.po: Update.
From-SVN: r236349
2016-05-18 01:13:34 +01:00
Joseph Myers
97b1eafcd0 * da.po, sv.po: Update.
From-SVN: r236347
2016-05-18 01:10:15 +01:00
Nathan Sidwell
2efd67ed19 20030222-1.c: Skip on ptx.
* gcc.c-torture/execute/20030222-1.c: Skip on ptx.
	* gcc.dg/pr68671.c: Fix ptx xfail-if.
	* gcc.dg/torture/pr54261-1.c: Allocate atomic var statically.
	* gcc.dg/torture/type-generic-1.c: Enable UNSAFE for ptx.

From-SVN: r236346
2016-05-17 21:28:11 +00:00
Nathan Sidwell
1988b2c22a nvptx.c (nvptx_function_arg_boundary): New.
* config/nvptx/nvptx.c (nvptx_function_arg_boundary): New.
	(TARGET_FUNCTION_ARG_BOUNDARY): Override.

	testsuite/
	* gcc.target/nvptx/abi-vararg-3.c: New.

From-SVN: r236345
2016-05-17 21:16:49 +00:00
Mikhail Maltsev
ad1d92ab9f Fold bit_not through ASR and rotate
gcc/

	PR tree-optimization/54579
	PR middle-end/55299
	* match.pd (~(~X >> Y), ~(~X >>r Y), ~(~X <<r Y)): New patterns.

gcc/testsuite

	PR tree-optimization/54579
	PR middle-end/55299
	* gcc.dg/fold-notrotate-1.c: New test.
	* gcc.dg/fold-notshift-1.c: New test.
	* gcc.dg/fold-notshift-2.c: New test.

From-SVN: r236344
2016-05-17 20:50:22 +00:00
Marek Polacek
47768df837 re PR ipa/71146 (error: __builtin_unreachable or __builtin_trap call with arguments)
PR ipa/71146
	* tree-inline.c (expand_call_inline): Call
	maybe_remove_unused_call_args.

	* g++.dg/ipa/pr71146.C: New test.

From-SVN: r236343
2016-05-17 20:00:41 +00:00
David Malcolm
6b5423a512 jit: gcc diagnostics are jit errors
libgccjit performs numerous checks at the API boundary, but
if these succeed, it ignores errors and other diagnostics emitted
within the core of gcc, and treats the compile of a gcc_jit_context
as having succeeded.

This patch ensures that if any diagnostics are emitted, they
are visible from the libgccjit API, and that the the context is
flagged as having failed.

For now any kind of diagnostic is treated as a jit error,
so warnings and notes also count as errors.

gcc/jit/ChangeLog:
	* dummy-frontend.c: Include diagnostic.h.
	(jit_begin_diagnostic): New function.
	(jit_end_diagnostic): New function.
	(jit_langhook_init): Register jit_begin_diagnostic
	and jit_end_diagnostic with the global_dc.
	* jit-playback.c: Include diagnostic.h.
	(gcc::jit::playback::context::add_diagnostic): New method.
	* jit-playback.h (struct diagnostic_context): Add forward
	declaration.
	(gcc::jit::playback::context::add_diagnostic): New method.

gcc/testsuite/ChangeLog:
	* jit.dg/test-error-array-bounds.c: New test case.

From-SVN: r236342
2016-05-17 19:28:47 +00:00
David Malcolm
f51703a8f8 jit: document gcc_jit_context_new_call_through_ptr
gcc/jit/ChangeLog:
	* docs/topics/expressions.rst (Function calls): Document
	gcc_jit_context_new_call_through_ptr.
	* docs/_build/texinfo/libgccjit.texi: Regenerate.

From-SVN: r236341
2016-05-17 19:17:19 +00:00
Jim Wilson
18ea359aaf Fix minor doc bugs, signalling typo, major version changes rare.
gcc/
	* doc/cpp.texi (__GNUC__): Major version changes are no longer rare.
	* doc/invoke.texi (-mnan=2008): Change signalling to signaling.
	* doc/md.texi (fmin@var{m}3): Likewise.

From-SVN: r236340
2016-05-17 11:50:22 -07:00
Marc Glisse
c7986356a1 x & C -> x if we know that x & ~C == 0
2016-05-17  Marc Glisse  <marc.glisse@inria.fr>

gcc/
	* match.pd (X & C): New transformation.

gcc/testsuite/
	* gcc.dg/tree-ssa/and-1.c: New testcase.

From-SVN: r236338
2016-05-17 17:57:27 +00:00