Commit Graph

146269 Commits

Author SHA1 Message Date
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
Marc Glisse d982c5b7b7 ~X & Y to X ^ Y in some cases
2016-05-17  Marc Glisse  <marc.glisse@inria.fr>

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

gcc/testsuite/
	* gcc.dg/tree-ssa/pr69270.c: Adjust.
	* gcc.dg/tree-ssa/andnot-1.c: New testcase.

From-SVN: r236337
2016-05-17 17:54:28 +00:00
Marc Glisse 0139ba9332 VRP: range info of new variables
2016-05-17  Marc Glisse  <marc.glisse@inria.fr>

gcc/
	* tree-vrp.c (simplify_truth_ops_using_ranges): Set range
	information for new SSA_NAME.
	(simplify_conversion_using_ranges): Get range through get_range_info
	instead of get_value_range.

gcc/testsuite/
	* gcc.dg/tree-ssa/pr69270.c: Adjust.
	* gcc.dg/tree-ssa/vrp99.c: New testcase.

From-SVN: r236336
2016-05-17 17:50:55 +00:00
Jiong Wang 6f2c662329 [AArch64, 4/4] Reimplement vmvn* intrinscis, remove inline assembly
gcc/
	* config/aarch64/arm_neon.h (vmvn_s8): Reimplement using C operator.
	Remove inline assembly.
	(vmvn_s16): Likewise.
	(vmvn_s32): Likewise.
	(vmvn_u8): Likewise.
	(vmvn_u16): Likewise.
	(vmvn_u32): Likewise.
	(vmvnq_s8): Likewise.
	(vmvnq_s16): Likewise.
	(vmvnq_s32): Likewise.
	(vmvnq_u8): Likewise.
	(vmvnq_u16): Likewise.
	(vmvnq_u32): Likewise.
	(vmvn_p8): Likewise.
	(vmvnq_p16): Likewise.

From-SVN: r236334
2016-05-17 16:41:18 +00:00
Jiong Wang daab456213 [AArch64, 3/4] Reimplement multiply by element to get rid of inline assembly
gcc/
	* config/aarch64/aarch64-simd.md (vmul_n_f32): Remove inline assembly.
	Use builtin.
	(vmul_n_s16): Likewise.
	(vmul_n_s32): Likewise.
	(vmul_n_u16): Likewise.
	(vmul_n_u32): Likewise.
	(vmulq_n_f32): Likewise.
	(vmulq_n_f64): Likewise.
	(vmulq_n_s16): Likewise.
	(vmulq_n_s32): Likewise.
	(vmulq_n_u16): Likewise.
	(vmulq_n_u32): Likewise.

gcc/testsuite/
	* gcc.target/aarch64/simd/vmul_elem_1.c: Use intrinsics.

From-SVN: r236333
2016-05-17 16:39:39 +00:00
Jiong Wang 2233003338 [AArch64, 2/4] Extend vector mutiply by element to all supported modes
gcc/
	* config/aarch64/aarch64-simd.md (*aarch64_mul3_elt_to_128df): Extend to
	all supported modes.  Rename to "*aarch64_mul3_elt_from_dup".

gcc/testsuite/
	* gcc.target/aarch64/simd/vmul_elem_1.c: New.

From-SVN: r236332
2016-05-17 16:37:19 +00:00
Jiong Wang 98b3a5f289 [AArch64, 1/4] Add the missing support of vfms_n_f32, vfmsq_n_f32, vfmsq_n_f64
gcc/
	* config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_to_128df): Rename
	to *aarch64_fma4_elt_from_dup<mode>.
	(*aarch64_fnma4_elt_to_128df): Rename to
	*aarch64_fnma4_elt_from_dup<mode>.
	* config/aarch64/arm_neon.h (vfma_n_f64): New.
	(vfms_n_f32): Likewise.
	(vfms_n_f64): Likewise.
	(vfmsq_n_f32): Likewise.
	(vfmsq_n_f64): Likewise.

gcc/testsuite/
	* gcc.target/aarch64/fmla_intrinsic_1.c: Allow ".d[index]" besides
	".2d[index]" when scan the assembly.
	* gcc.target/aarch64/fmls_intrinsic_1.c: Likewise.
	* gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h: New entry for
	float64x1.
	* gcc.target/aarch64/advsimd-intrinsics/vfms_vfma_n.c: New.

From-SVN: r236331
2016-05-17 16:34:46 +00:00
Gerald Pfeifer 92237f4398 * wide-int.h: Change fixed_wide_int_storage from class to struct.
From-SVN: r236324
2016-05-17 14:56:45 +00:00
Richard Biener b71b7a8ed8 re PR tree-optimization/71132 (gcc ICE at -O3 on valid code on x86_64-linux-gnu with “seg fault”)
2016-05-17  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/71132
	* tree-loop-distribution.c (create_rdg_cd_edges): Pass in loop.
	Only add control dependences for blocks in the loop.
	(build_rdg): Adjust.
	(generate_code_for_partition): Return whether loop should
	be destroyed and delay that.
	(distribute_loop): Likewise.
	(pass_loop_distribution::execute): Record loops to be destroyed
	and perform delayed destroying of loops.

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

