Commit Graph

145706 Commits

Author SHA1 Message Date
Marek Polacek
2448a956be re PR c/67784 (Incorrect parsing when using declarations in for loops and typedefs)
PR c/67784
	* c-parser.c (c_parser_maybe_reclassify_token): New function factored
	out of ...
	(c_parser_for_statement): ... here.
	(c_parser_if_statement): Use it.
	(c_parser_switch_statement): Use it.
	(c_parser_while_statement): Use it.

	* gcc.dg/pr67784-3.c: New test.
	* gcc.dg/pr67784-4.c: New test.
	* gcc.dg/pr67784-5.c: New test.

From-SVN: r235446
2016-04-26 14:59:40 +00:00
Jason Merrill
ea79f1a604 * c-c++-common/cpp/pr63831-1.c: Don't test for C++ values here.
From-SVN: r235445
2016-04-26 10:05:51 -04:00
Marc Glisse
6b6aa8d388 match.pd: X + X --> X * 2 for integers
2016-04-26  Marc Glisse  <marc.glisse@inria.fr>

gcc/
	* genmatch.c (write_predicate): Add ATTRIBUTE_UNUSED.
	* fold-const.c (fold_binary_loc): Remove 2 transformations
	superseded by match.pd.
	* match.pd (x+x -> x*2): Generalize to integers.

gcc/testsuite/
	* gcc.dg/fold-plusmult.c: Adjust.
	* gcc.dg/no-strict-overflow-6.c: Adjust.
	* gcc.dg/gomp/loop-1.c: Xfail some tests.

From-SVN: r235444
2016-04-26 14:02:09 +00:00
Bernd Schmidt
a84454dc45 i386: Add a variant peephole for lea rather than ops that clobber CC.
* config/i386/i386.md (operation on memory peephole): Duplicate an
	existing peephole and adapt it to match lea rather than an operation
	that clobbers CC.

From-SVN: r235443
2016-04-26 12:57:50 +00:00
Bernd Schmidt
1d776c5f1b Enable -frename-registers at -O2.
PR rtl-optimization/57193
	* opts.c (default_options_table): Add OPT_frename_registers at -O2
	and above.
	* doc/invoke.texi (-frename-registers, -O2): Update documentation.

From-SVN: r235442
2016-04-26 12:43:42 +00:00
Bernd Schmidt
a2095b55ae Fix x86 testcases for -frename-registers.
* gcc.target/i386/avx512bw-vptestmb-1.c: Correct [xyz]mm register
	number scans.
	* gcc.target/i386/avx512bw-vptestmw-1.c: Likewise.
	* gcc.target/i386/avx512bw-vptestnmb-1.c: Likewise.
	* gcc.target/i386/avx512bw-vptestnmw-1.c: Likewise.
	* gcc.target/i386/avx512cd-vpbroadcastmb2q-1.c: Likewise.
	* gcc.target/i386/avx512cd-vpbroadcastmw2d-1.c: Likewise.
	* gcc.target/i386/avx512dq-vfpclasspd-1.c: Likewise.
	* gcc.target/i386/avx512dq-vfpclassps-1.c: Likewise.
	* gcc.target/i386/avx512dq-vinsertf64x2-1.c: Likewise.
	* gcc.target/i386/avx512dq-vinserti64x2-1.c: Likewise.
	* gcc.target/i386/avx512f-gather-5.c: Likewise.
	* gcc.target/i386/avx512f-vptestmd-1.c: Likewise.
	* gcc.target/i386/avx512f-vptestmq-1.c: Likewise.
	* gcc.target/i386/avx512f-vptestnmd-1.c: Likewise.
	* gcc.target/i386/avx512f-vptestnmq-1.c: Likewise.
	* gcc.target/i386/avx512f-vrndscaleps-1.c: Likewise.
	* gcc.target/i386/avx512vl-vpbroadcastmb2q-1.c: Likewise.
	* gcc.target/i386/avx512vl-vpbroadcastmw2d-1.c: Likewise.
	* gcc.target/i386/avx512vl-vptestmd-1.c: Likewise.
	* gcc.target/i386/avx512vl-vptestmq-1.c: Likewise.
	* gcc.target/i386/avx512vl-vptestnmd-1.c: Likewise.
	* gcc.target/i386/avx512vl-vptestnmq-1.c: Likewise.
	* gcc.target/i386/pr32219-2.c: Allow registers other than %eax in
	scans.
	* gcc.target/i386/pr32219-4.c: Likewise.
	* gcc.target/i386/pr32219-6.c: Likewise.
	* gcc.target/i386/pr32219-8.c: Likewise.

