Commit Graph

66121 Commits

Author SHA1 Message Date
Richard Biener 16967aff7a re PR target/79971 (ICE in const_binop, at fold-const.c:1554 on ARM target with saturated integers)
2017-03-09  Richard Biener  <rguenther@suse.de>

	PR middle-end/79971
	* gimple-expr.c (useless_type_conversion_p): Preserve
	TYPE_SATURATING for fixed-point types.

	* gcc.dg/fixed-point/pr79971.c: New testcase.

From-SVN: r246002
2017-03-09 13:20:50 +00:00
Richard Biener 26d7dc48b6 re PR ipa/79970 (ICE in add_stack_var, at cfgexpand.c:450 with always_inline attribute)
2017-03-09  Richard Biener  <rguenther@suse.de>

	PR ipa/79970
	* ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
	alignment of BLKmode params.

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

From-SVN: r246001
2017-03-09 13:20:03 +00:00
Kyrylo Tkachov 88119b464e [AArch64] PR target/79913: VEC_SELECT bugs in aarch64 patterns
PR target/79913
	* config/aarch64/iterators.md (VALL_F16_NO_V2Q): New mode iterator.
	(VALL_NO_V2Q): Likewise.
	(VDQF_DF): Delete.
	* config/aarch64/aarch64-simd.md
	(aarch64_dup_lane_<vswap_width_name><mode>): Use VALL_F16_NO_V2Q
	iterator.
	(*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Use
	VALL_NO_V2Q mode iterator.
	(*aarch64_vgetfmulx<mode>): Use VDQF iterator.

From-SVN: r245999
2017-03-09 10:34:36 +00:00
Martin Liska 8a7df0316d Fix ICE in tree-chkp-opt.c (PR tree-optimization/79631).
2017-03-09  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/79631
	* tree-chkp-opt.c (chkp_is_constant_addr): Call
	tree_int_cst_sign_bit just for INTEGER constants.
2017-03-09  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/79631
	* gcc.target/i386/mpx/pr79631.c: New test.

From-SVN: r245998
2017-03-09 10:10:02 +00:00
Martin Liska 3828bb0d7e Disable -fcheck-pointer-bounds with sanitizers.
2017-03-09  Martin Liska  <mliska@suse.cz>

	PR target/65705
	PR target/69804
	* toplev.c (process_options): Disable -fcheck-pointer-bounds with
	sanitizers.
2017-03-09  Martin Liska  <mliska@suse.cz>

	PR target/65705
	PR target/69804
	* gcc.target/i386/pr71458.c: Update scanned pattern.

From-SVN: r245997
2017-03-09 10:04:50 +00:00
Marek Polacek 410a590c2a re PR c++/79672 (ICE with -Wduplicated-branches -fopenmp)
PR c++/79672
	* tree.c (inchash::add_expr): Handle TREE_VEC.

	* g++.dg/warn/Wduplicated-branches2.C: Fix PR.
	* g++.dg/warn/Wduplicated-branches3.C: New test.

From-SVN: r245996
2017-03-09 09:53:03 +00:00
Martin Liska a278b1c38f Support BIT_FIELD_REF in MPX (PR ipa/79764).
2017-03-09  Martin Liska  <mliska@suse.cz>

	PR ipa/79764
	(chkp_narrow_size_and_offset): New function.
	(chkp_parse_array_and_component_ref): Support BIT_FIELD_REF.
	(void chkp_parse_bit_field_ref): New function.
	(chkp_make_addressed_object_bounds): Add case for BIT_FIELD_REF.
	(chkp_process_stmt): Use chkp_parse_bit_field_ref.
2017-03-09  Martin Liska  <mliska@suse.cz>

	PR ipa/79764
	* g++.dg/pr79764.C: New test.

From-SVN: r245994
2017-03-09 09:26:45 +00:00
Martin Liska 8dc19053e1 Get bounds for a PARM_DECL (PR ipa/79761).
2017-03-09  Martin Liska  <mliska@suse.cz>

	PR ipa/79761
	* tree-chkp.c (chkp_get_bound_for_parm): Get bounds for a param.
	(chkp_find_bounds_1): Remove gcc_unreachable.
2017-03-09  Martin Liska  <mliska@suse.cz>

	PR ipa/79761
	* g++.dg/pr79761.C: New test.

From-SVN: r245993
2017-03-09 09:22:29 +00:00
Jakub Jelinek 9e463823a8 re PR sanitizer/79944 (asan: incorrect instrumentation of atomic operations)
PR sanitizer/79944
	* asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
	BUILT_IN_SYNC*, determine the access type from the size suffix and
	always build a MEM_REF with that type.  Handle forgotten
	BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.

	* c-c++-common/asan/pr79944.c: New test.

From-SVN: r245991
2017-03-09 10:20:23 +01:00
Jakub Jelinek 6b62f32302 re PR target/79932 (_mm512_packus_epi32 does not compile under -O0)
PR target/79932
	* config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
	_mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
	_mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
	_mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
	_mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
	_mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
	_mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
	_mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
	_mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
	_mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
	_mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
	_mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
	_mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
	_mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
	_mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
	_mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
	_mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
	_mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
	_mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
	_mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
	_mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
	_mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
	_mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
	_mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
	_mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
	_mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
	_mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
	_mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
	_mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
	_mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
	definitions outside of __OPTIMIZE__ guarded section.

	* gcc.target/i386/pr79932-2.c: New test.

From-SVN: r245990
2017-03-09 10:11:06 +01:00
Jakub Jelinek 030fc94af2 re PR target/79932 (_mm512_packus_epi32 does not compile under -O0)
PR target/79932
	* config/i386/avx512bwintrin.h (_mm512_packs_epi32,
	_mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
	_mm512_packus_epi32, _mm512_maskz_packus_epi32,
	_mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
	guarded section.

	* gcc.target/i386/pr79932-1.c: New test.

From-SVN: r245989
2017-03-09 10:09:27 +01:00
Andreas Krebbel dd01cd0ca2 S/390: Add missing constraints in builtin patterns
gcc/ChangeLog:

2017-03-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/vx-builtins.md ("vfee<mode>", "vfeez<mode>")
	("vfenez<mode>"): Add missing constraints.

From-SVN: r245987
2017-03-09 07:53:29 +00:00
Martin Sebor afd78f0213 PR target/79928 - nds32: misspelled diagnostic: not support -fpic
Verified by building an nds32be-elf cross-compiler.

gcc/ChangeLog
	* config/nds32/nds32.c (nds32_option_override):

From-SVN: r245982
2017-03-08 16:29:42 -07:00
Jakub Jelinek eebc5e2dde re PR c/79940 (OpenMP pragma - internal compiler error with taskloop)
PR c/79940
	* gimplify.c (gimplify_omp_for): Replace index var in outer
	taskloop statement with an artificial variable and add
	OMP_CLAUSE_PRIVATE clause for it.

	* testsuite/libgomp.c/pr79940.c: New test.

From-SVN: r245980
2017-03-08 18:21:06 +01:00
Richard Biener edfcd7e3d4 re PR tree-optimization/79955 (GLIBC build fails after r245840)
2017-03-08  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79955
	* tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
	for accesses that are completely outside of the variable.

	* gcc.dg/uninit-24.c: New testcase.

From-SVN: r245976
2017-03-08 14:10:47 +00:00
Andrew Haley f1a675e486 re PR tree-optimization/79943 (Loop splitting breaks with loops of pointer type)
2017-03-08  Andrew Haley  <aph@redhat.com>

	PR tree-optimization/79943
	* tree-ssa-loop-split.c (compute_new_first_bound): When
	calculating the new upper bound, (END-BEG) should be added, not
	subtracted.

From-SVN: r245974
2017-03-08 11:35:23 +00:00
Jakub Jelinek 0b9f099afd avr.md (setmemhi): Make sure match_dup operand number comes before match_scratch.
* config/avr/avr.md (setmemhi): Make sure match_dup
	operand number comes before match_scratch.

From-SVN: r245969
2017-03-08 09:52:05 +01:00
Richard Biener 61fdfd8c51 re PR tree-optimization/79920 (Incorrect floating point results when compiling with -O3)
2017-03-08  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79920
	* tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
	with ncopies == 1 to ...
	(vect_transform_slp_perm_load): ... here.  Properly compute
	all element loads by iterating VF times over the group.  Do
	not handle ncopies (computed in a broken way) in
	vect_create_mask_and_perm.

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

From-SVN: r245968
2017-03-08 08:50:01 +00:00
Jakub Jelinek 4b48e88382 re PR target/79904 (ICE in annotate_constant_pool_refs, at config/s390/s390.c:7909)
PR sanitizer/79904
	* internal-fn.c (expand_vector_ubsan_overflow): If arg0 or arg1
	is a uniform vector, use uniform_vector_p return value instead of
	building ARRAY_REF on folded VIEW_CONVERT_EXPR to array type.

	* gcc.dg/ubsan/pr79904.c: New test.

From-SVN: r245967
2017-03-08 09:35:20 +01:00
Marek Polacek d8a90142db re PR middle-end/79809 (ICE in alloca_call_type, at gimple-ssa-warn-alloca.c:282)
PR middle-end/79809
	* gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
	(alloca_call_type): Likewise.

	* g++.dg/Walloca1.C: New test.

From-SVN: r245955
2017-03-07 17:30:53 +00:00
Martin Liska ec38330401 gcov: put comment to correct location.
2017-03-07  Martin Liska  <mliska@suse.cz>

	* gcov.c (process_args): Put comment to correct location.

From-SVN: r245952
2017-03-07 14:13:10 +00:00
Martin Liska a5e9e3e458 Use array_at_struct_end_p in tree-chkp.c (PR middle-end/68270).
2017-03-07  Martin Liska  <mliska@suse.cz>

	PR middle-end/68270
	* tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
	Use array_at_struct_end_p instead of DECL_CHAIN (field).
	(chkp_narrow_bounds_for_field): Likewise.
	(chkp_parse_array_and_component_ref): Pass one more argument to
	call.
2017-03-07  Martin Liska  <mliska@suse.cz>

	PR middle-end/68270
	* g++.dg/pr68270.C: New test.

From-SVN: r245951
2017-03-07 14:12:52 +00:00
Richard Biener 5281a167ea tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve preheaders.
2017-03-07  Richard Biener  <rguenther@suse.de>

	* tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
	preheaders.

From-SVN: r245950
2017-03-07 13:39:44 +00:00
Segher Boessenkool 2413298e2d i386: Do not align small stack slots to 16 bytes
As Shmuel reported in <https://gcc.gnu.org/ml/gcc-help/2017-03/msg00009.html>,
on x86-64 small structures in automatic storage are aligned to 16 bytes.
This seems to be because of a mix-up between bits and bytes in the i386
target code.


	* config/i386/i386.c (ix86_local_alignment): Align most aggregates
	of 16 bytes and more to 16 bytes, not those of 16 bits and more.

From-SVN: r245949
2017-03-07 12:53:32 +01:00
Kyrylo Tkachov c242d6154c PR c/79855: add full stop to store merging param descriptions
PR c/79855
	* params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
	to end of description.
	(PARAM_MAX_STORES_TO_MERGE): Likewise.

From-SVN: r245948
2017-03-07 09:36:44 +00:00
Jakub Jelinek 760f82dbb7 re PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)
PR rtl-optimization/79901
	* config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
	...
	(*avx512f_<code><mode>3<mask_name>): ... this.
	(<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
	iterator instead of VI8_AVX2_AVX512BW.

	* gcc.target/i386/pr79901.c: New test.

From-SVN: r245947
2017-03-07 09:11:30 +01:00
Jakub Jelinek cd5c0aeeae re PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)
PR rtl-optimization/79901
	* expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
	min/max expander, expand it using expand_vec_cond_expr.

From-SVN: r245946
2017-03-07 09:04:38 +01:00
Jakub Jelinek 1f6dba54da re PR sanitizer/79897 (ICE in gimplify_modify_expr, at gimplify.c:5627 on ARM target)
PR sanitizer/79897
	* ubsan.c (ubsan_encode_value): Call mark_addressable on the
	temporary.

	* c-c++-common/ubsan/pr79897.c: New test.

From-SVN: r245945
2017-03-07 07:11:14 +01:00
John David Anglin 9a1972f112 Fix typo.
From-SVN: r245937
2017-03-06 23:12:14 +00:00
Jakub Jelinek edca997e57 re PR c++/79821 (SEGV in cc1plus compiling 64-bit stdc++.h.gch/O2g.gch)
PR c++/79821
	* dwarf2out.h (dw_vec_const): Change array type from unsigned char *
	to void * for PCH reasons.
	* dwarf2out.c (output_loc_operands, output_die): Cast
	v.val_vec.array to unsigned char *.

From-SVN: r245932
2017-03-06 23:51:23 +01:00
John David Anglin 5935a7c495 PR target 77850
PR target 77850
	* config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
	vector types.

From-SVN: r245931
2017-03-06 22:48:53 +00:00
Vladimir Makarov f8386dae3f Fix the last ChangeLog entry
From-SVN: r245929
2017-03-06 20:29:49 +00:00
Vladimir Makarov feca7b8954 re PR rtl-optimization/79571 (ICE in Max. number of generated reload insns per insn is achieved (90))
2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/79571
	* lra-constraints.c (process_alt_operands): Claculate static
	reject and subtract it from overal when there will be only address
	reloads.

2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/79571
	* gcc.target/i386/pr79571.c: New.

From-SVN: r245928
2017-03-06 20:23:00 +00:00
Julia Koval 52564551d3 Set incoming stack boundary to 128 for 64-bit targets
For 64-bit targets, the incoming stack of interrupt handler is aligned
to 16 bytes.  Update ix86_minimum_incoming_stack_boundary to set the
incoming stack boundary of interrupt handler to 128 for 64-bit targets.

gcc/

2017-03-06  Julia Koval  <julia.koval@intel.com>

	PR target/79793
	* config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
	incoming stack boundary to 128 for 64-bit targets.

gcc/testsuite/

2017-03-06  Julia Koval  <julia.koval@intel.com>

	PR target/79793
	 * gcc.target/i386/interrupt-12.c: Update scan-assembler-times
	 directives.
	 * gcc.target/i386/interrupt-13.c: Ditto.
	 * gcc.target/i386/interrupt-14.c: Ditto.
	 * gcc.target/i386/interrupt-15.c: Ditto.

From-SVN: r245926
2017-03-06 08:08:59 -08:00
Richard Biener a8d25fd0dd re PR tree-optimization/79887 (ICE in set_uid_loop_bbs, at tree-vectorizer.c:482)
2017-03-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79894
	* tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
	to NULL after folding it.

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

From-SVN: r245923
2017-03-06 13:58:57 +00:00
Richard Biener 522fcdd739 re PR tree-optimization/79824 (Failure to peel for gaps leads to read beyond mapped memory)
2017-03-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79824
	* tree-vect-stmts.c (get_group_load_store_type): Fix alignment
	check disabling peeling for gaps.

	* gcc.dg/vect/pr79824-1.c: New testcase.
	* gcc.dg/vect/pr79824-2.c: Likewise.

From-SVN: r245922
2017-03-06 13:58:01 +00:00
Toma Tabacu 5464963112 Add check_effective_target_gettimeofday and use it in gcc.dg/lto/pr60449_0.c.
gcc/
	* doc/sourcebuild.texi (Effective-Target Keywords, Environment
	attributes): Document gettimeofday.

gcc/testsuite/

	* gcc.dg/lto/pr60449_0.c: Add dg-require-effective-target for
	gettimeofday.  Remove dg-skip-if for AVR.
	* lib/target-supports.exp (check_effective_target_gettimeofday):
	New proc.

From-SVN: r245921
2017-03-06 13:15:30 +00:00
Robin Dapp 6cc61b5a37 S/390: Disable vectorization for loops with few iterations
The following patch defines the PARAM_MIN_VECT_LOOP_BOUND parameter in
the s390 backend.  It helps with the vectorization epilogue problem
described here [1].
I see an overall performance increase of > 1% in SPECfp2006, yet some
cases like cactusADM regress.  This seems to be caused by the vectorizer
creating an epilogue guard for one more iteration than before, which, in
turn, causes e.g. predcom to run on the epilogue that it used to ignore
before ("Loop iterates only 1 time, nothing to do.").  Subsequent,
minor, effects cause an eventual slowdown.

Until the reason for the bad epilogue code is understood, this patch
mitigates the problem.  When investigating the issue, I stumbled across
an attempt to vectorize the epilogue itself as well as combine it with
the vectorized loop in addition to vector masking [2].  A similar
approach might also help here.  My original observation of high register
pressure within the epilogue still stands.  In this specific case, it
would most likely suffice to save all registers once, run the epilogue
and restore the registers.  I'm pretty sure this would be faster than
the "spill fest" that's currently happening.

Regards
 Robin

[1] https://gcc.gnu.org/ml/gcc/2017-01/msg00234.html
[2] https://gcc.gnu.org/ml/gcc-patches/2016-05/msg01562.html

gcc/ChangeLog:

2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>

	* config/s390/s390.c (s390_option_override_internal): Set
	PARAM_MIN_VECT_LOOP_BOUND

From-SVN: r245918
2017-03-06 12:43:33 +00:00
Robin Dapp 4bbc897068 S/390: Change 2-byte NOPs
The following patch changes "nopr %r7" to "nopr %r0" which is
advantageous from a hardware perspective. It will only be emitted for
hotpatching and should not impact normal code.

gcc/ChangeLog:

2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>

	* config/s390/s390.c (s390_asm_output_function_label): Use nopr %r0.
	* config/s390/s390.md: Likewise.

gcc/testsuite/ChangeLog:

2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>

	* gcc.target/s390/hotpatch-1.c: Check for nopr %r0.
	* gcc.target/s390/hotpatch-10.c: Likewise.
	* gcc.target/s390/hotpatch-11.c: Likewise.
	* gcc.target/s390/hotpatch-12.c: Likewise.
	* gcc.target/s390/hotpatch-13.c: Likewise.
	* gcc.target/s390/hotpatch-14.c: Likewise.
	* gcc.target/s390/hotpatch-15.c: Likewise.
	* gcc.target/s390/hotpatch-16.c: Likewise.
	* gcc.target/s390/hotpatch-17.c: Likewise.
	* gcc.target/s390/hotpatch-18.c: Likewise.
	* gcc.target/s390/hotpatch-19.c: Likewise.
	* gcc.target/s390/hotpatch-2.c: Likewise.
	* gcc.target/s390/hotpatch-26.c: Likewise.
	* gcc.target/s390/hotpatch-27.c: Likewise.
	* gcc.target/s390/hotpatch-28.c: Likewise.
	* gcc.target/s390/hotpatch-3.c: Likewise.
	* gcc.target/s390/hotpatch-4.c: Likewise.
	* gcc.target/s390/hotpatch-5.c: Likewise.
	* gcc.target/s390/hotpatch-6.c: Likewise.
	* gcc.target/s390/hotpatch-7.c: Likewise.
	* gcc.target/s390/hotpatch-8.c: Likewise.
	* gcc.target/s390/hotpatch-9.c: Likewise.

From-SVN: r245917
2017-03-06 12:40:19 +00:00
Jakub Jelinek 296cc393ef re PR target/79812 (ICE in simplify_binary_operation_1, at simplify-rtx.c:3586)
PR target/79812
	* config/i386/sse.md (VI8F_256_512): Remove mode iterator.
	(<avx2_avx512>_perm<mode>): Rename to ...
	(avx2_perm<mode>): ... this.  Use VI8F_256 iterator instead
	of VI8F_256_512.
	(<avx512>_perm<mode>_mask): Rename to ...
	(avx512vl_perm<mode>_mask): ... this.  Use VI8F_256 iterator instead
	of VI8F_256_512.
	(<avx2_avx512>_perm<mode>_1<mask_name>): Rename to ...
	(avx2_perm<mode>_1<mask_name): ... this.  Use VI8F_256 iterator
	instead of VI8F_256_512.
	(avx512f_perm<mode>): New define_expand.
	(avx512f_perm<mode>_mask): Likewise.
	(avx512f_perm<mode>_1<mask_name>): New define_insn.
	(<avx512>_vec_dup<mode>_1): Fix up vec_select mode.

	* gcc.target/i386/avx512f-vpermq-imm-3.c: New test.

From-SVN: r245915
2017-03-06 12:35:58 +01:00
Prachi Godbole c1b993c0a6 mips-msa.md (msa_fmax_a_<msafmt>, [...]): Introduce mode interator for if_then_else.
gcc/
	* config/mips/mips-msa.md (msa_fmax_a_<msafmt>, msa_fmin_a_<msafmt>,
	msa_max_a_<msafmt>, msa_min_a_<msafmt>): Introduce mode interator for
	if_then_else.
	(smin<mode>3, smax<mode>3): Change operand print code from 'B' to 'E'.

gcc/testsuite/
	* gcc.target/mips/msa-minmax.c: New tests.

From-SVN: r245913
2017-03-06 10:32:47 +00:00
Martin Liska a50a32aa3c Fix ICE in use-after-scope w/ -fno-tree-dce (PR sanitize/79783).
2017-03-06  Martin Liska  <mliska@suse.cz>

	PR sanitize/79783
	* asan.c (asan_expand_poison_ifn): Do not expand ASAN_POISON
	when having a SSA NAME w/o VAR_DECL assigned to it.
2017-03-06  Martin Liska  <mliska@suse.cz>

	PR sanitize/79783
	* g++.dg/asan/pr79783.C: New test.

From-SVN: r245912
2017-03-06 10:20:33 +00:00
Prachi Godbole 5ada812ced mips-msa.md (msa_dotp_<su>_d, [...]): Fix MODE for vec_select.
gcc/
	* config/mips/mips-msa.md (msa_dotp_<su>_d, msa_dpadd_<su>_d,
	msa_dpsub_<su>_d): Fix MODE for vec_select.

gcc/testsuite/
	* gcc.target/mips/msa-dotp.c: New tests.

From-SVN: r245911
2017-03-06 10:19:52 +00:00
Prachi Godbole 334b3c4b84 mips.c (mips_gen_const_int_vector): Change type of last argument.
gcc/
	* config/mips/mips.c (mips_gen_const_int_vector): Change type of last
	argument.
	* config/mips/mips-protos.h (mips_gen_const_int_vector): Likewise.

gcc/testsuite/
	* gcc.target/mips/msa-bclri.c: New test.

From-SVN: r245910
2017-03-06 10:08:51 +00:00
Richard Biener 8467170571 lto-streamer.c (lto_check_version): Use %qs in diagnostics.
2017-03-06  Richard Biener  <rguenther@suse.de>

	* lto-streamer.c (lto_check_version): Use %qs in diagnostics.
	* plugin.c (register_plugin_info): Likewise.
	* tree-chkp.c (chkp_make_static_const_bounds): Likewise.

From-SVN: r245909
2017-03-06 08:54:57 +00:00
Jakub Jelinek 661b4dd0be sse.md (sse_storehps, [...]): Require in condition that at least one operand is not a MEM.
* config/i386/sse.md (sse_storehps, sse_storelps,
	avx_<castmode><avxsizesuffix>_<castmode>,
	avx512f_<castmode><avxsizesuffix>_<castmode>,
	avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
	in condition that at least one operand is not a MEM.

From-SVN: r245904
2017-03-05 22:41:10 +01:00
Jakub Jelinek cc195d46a3 re PR middle-end/79805 (ICE (verify_flow_info failed) with -fnon-call-exceptions -O)
PR middle-end/79805
	* internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
	ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
	ECF_NOTHROW.
	* gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
	gimple_call_nothrow_p flag based on whether original builtin can throw.
	If it can, emit following stmts on the fallthrough edge.
	* tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
	don't create new bb if inserting just debug stmts on the edge, try to
	insert them on the fallthru bb or just reset debug stmts.

	* g++.dg/opt/pr79805.C: New test.

From-SVN: r245882
2017-03-03 20:32:01 +01:00
Segher Boessenkool f325c45673 rs6000: Fix for -mwarn-cell-microcode (PR43763)
If using -mwarn-cell-microcode, rs6000_final_prescan_insn calls
get_insn_template to get the name of the machine instruction.  But,
get_insn_template calls the output template if that is code, and that
then can modify recog_data (it is normal to change the operands, for
example).

This patch saves and restores recog_data around the call to
get_insn_template to fix the problems this causes.


	PR target/43763
	* config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
	restore recog_data (including the operand rtxes inside it) around
	the call to get_insn_template.

From-SVN: r245880
2017-03-03 18:00:50 +01:00
Martin Sebor da7c751ba7 PR tree-optimization/79699 - small memory leak in MPFR
gcc/ChangeLog:
	* context.c (context::~context): Free MPFR caches to avoid
	a memory leak on program exit.

From-SVN: r245878
2017-03-03 09:35:00 -07:00
Kyrylo Tkachov d9074b2959 [AArch64] Fix bootstrap due to wide_int .elt (0) uninit warning
* config/aarch64/aarch64.c (aarch64_float_const_representable_p):
    Use wide_int::ulow () instead of .elt (0).

From-SVN: r245877
2017-03-03 16:32:01 +00:00