From-SVN: r236320
2016-05-17 12:53:30 +00:00
Christophe Lyon 3c51ad4678 think1.C: Fix dg-do and dg-skip order.
* g++.dg/inherit/think1.C: Fix dg-do and dg-skip order.

From-SVN: r236319
2016-05-17 14:22:33 +02:00
Kyrylo Tkachov d20faa6624 [AArch64] PR target/70809: Delete aarch64_vmls<mode> pattern
PR target/70809
	* config/aarch64/aarch64-simd.md (aarch64_vmls<mode>): Delete.

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

From-SVN: r236318
2016-05-17 12:15:05 +00:00
James Greenhalgh 978357b05d [Patch AArch64] Delete ASM_OUTPUT_DEF and fallback to default .set directive
gcc/

	* config/aarch64/aarch64-elf.h (ASM_OUTPUT_DEF): Delete.

From-SVN: r236317
2016-05-17 11:10:10 +00:00
Kyrylo Tkachov b75cc5a487 [AArch64][tests] Skip cpu-diagnostics tests when overriding -mcpu
* gcc.target/aarch64/cpu-diagnostics-1.c: Skip if -mcpu is overriden.
	* gcc.target/aarch64/cpu-diagnostics-2.c: Likewise.
	* gcc.target/aarch64/cpu-diagnostics-3.c: Likewise.
	* gcc.target/aarch64/cpu-diagnostics-4.c: Likewise.

From-SVN: r236316
2016-05-17 10:22:07 +00:00
Ilya Enkovich b28eb19500 re PR target/71114 (Several test suite failures on x86_64-apple-darwin* after revision r236090)
gcc/

	PR target/71114
	* config/i386/i386.c (dimode_scalar_chain::convert_op): Fix
	insertion point for instructions generated by validize_mem.

gcc/testsuite/

	PR target/71114
	* gcc.target/i386/pr70799-1.c: Fix scan for Darwin.

From-SVN: r236315
2016-05-17 09:28:15 +00:00
Jakub Jelinek 69af4eecb8 re PR sanitizer/71160 (libasan: Backport support for malloc within dlsym)
PR sanitizer/71160
	* asan/asan_malloc_linux.cc: Cherry pick upstream r254395
	and r269633.

From-SVN: r236314
2016-05-17 11:17:54 +02:00
James Greenhalgh e989235095 [Patch onbious] Fix indentation in c-typeck.c parser_build_unary_op
gcc/c/

	* c-typeck.c (parser_build_unary_op): Fix formatting.

From-SVN: r236313
2016-05-17 09:02:19 +00:00
James Greenhalgh e6bd9fb931 [Patch obvious AArch64] Wrap SHIFT_COUNT_TRUNCATED in brackets
* config/aarch64/aarch64.c (SHIFT_COUNT_TRUNCATED): Wrap definition
	in brackets.

From-SVN: r236312
2016-05-17 08:56:57 +00:00
James Greenhalgh 83faf7d007 [AArch64 trivial] Don't define a macro when a variable will do
* config/aarch64/aarch64.c
	(aarch64_output_simd_mov_immediate): Make "buf_size" a variable
	rather than a macro.

From-SVN: r236311
2016-05-17 08:54:19 +00:00
Chung-Lin Tang e37288a608 oacc-init.c (acc_init): Remove !cached_base_dev condition on call to gomp_init_targets_once.
2016-05-17  Chung-Lin Tang  <cltang@codesourcery.com>

	libgomp/
	* oacc-init.c (acc_init): Remove !cached_base_dev condition on call
	to gomp_init_targets_once.
	(acc_set_device_type): Remove !cached_base_dev condition on call to
	gomp_init_targets_once, move call to before acc_device_lock acquire,
	to avoid deadlock.
	(acc_get_device_num): Remove !cached_base_dev condition on call to
	gomp_init_targets_once.
	(acc_set_device_num): Likewise.

From-SVN: r236310
2016-05-17 08:07:52 +00:00
GCC Administrator d35c169874 Daily bump.
From-SVN: r236305
2016-05-17 00:16:24 +00:00
Jakub Sejdak fe38e08bfe config.guess: Import version 2016-04-02 (newest).
* config.guess: Import version 2016-04-02 (newest).
	* config.sub: Import version 2016-05-10 (newest).

From-SVN: r236301
2016-05-16 16:13:37 -06:00
Jeff Law cef1a0b874 configure.ac: Add ARC support to libgloss.
2016-05-13  Anton Kolesov  <anton.kolesov@synopsys.com>

	* configure.ac: Add ARC support to libgloss.
	* configure: Regenerate

From-SVN: r236300
2016-05-16 14:37:43 -06:00
Jan Hubicka 19322a8706 ipa-inline-analysis.c (compute_inline_parameters): Disable inlinig into instrumentation thunks.
* ipa-inline-analysis.c (compute_inline_parameters): Disable inlinig
	into instrumentation thunks.
	* cif-code.def (CIF_CHKP): New.