From-SVN: r235441
2016-04-26 12:25:52 +00:00
Kyrylo Tkachov
bb0cc5c896 Fix FAIL: gcc.dg/tree-ssa/minmax-2.c scan-tree-dump optimized "__builtin_fmin"
* gcc.dg/tree-ssa/minmax-2.c: Require c99_runtime and add the
	associated options.

From-SVN: r235440
2016-04-26 12:17:39 +00:00
Martin Jambor
83f5f27d01 Verify __builtin_unreachable and __builtin_trap are not called with arguments
2016-04-26  Martin Jambor  <mjambor@suse.cz>

	* tree-cfg.c (verify_gimple_call): Check that calls to
	__builtin_unreachable or __builtin_trap do not have actual arguments.

From-SVN: r235439
2016-04-26 13:51:23 +02:00
Marek Polacek
5a0802ea08 Bootstrapped/regtested on x86_64-linux, ok for trunk?
2016-04-25  Marek Polacek  <polacek@redhat.com>

	PR c++/70744
	* call.c (build_conditional_expr_1): Call cp_stabilize_reference
	instead of stabilize_reference.
	(build_over_call): Likewise.
	* cp-tree.h (cp_stabilize_reference): Declare.
	* tree.c (cp_stabilize_reference): New function.
	* typeck.c (cp_build_unary_op): Call cp_stabilize_reference instead of
	stabilize_reference.
	(unary_complex_lvalue): Likewise.
	(cp_build_modify_expr): Likewise.

	* g++.dg/ext/cond2.C: New test.

diff --git gcc/cp/call.c gcc/cp/call.c
index 11f2d42..476e806 100644
--- gcc/cp/call.c
+++ gcc/cp/call.c
@@ -4634,7 +4634,7 @@ build_conditional_expr_1 (location_t loc, tree arg1, tree arg2, tree arg3,
 
       /* Make sure that lvalues remain lvalues.  See g++.oliva/ext1.C.  */
       if (real_lvalue_p (arg1))
-	arg2 = arg1 = stabilize_reference (arg1);
+	arg2 = arg1 = cp_stabilize_reference (arg1);
       else
 	arg2 = arg1 = save_expr (arg1);
     }