From-SVN: r236299
2016-05-16 19:33:02 +00:00
Uros Bizjak 1743ce8001 xopintrin.h: Correct "unsinged" typo in the comments.
* config/i386/xopintrin.h: Correct "unsinged" typo in the comments.

From-SVN: r236297
2016-05-16 20:56:33 +02:00
Martin Jambor 51d9ed4890 [hsa] Increase hsa symbol alignment to natural one
2016-05-16  Martin Jambor  <mjambor@suse.cz>

	* hsa-gen.c (fillup_for_decl): Increase alignment to natural one.
	(get_symbol_for_decl): Sorry if a global symbol in under-aligned.

libgomp/
        * testsuite/libgomp.hsa.c/complex-align-2.c: New test.

From-SVN: r236295
2016-05-16 19:49:44 +02:00
Marek Polacek 538374e139 gimple.c (maybe_remove_unused_call_args): Fix typos in the commentary.
* gimple.c (maybe_remove_unused_call_args): Fix typos in the
	commentary.

From-SVN: r236294
2016-05-16 17:33:23 +00:00
Martin Jambor 636542efb5 [PR 70857] Copy RESULT_DECL of HSA outlined kernel function
2016-05-16  Martin Jambor  <mjambor@suse.cz>

	PR hsa/70857
	* omp-low.c (grid_expand_target_grid_body): Copy RESULT_DECL of
	the outlined kernel function.

From-SVN: r236291
2016-05-16 17:40:30 +02:00
Wilco Dijkstra 704b85c7d8 Update documentation of AArch64 options for GCC6 to be more accurate,
fix a few minor mistakes and remove some duplication.

        * doc/invoke.texi (AArch64 Options): Various updates.

From-SVN: r236290
2016-05-16 14:55:15 +00:00
Robert Suchanek 0bc8d0b3c1 Enable LSA/DLSA for MSA.
* config/mips/mips.h (ISA_HAS_LSA): Enable for -mmsa.
	(ISA_HAS_DLSA): Ditto.

From-SVN: r236289
2016-05-16 14:21:02 +00:00
Matthew Fortune 7065002128 Correct the latency of loads in M5100
gcc/
	* config/mips/m5100.md (m51_int_load): Update the latency to 2.

From-SVN: r236288
2016-05-16 14:20:47 +00:00
Nathan Sidwell b434610704 nvptx.c (nvptx_mangle_decl_assembler_name): Revert.
* config/nvptx/nvptx.c (nvptx_mangle_decl_assembler_name): Revert.
	(nvptx_name_replacement): Restore.  Add comment.
	(write_fn_proto, write_fn_proto_from_insn,
	nvptx_output_call_insn): Restore
	(TARGET_MANGLE_DECL_ASSEMBLER_NAME): Delete.

From-SVN: r236286
2016-05-16 13:16:28 +00:00
Wilco Dijkstra 954224d731 Some patterns are using '%w2' for immediate operands...
Some patterns are using '%w2' for immediate operands, which means that a zero
immediate is actually emitted as 'wzr' or 'xzr'.  This not only changes an
immediate operand into a register operand but may emit illegal instructions
from legal RTL (eg. ORR x0, SP, xzr rather than ORR x0, SP, 0).

	* config/aarch64/aarch64.md
	(add<mode>3_compareC_cconly_imm): Remove use of %w.
	(add<mode>3_compareC_imm): Likewise.
	(<optab>si3_uxtw): Split into register and immediate variants.
	(andsi3_compare0_uxtw): Likewise.
	(and<mode>3_compare0): Likewise.
	(and<mode>3nr_compare0): Likewise.
	(stack_protect_test_<mode>): Don't use %x for memory operands.

From-SVN: r236285
2016-05-16 12:52:22 +00:00
Matthew Fortune e6e89f0d17 Fix multi-line brackets in mips-cpus.def
gcc/
	* config/mips/mips-cpus.def (p5600): Add multi-line brackets.

From-SVN: r236284
2016-05-16 12:45:31 +00:00
Eric Botcazou d972bae09c decl.c (gnat_to_gnu_entity): Do not build a specific type for the object if it is deemed a constant.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
	a specific type for the object if it is deemed a constant.

From-SVN: r236283
2016-05-16 11:33:01 +00:00
Eric Botcazou f91caacb45 freeze.adb (Freeze_Record_Type): Extend pragma Implicit_Packing to components of any elementary types and of...
* freeze.adb (Freeze_Record_Type): Extend pragma Implicit_Packing to
	components of any elementary types and of composite types.

From-SVN: r236282
2016-05-16 11:20:45 +00:00
Eric Botcazou 3d626f94a5 freeze.adb (Freeze_Array_Type): Call Addressable predicate instead of testing for individual sizes.
* freeze.adb (Freeze_Array_Type): Call Addressable predicate instead
	of testing for individual sizes.
	(Freeze_Entity): Rework implementation of pragma Implicit_Packing for
	array types, in particular test for suitable sizes upfront and do not
	mimic the processing that will be redone later in Freeze_Array_Type.

From-SVN: r236281
2016-05-16 11:16:42 +00:00