@@ -7644,8 +7644,9 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
 	       || (TREE_CODE (arg) == TARGET_EXPR
 		   && !unsafe_copy_elision_p (fa, arg)))
 	{
-	  tree to = stabilize_reference (cp_build_indirect_ref (fa, RO_NULL,
-								complain));
+	  tree to = cp_stabilize_reference (cp_build_indirect_ref (fa,
+								   RO_NULL,
+								   complain));
 
 	  val = build2 (INIT_EXPR, DECL_CONTEXT (fn), to, arg);
 	  return val;
@@ -7655,7 +7656,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
 	   && trivial_fn_p (fn)
 	   && !DECL_DELETED_FN (fn))
     {
-      tree to = stabilize_reference
+      tree to = cp_stabilize_reference
 	(cp_build_indirect_ref (argarray[0], RO_NULL, complain));
       tree type = TREE_TYPE (to);
       tree as_base = CLASSTYPE_AS_BASE (type);
diff --git gcc/cp/cp-tree.h gcc/cp/cp-tree.h
index ec92718..0e46ae1 100644
--- gcc/cp/cp-tree.h
+++ gcc/cp/cp-tree.h
@@ -6494,6 +6494,7 @@ extern cp_lvalue_kind real_lvalue_p		(const_tree);
 extern cp_lvalue_kind lvalue_kind		(const_tree);
 extern bool lvalue_or_rvalue_with_address_p	(const_tree);
 extern bool xvalue_p	                        (const_tree);
+extern tree cp_stabilize_reference		(tree);
 extern bool builtin_valid_in_constant_expr_p    (const_tree);
 extern tree build_min				(enum tree_code, tree, ...);
 extern tree build_min_nt_loc			(location_t, enum tree_code,
diff --git gcc/cp/tree.c gcc/cp/tree.c
index 112c8c7..137186f 100644
--- gcc/cp/tree.c
+++ gcc/cp/tree.c
@@ -296,6 +296,46 @@ xvalue_p (const_tree ref)
   return (lvalue_kind (ref) == clk_rvalueref);
 }
 
+/* C++-specific version of stabilize_reference.  */
+
+tree
+cp_stabilize_reference (tree ref)
+{
+  switch (TREE_CODE (ref))
+    {
+    /* We need to treat specially anything stabilize_reference doesn't
+       handle specifically.  */
+    case VAR_DECL:
+    case PARM_DECL:
+    case RESULT_DECL:
+    CASE_CONVERT:
+    case FLOAT_EXPR:
+    case FIX_TRUNC_EXPR:
+    case INDIRECT_REF:
+    case COMPONENT_REF:
+    case BIT_FIELD_REF:
+    case ARRAY_REF:
+    case ARRAY_RANGE_REF:
+    case COMPOUND_EXPR:
+    case ERROR_MARK:
+      break;
+    default:
+      cp_lvalue_kind kind = lvalue_kind (ref);
+      if ((kind & ~clk_class) != clk_none)
+	{
+	  tree type = unlowered_expr_type (ref);
+	  bool rval = !!(kind & clk_rvalueref);
+	  type = cp_build_reference_type (type, rval);
+	  /* This inhibits warnings in, eg, cxx_mark_addressable
+	     (c++/60955).  */
+	  warning_sentinel s (extra_warnings);
+	  ref = build_static_cast (type, ref, tf_error);
+	}
+    }
+
+  return stabilize_reference (ref);
+}
+
 /* Test whether DECL is a builtin that may appear in a
    constant-expression. */
 
diff --git gcc/cp/typeck.c gcc/cp/typeck.c
index cef5604..7e12009 100644
--- gcc/cp/typeck.c
+++ gcc/cp/typeck.c
@@ -5912,7 +5912,7 @@ cp_build_unary_op (enum tree_code code, tree xarg, int noconvert,
 	{
 	  tree real, imag;
 
-	  arg = stabilize_reference (arg);
+	  arg = cp_stabilize_reference (arg);
 	  real = cp_build_unary_op (REALPART_EXPR, arg, 1, complain);
 	  imag = cp_build_unary_op (IMAGPART_EXPR, arg, 1, complain);
 	  real = cp_build_unary_op (code, real, 1, complain);
@@ -6112,7 +6112,7 @@ unary_complex_lvalue (enum tree_code code, tree arg)
       tree lvalue = TREE_OPERAND (arg, 0);
       if (TREE_SIDE_EFFECTS (lvalue))
 	{
-	  lvalue = stabilize_reference (lvalue);
+	  lvalue = cp_stabilize_reference (lvalue);
 	  arg = build2 (TREE_CODE (arg), TREE_TYPE (arg),
 			lvalue, TREE_OPERAND (arg, 1));
 	}
@@ -7496,7 +7496,7 @@ cp_build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs,
     case PREINCREMENT_EXPR:
       if (TREE_SIDE_EFFECTS (TREE_OPERAND (lhs, 0)))
 	lhs = build2 (TREE_CODE (lhs), TREE_TYPE (lhs),
-		      stabilize_reference (TREE_OPERAND (lhs, 0)),
+		      cp_stabilize_reference (TREE_OPERAND (lhs, 0)),
 		      TREE_OPERAND (lhs, 1));
       newrhs = cp_build_modify_expr (TREE_OPERAND (lhs, 0),
 				     modifycode, rhs, complain);
@@ -7516,7 +7516,7 @@ cp_build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs,
     case MODIFY_EXPR:
       if (TREE_SIDE_EFFECTS (TREE_OPERAND (lhs, 0)))
 	lhs = build2 (TREE_CODE (lhs), TREE_TYPE (lhs),
-		      stabilize_reference (TREE_OPERAND (lhs, 0)),
+		      cp_stabilize_reference (TREE_OPERAND (lhs, 0)),
 		      TREE_OPERAND (lhs, 1));
       newrhs = cp_build_modify_expr (TREE_OPERAND (lhs, 0), modifycode, rhs,
 				     complain);
@@ -7665,7 +7665,7 @@ cp_build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs,
 	     not intervene between the lvalue-to-rvalue conversion and the
 	     side effect associated with any single compound assignment
 	     operator. -- end note ]  */
-	  lhs = stabilize_reference (lhs);
+	  lhs = cp_stabilize_reference (lhs);
 	  rhs = rvalue (rhs);
 	  rhs = stabilize_expr (rhs, &init);
 	  newrhs = cp_build_binary_op (input_location,
diff --git gcc/testsuite/g++.dg/ext/cond2.C gcc/testsuite/g++.dg/ext/cond2.C
index e69de29..d9f1d59 100644
--- gcc/testsuite/g++.dg/ext/cond2.C
+++ gcc/testsuite/g++.dg/ext/cond2.C
@@ -0,0 +1,28 @@
+// PR c++/70744
+// { dg-do run }
+// { dg-options "" }
+
+static void
+fn1 (void)
+{
+  int x = 2;
+  ++x ? : 42;
+  if (x != 3)
+    __builtin_abort ();
+  --x ? : 42;
+  if (x != 2)
+    __builtin_abort ();
+  x++ ? : 42;
+  if (x != 3)
+    __builtin_abort ();
+  x-- ? : 42;
+  if (x != 2)
+    __builtin_abort ();
+}
+
+int
+main ()
+{
+  fn1 ();
+  return 0;
+}

From-SVN: r235438
2016-04-26 11:32:26 +00:00
Bin Cheng
520435ec6e tree-if-conv.c (any_pred_load_store): New static variable.
* tree-if-conv.c (any_pred_load_store): New static variable.
	(if_convertible_gimple_assign_stmt_p): Remove parameter.  Use
	any_pred_load_store instead of and_mask_load_store.
	(if_convertible_stmt_p, if_convertible_loop_p_1): Ditto.
	(if_convertible_loop_p, insert_gimplified_predicates): Ditto.
	(combine_blocks, tree_if_conversion): Ditto.

From-SVN: r235437
2016-04-26 11:16:07 +00:00
Bin Cheng
00f615afef re PR tree-optimization/70771 (ICE on valid code at -O3 on x86_64-linux-gnu in operator[], at vec.h:714)
PR tree-optimization/70771
	PR tree-optimization/70775
	* tree-if-conv.c (if_convertible_phi_p): Remove check on special
	virtual PHI nodes.  Delete parameter.
	(if_convertible_loop_p_1): Delete argument to above function.
	(predicate_all_scalar_phis): Delete code handling single-argument
	PHIs.
	(tree_if_conversion): Mark and update virtual SSA.

	gcc/testsuite/ChangeLog
	PR tree-optimization/70771
	PR tree-optimization/70775
	* gcc.dg/pr70771.c: New test.
	* gcc.dg/pr70771.c: New test.

From-SVN: r235436
2016-04-26 11:10:47 +00:00
Rainer Orth
901f29c8c9 Support .largecomm with Solaris as (PR target/61821)
PR target/61821
	* config/i386/i386.c (LARGECOMM_SECTION_ASM_OP): Define default.
	(x86_elf_aligned_common): Rename to ...
	(x86_elf_aligned_decl_common): ... this.
	Add decl arg.  Switch to .lbss for largecomm object.  Use
	LARGECOMM_SECTION_ASM_OP.
	* config/i386/i386-protos.h (x86_elf_aligned_common): Reflect
	renaming.
	* config/i386/x86-64.h (ASM_OUTPUT_ALIGNED_COMMON): Rename to ...
	(ASM_OUTPUT_ALIGNED_DECL_COMMON): ... this.
	Pass new decl arg.
	* config/i386/sol2.h (ASM_OUTPUT_ALIGNED_COMMON): Likewise.
	[!USE_GAS] (LARGECOMM_SECTION_ASM_OP): Define.

From-SVN: r235435
2016-04-26 10:10:33 +00:00
Rainer Orth
b2eb4ed5aa Support .lbss etc. sections with Solaris as (PR target/59407)
PR target/59407
	* config/i386/i386.c (SECTION_LARGE): Define.
	(x86_64_elf_select_section): Set it for large data/bss sections.
	Only clear SECTION_WRITE for .lrodata.
	(x86_64_elf_section_type_flags): Set SECTION_LARGE for large
	data/bss sections.
	* config/i386/sol2.h (MACH_DEP_SECTION_ASM_FLAG): Define.
	* varasm.c (default_elf_asm_named_section): Grow flagchars.
	[MACH_DEP_SECTION_ASM_FLAG] Emit MACH_DEP_SECTION_ASM_FLAG for
	SECTION_MACH_DEP.
	* doc/tm.texi.in (Sections, MACH_DEP_SECTION_ASM_FLAG): Describe.
	* doc/tm.texi: Regenerate.

From-SVN: r235434
2016-04-26 10:06:16 +00:00
Rainer Orth
ec1a9e7dab Compile libcilkrts with -funwind-tables (PR target/60290)
PR target/60290
	* Makefile.am (GENERAL_FLAGS): Add -funwind-tables.
	* Makefile.in: Regenerate.

From-SVN: r235432
2016-04-26 08:55:02 +00:00
Bernd Schmidt
218155e7af * gcc.target/i386/lzcnt-1.c: Allow a different lzcntw output register.
From-SVN: r235431
2016-04-26 08:48:14 +00:00
Jakub Jelinek
7db11a5a32 re PR bootstrap/70704 (AIX bootstrap comparison failure)
PR bootstrap/70704
	* configure.ac (--enable-stage1-checking): For --disable-checking or
	implicit --enable-checking, make sure extra flag matches in between
	stage1 and later checking.
	* configure: Regenerated.
gcc/
	* configure.ac (--enable-checking): Document extra flag, for
	non-release builds default to --enable-checking=yes,extra.
	If misc checking and extra checking, define CHECKING_P to 2 instead
	of 1.
	* common.opt (fchecking=): Add.
	* doc/invoke.texi (-fchecking=): Document.
	* doc/install.texi: Document --enable-checking changes.
	* configure: Regenerated.
	* config.in: Regenerated.
gcc/cp/
	* pt.c (build_non_dependent_expr): Use flag_checking > 1 instead of
	just flag_checking.

From-SVN: r235430
2016-04-26 08:10:43 +02:00
GCC Administrator
513d5d7f55 Daily bump.
From-SVN: r235428
2016-04-26 00:16:23 +00:00
Uros Bizjak
f729943b89 i386.md (*movxi_internal_avx512f): Use insn type attribute instead of which_alternative.
* config/i386/i386.md (*movxi_internal_avx512f): Use insn type
	attribute instead of which_alternative.
	* config/i386/sse.md (*mov<mode>_internal): Ditto.
	Use EXT_REX_SSE_REG_P where appropriate.

From-SVN: r235422
2016-04-25 23:57:42 +02:00
Joseph Myers
d01617cab8 * sv.po: Update.
From-SVN: r235419
2016-04-25 21:41:18 +01:00
Uros Bizjak
eebe7d1c7f predicates.md (const0_operand): Do not match const_wide_int code.
* config/i386/predicates.md (const0_operand): Do not match
	const_wide_int code.
	(const1_operand): Ditto.

From-SVN: r235417
2016-04-25 21:20:45 +02:00
Uros Bizjak
a7d56fb840 i386.md (*movoi_internal_avx): Set mode attribute to XI for SSE constm1 operands and TARGET_AVX512VL.
* config/i386/i386.md (*movoi_internal_avx): Set mode attribute to XI
	for SSE constm1 operands and TARGET_AVX512VL.
	(*movti_internal): Ditto.
	(*mov<mode>_or): Use constm1_operand predicate.
	* config/i386/sse.md (*mov<mode>_internal): Set mode attribute to XI
	for SSE vector_all_ones operands and TARGET_AVX512VL.
	* config/i386/predicates.md (constm1_operand): New predicate.
	* config/i386/i386.c (standard_sse_constant_opcode): Simplify
	emission of constant -1 load.

From-SVN: r235416
2016-04-25 21:15:26 +02:00
Jason Merrill
e6e860a2c9 * gdbinit.in: Skip is-a.h.
From-SVN: r235415
2016-04-25 13:44:15 -04:00
Jason Merrill
d067e05f0e Implement C++17 [[maybe_unused]] attribute.
gcc/
	* attribs.c (register_scoped_attributes): Fix logic.
	* attribs.h: Declare register_scoped_attributes.
c-family/
	* c-common.c (handle_unused_attribute): Accept CONST_DECL.
	No longer static.
	* c-common.h: Declare it.
	* c-lex.c (c_common_has_attribute): Add maybe_unused.
cp/
	* tree.c (std_attribute_table): New.
	(init_tree): Register it.

From-SVN: r235414
2016-04-25 13:21:49 -04:00
William Schmidt
4dfaa96319 Correct ChangeLog entry
From-SVN: r235413
2016-04-25 16:18:00 +00:00
Bill Schmidt
7bb66bac95 rs6000-builtin.def: Correct pasto error for stxvd2x and stxvw4x built-in functions.
2016-04-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* rs6000-builtin.def: Correct pasto error for stxvd2x and stxvw4x
	built-in functions.

From-SVN: r235412
2016-04-25 16:17:26 +00:00
H.J. Lu
3dd7e09253 Revert the last change in libatomic
Need to properly check if -march=i486 is really needed for -m32 build
of libatomic on Linux/x86 and Linux/x86-64.

	PR target/70454
	* configure.tgt (XCFLAGS): Revert the last change.

From-SVN: r235411
2016-04-25 05:41:43 -07:00
DJ Delorie
9c8a71e668 msp430.md (ashlhi3): Optimize one bit shifts.
* config/msp430/msp430.md (ashlhi3): Optimize one bit shifts.
	(ashrhi3): Likewise.
	(lshrhi3): Likewise.

From-SVN: r235410
2016-04-25 11:59:44 +00:00
Nick Clifton
2de1cf8c4b cmpd.c (__mspabi_cmpf): Add prototype.
* config/msp430/cmpd.c (__mspabi_cmpf): Add prototype.
	(__mspabi_cmpd): Likewise.
	* config/msp430/floathidf.c (__floathidf): Likewise.
	* config/msp430/floathisf.c (__floathisf): Likewise
	* config/msp430/floatunhidf.c (__floatunssidf): Likewise.
	* config/msp430/floatunhisf.c (__floatunshisf): Likewise.
	* config/msp430/lib2shift.c (__ashlsi3): Take a signed char as the
	second parameter.
	(__ashrsi3): Likewise.

From-SVN: r235409
2016-04-25 11:13:35 +00:00
Richard Biener
ab99f46749 re PR tree-optimization/70780 (wrong code at -O2 and -O3 on x86_64-linux-gnu)
2016-04-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70780
	* tree-ssa-pre.c (compute_antic_aux): Also return true if the block
	wasn't visited yet.
	(compute_antic): Mark blocks with abnormal preds as visited as
	they have a final empty antic-in solution already.

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

From-SVN: r235407
2016-04-25 10:49:55 +00:00
Michael Collison
e52477c7e2 ChangeLog (2016-04-25): Fix ChangeLog formatting.
2016-04-25  Michael Collison  <michael.collison@linaro.org>
	* ChangeLog(2016-04-25): Fix ChangeLog formatting.

From-SVN: r235403
2016-04-25 05:57:07 +00:00
Michael Collison
93c590ee1a neon.md (widen_<us>sum<mode>): New patterns where mode is VQI to improve mixed mode vectorization.
2016-04-25  Michael Collison  <michael.collison@linaro.org>

    * config/arm/neon.md (widen_<us>sum<mode>): New patterns where
    mode is VQI to improve mixed mode vectorization.
    * config/arm/neon.md (vec_sel_widen_ssum_lo<VQI:mode><VW:mode>3): New
    define_insn to match low half of signed vaddw.
    * config/arm/neon.md (vec_sel_widen_ssum_hi<VQI:mode><VW:mode>3): New
    define_insn to match high half of signed vaddw.
    * config/arm/neon.md (vec_sel_widen_usum_lo<VQI:mode><VW:mode>3): New
    define_insn to match low half of unsigned vaddw.
    * config/arm/neon.md (vec_sel_widen_usum_hi<VQI:mode><VW:mode>3): New
    define_insn to match high half of unsigned vaddw.
    * config/arm/arm.c (arm_simd_vect_par_cnst_half): New function.
    (arm_simd_check_vect_par_cnst_half_p): Likewise.
    * config/arm/arm-protos.h (arm_simd_vect_par_cnst_half): Prototype
    for new function.
    (arm_simd_check_vect_par_cnst_half_p): Likewise.
    * config/arm/predicates.md (vect_par_constant_high): Support
    big endian and simplify by calling
    arm_simd_check_vect_par_cnst_half
    (vect_par_constant_low): Likewise.
    * testsuite/gcc.target/arm/neon-vaddws16.c: New test.
    * testsuite/gcc.target/arm/neon-vaddws32.c: New test.
    * testsuite/gcc.target/arm/neon-vaddwu16.c: New test.
    * testsuite/gcc.target/arm/neon-vaddwu32.c: New test.
    * testsuite/gcc.target/arm/neon-vaddwu8.c: New test.
    * testsuite/lib/target-supports.exp
      (check_effective_target_vect_widen_sum_hi_to_si_pattern): Indicate
      that arm neon support vector widen sum of HImode TO SImode.

From-SVN: r235402
2016-04-25 05:03:09 +00:00
GCC Administrator
151a16073f Daily bump.
From-SVN: r235401
2016-04-25 00:16:25 +00:00
Uros Bizjak
9bb069e586 i386.md (*lea<mode>_general_4): Use const_0_to_3_operand predicate for operand 2.
* config/i386/i386.md (*lea<mode>_general_4): Use const_0_to_3_operand
	predicate for operand 2.

From-SVN: r235397
2016-04-25 00:03:15 +02:00
Uros Bizjak
55284a77e6 i386-protos.h (standard_sse_constant_p): Add machine_mode argument.
* config/i386/i386-protos.h (standard_sse_constant_p): Add
	machine_mode argument.
	* config/i386/i386.c (standard_sse_constant_p): Return 2 for
	constm1_rtx operands.  For VOIDmode constants, get mode from
	pred_mode.  Check mode size if the mode is supported by ABI.
	(standard_sse_constant_opcode): Do not use standard_constant_p.
	Strictly check ABI support for all-ones operands.
	(ix86_legitimate_constant_p): Handle TImode, OImode and XImode
	immediates. Update calls to standard_sse_constant_p.
	(ix86_expand_vector_move): Update calls to standard_sse_constant_p.
	(ix86_rtx_costs): Ditto.
	* config/i386/i386.md (*movxi_internal_avx512f): Use
	nonimmediate_or_sse_const_operand instead of vector_move_operand.
	Use (v,BC) alternative instead of (v,C). Use register_operand
	checks instead of MEM_P.
	(*movoi_internal_avx): Use nonimmediate_or_sse_const_operand instead
	of vector_move_operand.  Add (v,BC) alternative and corresponding avx2
	isa attribute.  Use register_operand checks instead of MEM_P.
	(*movti_internal): Use nonimmediate_or_sse_const_operand for
	TARGET_SSE.  Improve TARGET_SSE insn constraint.  Add (v,BC)
	alternative and corresponding sse2 isa attribute.
	(*movtf_internal, *movdf_internal, *movsf_interal): Update calls
	to standard_sse_constant_p.
	(FP constant splitters): Ditto.
	* config/i386/constraints.md (BC): Do not use standard_sse_constant_p.
	(C): Ditto.
	* config/i386/predicates.md (constm1_operand): Remove.
	(nonimmediate_or_sse_const_operand): Rewrite using RTX.
	* config/i386/sse.md (*<avx512>_cvtmask2<ssemodesuffix><mode>): Use
	vector_all_ones_operand instead of constm1_operand.


Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com>

From-SVN: r235396
2016-04-24 22:58:02 +02:00
Jonathan Wakely
a635cdb2cc libstdc++/70762 fix fallback implementation of nonexistent_path
PR libstdc++/70762
	* testsuite/util/testsuite_fs.h (__gnu_test::nonexistent_path): Use
	static counter to return a different path on every call.

From-SVN: r235395
2016-04-24 19:06:54 +01:00
Trevor Saunders
e4dbabfe54 make avail_stores a vec<rtx_insn *>
gcc/ChangeLog:

2016-04-24  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* print-rtl.c (print_rtx_insn_vec): New function.
	* print-rtl.h: New prototype.
	* store-motion.c (struct st_expr): Make avail_stores a vector.
	(st_expr_entry): Adjust.
	(free_st_expr_entry): Likewise.
	(print_store_motion_mems): Likewise.
	(find_moveable_store): Likewise.
	(compute_store_table): Likewise.
	(delete_store): Likewise.
	(build_store_vectors): Likewise.

From-SVN: r235394
2016-04-24 08:45:38 +00:00
Trevor Saunders
5d911cafe9 stop using rtx_insn_list in reorg.c
gcc/ChangeLog:

2016-04-24  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* reorg.c (try_merge_delay_insns): Make merged_insns a vector.

From-SVN: r235393
2016-04-24 08:45:13 +00:00
Trevor Saunders
12e109d14b add some utility methods to vec
gcc/ChangeLog:

2016-04-24  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* vec.h (vec_safe_contains): New function.
	(vec::contains): Likewise.
	(vec::begin): Likewise.
	(vec::end): Likewise.

From-SVN: r235392
2016-04-24 07:47:38 +00:00
GCC Administrator
dc3d45f24d Daily bump.
From-SVN: r235390
2016-04-24 00:16:23 +00:00
Jakub Jelinek
d6c1a7a7c7 re PR sanitizer/70712 (False positive from AddressSanitizer with use of 'alignas')
PR sanitizer/70712
	* cfgexpand.c (expand_stack_vars): Fix typo.

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

From-SVN: r235384
2016-04-23 07:28:16 +02:00
Ian Lance Taylor
0e94da57dc compiler: Expose runtime code through Func_expression.
Enables us to easily check if a Call_expression is a call to a runtime
    function and, if so, which runtime function is corresponds to.
    This will be used during escape analysis.
    
    Reviewed-on: https://go-review.googlesource.com/18544

From-SVN: r235383
2016-04-23 04:58:00 +00:00
Tim Shen
216f7526fe re PR libstdc++/70745 (Wrong handling of regex_constant::match_not_eow and regex_constant::match_not_bow)
PR libstdc++/70745
	* include/bits/regex_executor.tcc (_Executor<>::_M_word_boundary):
	Fix the match_not_bow and match_not_eow behavior.
	* testsuite/28_regex/regression.cc: Add testcase.

From-SVN: r235382
2016-04-23 03:58:37 +00:00
Trevor Saunders
ab0fc037f0 add basic .gitattributes files to notice whitespace issues
gcc/testsuite/ChangeLog:

2016-04-22  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* .gitattributes: New file.

/ChangeLog:

2016-04-22  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* .gitattributes: New file.

From-SVN: r235381
2016-04-23 02:37:43 +00:00
Ian Lance Taylor
a38f74e823 cmd/go: bring in final version of gccgo pkg-config support
This updates gccgo to the final version of https://golang.org/cl/18790,
    by Michael Hudson-Doyle.
    
    Update golang/go#11739.
    
    Reviewed-on: https://go-review.googlesource.com/22400

From-SVN: r235380
2016-04-23 00:41:03 +00:00
GCC Administrator
cd32366081 Daily bump.
From-SVN: r235379
2016-04-23 00:16:21 +00:00
Segher Boessenkool
c048fa95cd Add myself as maintainer for the PowerPC port
* MAINTAINERS (rs6000/powerpc port): Add myself.

From-SVN: r235373
2016-04-22 23:18:49 +02:00
Christophe Lyon
2aa64824cc [testsuite] gcc-dg: handle all return values when shouldfail is set
2016-04-22  Christophe Lyon  <christophe.lyon@linaro.org>

	* lib/gcc-dg.exp (${tool}_load): Add default return value handler.

From-SVN: r235372
2016-04-22 21:28:58 +02:00
Jason Merrill
9aa36ae522 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
From-SVN: r235371
2016-04-22 12:16:27 -04:00
Jason Merrill
76f9244ed0 * parser.c (cp_parser_perform_range_for_lookup): Decay the array.
From-SVN: r235370
2016-04-22 12:16:21 -04:00
Dominique d'Humieres
e7e12d92e3 submodule_14.f08: Add cleanup-submodules.
2016-04-22  Dominique d'Humieres  <dominiq@lps.ens.fr>

	* gfortran.dg/submodule_14.f08: Add cleanup-submodules.
	* gfortran.dg/submodule_15.f08: Likewise.

From-SVN: r235367
2016-04-22 15:48:28 +02:00