diff options
author | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2014-04-22 18:22:19 +0000 |
---|---|---|
committer | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2014-04-22 18:22:19 +0000 |
commit | a50cb0eaa2dfdf9f46300f5dfaabeed208885eb3 (patch) | |
tree | d029c9e79afb9a948d3cd33f5388d2ac2ad7978d /debian/patches/svn-updates.diff | |
parent | 6de9ab3646769cbbb3c89e0cd8c741f6bb084ceb (diff) | |
download | gcc-49-a50cb0eaa2dfdf9f46300f5dfaabeed208885eb3.tar.gz |
* GCC 4.9.0 release.
git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.9@7288 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
Diffstat (limited to 'debian/patches/svn-updates.diff')
-rw-r--r-- | debian/patches/svn-updates.diff | 1684 |
1 files changed, 1680 insertions, 4 deletions
diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff index bcfc9a8..888290d 100644 --- a/debian/patches/svn-updates.diff +++ b/debian/patches/svn-updates.diff @@ -1,14 +1,1690 @@ -# DP: updates from the 4.9 branch upto 20140x0x (r206241). +# DP: updates from the 4.9 branch upto 20140422 (r209654). last_updated() { cat > ${dir}LAST_UPDATED <<EOF -Mon Dec 30 05:37:11 CET 2013 -Mon Dec 30 04:37:11 UTC 2013 (revision 206241) +Tue Apr 22 19:16:30 CEST 2014 +Tue Apr 22 17:16:30 UTC 2014 (revision 209654) EOF } -LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_4_8_2_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch \ +LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_4_9_0_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch \ | sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \ | awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0' +Index: gcc/c-family/ChangeLog +=================================================================== +--- a/src/gcc/c-family/ChangeLog (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/c-family/ChangeLog (.../branches/gcc-4_9-branch) +@@ -1,3 +1,13 @@ ++2014-04-22 Richard Biener <rguenther@suse.de> ++ ++ Backport from mainline ++ 2014-04-14 Richard Biener <rguenther@suse.de> ++ Marc Glisse <marc.glisse@inria.fr> ++ ++ PR c/60819 ++ * c-common.c (convert_vector_to_pointer_for_subscript): Properly ++ apply may-alias the scalar pointer type when applicable. ++ + 2014-04-22 Release Manager + + * GCC 4.9.0 released. +Index: gcc/c-family/c-common.c +=================================================================== +--- a/src/gcc/c-family/c-common.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/c-family/c-common.c (.../branches/gcc-4_9-branch) +@@ -11770,8 +11770,21 @@ + + c_common_mark_addressable_vec (*vecp); + type = build_qualified_type (TREE_TYPE (type), TYPE_QUALS (type)); +- type = build_pointer_type (type); + type1 = build_pointer_type (TREE_TYPE (*vecp)); ++ bool ref_all = TYPE_REF_CAN_ALIAS_ALL (type1); ++ if (!ref_all ++ && !DECL_P (*vecp)) ++ { ++ /* If the original vector isn't declared may_alias and it ++ isn't a bare vector look if the subscripting would ++ alias the vector we subscript, and if not, force ref-all. */ ++ alias_set_type vecset = get_alias_set (*vecp); ++ alias_set_type sset = get_alias_set (type); ++ if (!alias_sets_must_conflict_p (sset, vecset) ++ && !alias_set_subset_of (sset, vecset)) ++ ref_all = true; ++ } ++ type = build_pointer_type_for_mode (type, ptr_mode, ref_all); + *vecp = build1 (ADDR_EXPR, type1, *vecp); + *vecp = convert (type, *vecp); + } +Index: gcc/c/ChangeLog +=================================================================== +--- a/src/gcc/c/ChangeLog (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/c/ChangeLog (.../branches/gcc-4_9-branch) +@@ -1,3 +1,9 @@ ++2014-04-22 Jakub Jelinek <jakub@redhat.com> ++ ++ PR c/59073 ++ * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for ++ fails, don't set OM_PARALLEL_COMBINED and return NULL. ++ + 2014-04-22 Release Manager + + * GCC 4.9.0 released. +Index: gcc/c/c-parser.c +=================================================================== +--- a/src/gcc/c/c-parser.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/c/c-parser.c (.../branches/gcc-4_9-branch) +@@ -12208,10 +12208,12 @@ + if (!flag_openmp) /* flag_openmp_simd */ + return c_parser_omp_for (loc, parser, p_name, mask, cclauses); + block = c_begin_omp_parallel (); +- c_parser_omp_for (loc, parser, p_name, mask, cclauses); ++ tree ret = c_parser_omp_for (loc, parser, p_name, mask, cclauses); + stmt + = c_finish_omp_parallel (loc, cclauses[C_OMP_CLAUSE_SPLIT_PARALLEL], + block); ++ if (ret == NULL_TREE) ++ return ret; + OMP_PARALLEL_COMBINED (stmt) = 1; + return stmt; + } +Index: gcc/fold-const.c +=================================================================== +--- a/src/gcc/fold-const.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/fold-const.c (.../branches/gcc-4_9-branch) +@@ -484,8 +484,6 @@ + + case TRUNC_DIV_EXPR: + case ROUND_DIV_EXPR: +- case FLOOR_DIV_EXPR: +- case CEIL_DIV_EXPR: + case EXACT_DIV_EXPR: + /* In general we can't negate A / B, because if A is INT_MIN and + B is 1, we may turn this into INT_MIN / -1 which is undefined +@@ -682,8 +680,6 @@ + + case TRUNC_DIV_EXPR: + case ROUND_DIV_EXPR: +- case FLOOR_DIV_EXPR: +- case CEIL_DIV_EXPR: + case EXACT_DIV_EXPR: + /* In general we can't negate A / B, because if A is INT_MIN and + B is 1, we may turn this into INT_MIN / -1 which is undefined +Index: gcc/omp-low.c +=================================================================== +--- a/src/gcc/omp-low.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/omp-low.c (.../branches/gcc-4_9-branch) +@@ -11291,45 +11291,53 @@ + ipa_simd_modify_stmt_ops (tree *tp, int *walk_subtrees, void *data) + { + struct walk_stmt_info *wi = (struct walk_stmt_info *) data; +- if (!SSA_VAR_P (*tp)) ++ struct modify_stmt_info *info = (struct modify_stmt_info *) wi->info; ++ tree *orig_tp = tp; ++ if (TREE_CODE (*tp) == ADDR_EXPR) ++ tp = &TREE_OPERAND (*tp, 0); ++ struct ipa_parm_adjustment *cand = NULL; ++ if (TREE_CODE (*tp) == PARM_DECL) ++ cand = ipa_get_adjustment_candidate (&tp, NULL, info->adjustments, true); ++ else + { +- /* Make sure we treat subtrees as a RHS. This makes sure that +- when examining the `*foo' in *foo=x, the `foo' get treated as +- a use properly. */ +- wi->is_lhs = false; +- wi->val_only = true; + if (TYPE_P (*tp)) + *walk_subtrees = 0; +- return NULL_TREE; + } +- struct modify_stmt_info *info = (struct modify_stmt_info *) wi->info; +- struct ipa_parm_adjustment *cand +- = ipa_get_adjustment_candidate (&tp, NULL, info->adjustments, true); +- if (!cand) +- return NULL_TREE; + +- tree t = *tp; +- tree repl = make_ssa_name (TREE_TYPE (t), NULL); +- +- gimple stmt; +- gimple_stmt_iterator gsi = gsi_for_stmt (info->stmt); +- if (wi->is_lhs) ++ tree repl = NULL_TREE; ++ if (cand) ++ repl = unshare_expr (cand->new_decl); ++ else + { +- stmt = gimple_build_assign (unshare_expr (cand->new_decl), repl); +- gsi_insert_after (&gsi, stmt, GSI_SAME_STMT); +- SSA_NAME_DEF_STMT (repl) = info->stmt; ++ if (tp != orig_tp) ++ { ++ *walk_subtrees = 0; ++ bool modified = info->modified; ++ info->modified = false; ++ walk_tree (tp, ipa_simd_modify_stmt_ops, wi, wi->pset); ++ if (!info->modified) ++ { ++ info->modified = modified; ++ return NULL_TREE; ++ } ++ info->modified = modified; ++ repl = *tp; ++ } ++ else ++ return NULL_TREE; + } +- else ++ ++ if (tp != orig_tp) + { +- /* You'd think we could skip the extra SSA variable when +- wi->val_only=true, but we may have `*var' which will get +- replaced into `*var_array[iter]' and will likely be something +- not gimple. */ +- stmt = gimple_build_assign (repl, unshare_expr (cand->new_decl)); ++ repl = build_fold_addr_expr (repl); ++ gimple stmt ++ = gimple_build_assign (make_ssa_name (TREE_TYPE (repl), NULL), repl); ++ repl = gimple_assign_lhs (stmt); ++ gimple_stmt_iterator gsi = gsi_for_stmt (info->stmt); + gsi_insert_before (&gsi, stmt, GSI_SAME_STMT); ++ *orig_tp = repl; + } +- +- if (!useless_type_conversion_p (TREE_TYPE (*tp), TREE_TYPE (repl))) ++ else if (!useless_type_conversion_p (TREE_TYPE (*tp), TREE_TYPE (repl))) + { + tree vce = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (*tp), repl); + *tp = vce; +@@ -11338,8 +11346,6 @@ + *tp = repl; + + info->modified = true; +- wi->is_lhs = false; +- wi->val_only = true; + return NULL_TREE; + } + +@@ -11358,7 +11364,7 @@ + tree retval_array, tree iter) + { + basic_block bb; +- unsigned int i, j; ++ unsigned int i, j, l; + + /* Re-use the adjustments array, but this time use it to replace + every function argument use to an offset into the corresponding +@@ -11381,6 +11387,46 @@ + j += node->simdclone->simdlen / TYPE_VECTOR_SUBPARTS (vectype) - 1; + } + ++ l = adjustments.length (); ++ for (i = 1; i < num_ssa_names; i++) ++ { ++ tree name = ssa_name (i); ++ if (name ++ && SSA_NAME_VAR (name) ++ && TREE_CODE (SSA_NAME_VAR (name)) == PARM_DECL) ++ { ++ for (j = 0; j < l; j++) ++ if (SSA_NAME_VAR (name) == adjustments[j].base ++ && adjustments[j].new_decl) ++ { ++ tree base_var; ++ if (adjustments[j].new_ssa_base == NULL_TREE) ++ { ++ base_var ++ = copy_var_decl (adjustments[j].base, ++ DECL_NAME (adjustments[j].base), ++ TREE_TYPE (adjustments[j].base)); ++ adjustments[j].new_ssa_base = base_var; ++ } ++ else ++ base_var = adjustments[j].new_ssa_base; ++ if (SSA_NAME_IS_DEFAULT_DEF (name)) ++ { ++ bb = single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun)); ++ gimple_stmt_iterator gsi = gsi_after_labels (bb); ++ tree new_decl = unshare_expr (adjustments[j].new_decl); ++ set_ssa_default_def (cfun, adjustments[j].base, NULL_TREE); ++ SET_SSA_NAME_VAR_OR_IDENTIFIER (name, base_var); ++ SSA_NAME_IS_DEFAULT_DEF (name) = 0; ++ gimple stmt = gimple_build_assign (name, new_decl); ++ gsi_insert_before (&gsi, stmt, GSI_SAME_STMT); ++ } ++ else ++ SET_SSA_NAME_VAR_OR_IDENTIFIER (name, base_var); ++ } ++ } ++ } ++ + struct modify_stmt_info info; + info.adjustments = adjustments; + +Index: gcc/ChangeLog +=================================================================== +--- a/src/gcc/ChangeLog (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/ChangeLog (.../branches/gcc-4_9-branch) +@@ -1,3 +1,107 @@ ++2014-04-22 H.J. Lu <hongjiu.lu@intel.com> ++ ++ Backport from mainline ++ 2014-04-22 H.J. Lu <hongjiu.lu@intel.com> ++ ++ PR target/60868 ++ * config/i386/i386.c (ix86_expand_set_or_movmem): Call counter_mode ++ on count_exp to get mode. ++ ++2014-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com> ++ ++ * config/rs6000/vsx.md (vsx_xxmrghw_<mode>): Adjust for ++ little-endian. ++ (vsx_xxmrglw_<mode>): Likewise. ++ ++2014-04-22 Richard Biener <rguenther@suse.de> ++ ++ Backport from mainline ++ 2014-04-14 Richard Biener <rguenther@suse.de> ++ ++ PR middle-end/55022 ++ * fold-const.c (negate_expr_p): Don't negate directional rounding ++ division. ++ (fold_negate_expr): Likewise. ++ ++2014-04-22 Richard Biener <rguenther@suse.de> ++ ++ Backport from mainline ++ 2014-04-17 Richard Biener <rguenther@suse.de> ++ ++ PR middle-end/60849 ++ * tree-ssa-propagate.c (valid_gimple_rhs_p): Only allow effective ++ boolean results for comparisons. ++ ++2014-04-22 Richard Biener <rguenther@suse.de> ++ ++ Backport from mainline ++ 2014-04-17 Richard Biener <rguenther@suse.de> ++ ++ PR tree-optimization/60841 ++ * tree-vect-data-refs.c (vect_analyze_data_refs): Count stmts. ++ * tree-vect-loop.c (vect_analyze_loop_2): Pass down number ++ of stmts to SLP build. ++ * tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise. ++ (vect_analyze_slp): Likewise. ++ (vect_analyze_slp_instance): Likewise. ++ (vect_build_slp_tree): Limit overall SLP tree growth. ++ * tree-vectorizer.h (vect_analyze_data_refs, ++ vect_analyze_slp): Adjust prototypes. ++ ++2014-04-22 Richard Biener <rguenther@suse.de> ++ ++ Backport from mainline ++ 2014-04-17 Richard Biener <rguenther@suse.de> ++ ++ PR tree-optimization/60836 ++ * tree-vect-loop.c (vect_create_epilog_for_reduction): Force ++ initial PHI args to be gimple values. ++ ++2014-04-22 Richard Biener <rguenther@suse.de> ++ ++ Backport from mainline ++ 2014-04-14 Richard Biener <rguenther@suse.de> ++ ++ PR tree-optimization/59817 ++ PR tree-optimization/60453 ++ * graphite-scop-detection.c (graphite_can_represent_scev): Complete ++ recursion to catch all CHRECs in the scalar evolution and restrict ++ the predicate for the remains appropriately. ++ ++2014-04-22 Jakub Jelinek <jakub@redhat.com> ++ ++ PR tree-optimization/60823 ++ * omp-low.c (ipa_simd_modify_function_body): Go through ++ all SSA_NAMEs and for those refering to vector arguments ++ which are going to be replaced adjust SSA_NAME_VAR and, ++ if it is a default definition, change it into a non-default ++ definition assigned at the beginning of function from new_decl. ++ (ipa_simd_modify_stmt_ops): Rewritten. ++ * tree-dfa.c (set_ssa_default_def): When removing default def, ++ check for NULL loc instead of NULL *loc. ++ ++2014-04-22 Lin Zuojian <manjian2006@gmail.com> ++ ++ PR middle-end/60281 ++ * asan.c (asan_emit_stack_protection): Force the base to align to ++ appropriate bits if STRICT_ALIGNMENT. Set shadow_mem align to ++ appropriate bits if STRICT_ALIGNMENT. ++ * cfgexpand.c (expand_stack_vars): Set base_align appropriately ++ when asan is on. ++ (expand_used_vars): Leave a space in the stack frame for alignment ++ if STRICT_ALIGNMENT. ++ ++2014-04-22 Jakub Jelinek <jakub@redhat.com> ++ ++ Backported from mainline ++ 2014-04-16 Jakub Jelinek <jakub@redhat.com> ++ ++ PR tree-optimization/60844 ++ * tree-ssa-reassoc.c (reassoc_remove_stmt): New function. ++ (propagate_op_to_single_use, remove_visited_stmt_chain, ++ linearize_expr, repropagate_negates, reassociate_bb): Use it ++ instead of gsi_remove. ++ + 2014-04-22 Release Manager + + * GCC 4.9.0 released. +Index: gcc/testsuite/gcc.target/i386/vec-may_alias.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/vec-may_alias.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/gcc.target/i386/vec-may_alias.c (.../branches/gcc-4_9-branch) +@@ -0,0 +1,25 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -w -Wno-abi" } */ ++ ++typedef int v2si __attribute__ ((vector_size (8))); ++typedef short v4hi __attribute__ ((vector_size (8))); ++typedef short v4hia __attribute__ ((vector_size (8), may_alias)); ++ ++__attribute__ ((noinline, noclone)) ++int f (v2si A, int N) ++{ return ((v4hia)A)[N]; } ++ ++__attribute__ ((noinline, noclone)) ++int g (v2si A, int N) ++{ return ((v4hi)A)[N]; } ++ ++int main() ++{ ++ v2si x = { 0, 0 }, y = { 1, 1 }; ++ if (f (x, 0) || f (x, 1) || f (x, 2) || f (x, 3)) ++ __builtin_abort (); ++ if (g (y, 0) != 1 || g (y, 1) || g (y, 2) != 1 || g (y, 3)) ++ __builtin_abort (); ++ return 0; ++} ++ +Index: gcc/testsuite/gcc.target/i386/pr60868.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/pr60868.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/gcc.target/i386/pr60868.c (.../branches/gcc-4_9-branch) +@@ -0,0 +1,10 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O0 -minline-all-stringops -minline-stringops-dynamically -march=core2" } */ ++ ++void bar (float *); ++ ++void foo (void) ++{ ++ float b[256] = {0}; ++ bar(b); ++} +Index: gcc/testsuite/gfortran.dg/graphite/pr59817.f +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/graphite/pr59817.f (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/gfortran.dg/graphite/pr59817.f (.../branches/gcc-4_9-branch) +@@ -0,0 +1,14 @@ ++! { dg-do compile } ++! { dg-options "-O2 -floop-interchange" } ++ SUBROUTINE PREPD(ICAST,ICAS,ICASX,ICAS1,ICAS2,NDET,NM,III,IMP, ++ * CASMIN) ++ LOGICAL CASMIN ++ DIMENSION ICAST(NDET,NM),IMP(NM) ++ IF(CASMIN) THEN ++ DO K=1,NDET ++ DO L=1,NM ++ IF(L.EQ.K-1) ICAST(K,L) = 1 ++ END DO ++ END DO ++ END IF ++ END SUBROUTINE +Index: gcc/testsuite/gcc.dg/vmx/merge-vsx-be-order.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/vmx/merge-vsx-be-order.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/gcc.dg/vmx/merge-vsx-be-order.c (.../branches/gcc-4_9-branch) +@@ -21,10 +21,19 @@ + vector long long vlb = {0,1}; + vector double vda = {-2.0,-1.0}; + vector double vdb = {0.0,1.0}; ++ vector unsigned int vuia = {0,1,2,3}; ++ vector unsigned int vuib = {4,5,6,7}; ++ vector signed int vsia = {-4,-3,-2,-1}; ++ vector signed int vsib = {0,1,2,3}; ++ vector float vfa = {-4.0,-3.0,-2.0,-1.0}; ++ vector float vfb = {0.0,1.0,2.0,3.0}; + + /* Result vectors. */ + vector long long vlh, vll; + vector double vdh, vdl; ++ vector unsigned int vuih, vuil; ++ vector signed int vsih, vsil; ++ vector float vfh, vfl; + + /* Expected result vectors. */ + #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +@@ -32,11 +41,23 @@ + vector long long vlrl = {0,-2}; + vector double vdrh = {1.0,-1.0}; + vector double vdrl = {0.0,-2.0}; ++ vector unsigned int vuirh = {6,2,7,3}; ++ vector unsigned int vuirl = {4,0,5,1}; ++ vector signed int vsirh = {2,-2,3,-1}; ++ vector signed int vsirl = {0,-4,1,-3}; ++ vector float vfrh = {2.0,-2.0,3.0,-1.0}; ++ vector float vfrl = {0.0,-4.0,1.0,-3.0}; + #else + vector long long vlrh = {-2,0}; + vector long long vlrl = {-1,1}; + vector double vdrh = {-2.0,0.0}; + vector double vdrl = {-1.0,1.0}; ++ vector unsigned int vuirh = {0,4,1,5}; ++ vector unsigned int vuirl = {2,6,3,7}; ++ vector signed int vsirh = {-4,0,-3,1}; ++ vector signed int vsirl = {-2,2,-1,3}; ++ vector float vfrh = {-4.0,0.0,-3.0,1.0}; ++ vector float vfrl = {-2.0,2.0,-1.0,3.0}; + #endif + + vlh = vec_mergeh (vla, vlb); +@@ -43,9 +64,21 @@ + vll = vec_mergel (vla, vlb); + vdh = vec_mergeh (vda, vdb); + vdl = vec_mergel (vda, vdb); ++ vuih = vec_mergeh (vuia, vuib); ++ vuil = vec_mergel (vuia, vuib); ++ vsih = vec_mergeh (vsia, vsib); ++ vsil = vec_mergel (vsia, vsib); ++ vfh = vec_mergeh (vfa, vfb ); ++ vfl = vec_mergel (vfa, vfb ); + + check (vec_long_long_eq (vlh, vlrh), "vlh"); + check (vec_long_long_eq (vll, vlrl), "vll"); + check (vec_double_eq (vdh, vdrh), "vdh" ); + check (vec_double_eq (vdl, vdrl), "vdl" ); ++ check (vec_all_eq (vuih, vuirh), "vuih"); ++ check (vec_all_eq (vuil, vuirl), "vuil"); ++ check (vec_all_eq (vsih, vsirh), "vsih"); ++ check (vec_all_eq (vsil, vsirl), "vsil"); ++ check (vec_all_eq (vfh, vfrh), "vfh"); ++ check (vec_all_eq (vfl, vfrl), "vfl"); + } +Index: gcc/testsuite/gcc.dg/vmx/merge-vsx.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/vmx/merge-vsx.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/gcc.dg/vmx/merge-vsx.c (.../branches/gcc-4_9-branch) +@@ -21,10 +21,19 @@ + vector long long vlb = {0,1}; + vector double vda = {-2.0,-1.0}; + vector double vdb = {0.0,1.0}; ++ vector unsigned int vuia = {0,1,2,3}; ++ vector unsigned int vuib = {4,5,6,7}; ++ vector signed int vsia = {-4,-3,-2,-1}; ++ vector signed int vsib = {0,1,2,3}; ++ vector float vfa = {-4.0,-3.0,-2.0,-1.0}; ++ vector float vfb = {0.0,1.0,2.0,3.0}; + + /* Result vectors. */ + vector long long vlh, vll; + vector double vdh, vdl; ++ vector unsigned int vuih, vuil; ++ vector signed int vsih, vsil; ++ vector float vfh, vfl; + + /* Expected result vectors. */ + vector long long vlrh = {-2,0}; +@@ -31,14 +40,32 @@ + vector long long vlrl = {-1,1}; + vector double vdrh = {-2.0,0.0}; + vector double vdrl = {-1.0,1.0}; ++ vector unsigned int vuirh = {0,4,1,5}; ++ vector unsigned int vuirl = {2,6,3,7}; ++ vector signed int vsirh = {-4,0,-3,1}; ++ vector signed int vsirl = {-2,2,-1,3}; ++ vector float vfrh = {-4.0,0.0,-3.0,1.0}; ++ vector float vfrl = {-2.0,2.0,-1.0,3.0}; + + vlh = vec_mergeh (vla, vlb); + vll = vec_mergel (vla, vlb); + vdh = vec_mergeh (vda, vdb); + vdl = vec_mergel (vda, vdb); ++ vuih = vec_mergeh (vuia, vuib); ++ vuil = vec_mergel (vuia, vuib); ++ vsih = vec_mergeh (vsia, vsib); ++ vsil = vec_mergel (vsia, vsib); ++ vfh = vec_mergeh (vfa, vfb ); ++ vfl = vec_mergel (vfa, vfb ); + + check (vec_long_long_eq (vlh, vlrh), "vlh"); + check (vec_long_long_eq (vll, vlrl), "vll"); + check (vec_double_eq (vdh, vdrh), "vdh" ); + check (vec_double_eq (vdl, vdrl), "vdl" ); ++ check (vec_all_eq (vuih, vuirh), "vuih"); ++ check (vec_all_eq (vuil, vuirl), "vuil"); ++ check (vec_all_eq (vsih, vsirh), "vsih"); ++ check (vec_all_eq (vsil, vsirl), "vsil"); ++ check (vec_all_eq (vfh, vfrh), "vfh"); ++ check (vec_all_eq (vfl, vfrl), "vfl"); + } +Index: gcc/testsuite/gcc.dg/graphite/pr55022.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/graphite/pr55022.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/gcc.dg/graphite/pr55022.c (.../branches/gcc-4_9-branch) +@@ -0,0 +1,27 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -fgraphite-identity" } */ ++ ++extern void abort (void); ++ ++void __attribute__((noinline,noclone)) ++f(int *limit, int minLen, int maxLen) ++{ ++ int i; ++ ++ for (i = minLen; i <= maxLen; i++) { ++ limit[i] = i; ++ } ++} ++ ++int main() ++{ ++ int limit[256], i; ++ f (limit, 0, 255); ++ for (i = 0; i < 256; ++i) ++ { ++ if (limit[i] != i) ++ abort (); ++ __asm__ volatile ("" : : : "memory"); ++ } ++ return 0; ++} +Index: gcc/testsuite/gcc.dg/graphite/pr59817-2.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/graphite/pr59817-2.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/gcc.dg/graphite/pr59817-2.c (.../branches/gcc-4_9-branch) +@@ -0,0 +1,15 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -floop-interchange" } */ ++ ++void ++xl(void) ++{ ++ static int j3; ++ for (j3 = 0; j3 < 1; ++j3) { ++ static int f2; ++ static int w7; ++ short int b5; ++ int ok; ++ f2 = (b5 += ok) ? (w7 = 0): (w7 ? 0 : (f2 = ok)); ++ } ++} +Index: gcc/testsuite/gcc.dg/graphite/pr59817-1.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/graphite/pr59817-1.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/gcc.dg/graphite/pr59817-1.c (.../branches/gcc-4_9-branch) +@@ -0,0 +1,16 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -floop-interchange" } */ ++ ++int kd; ++ ++void ++n2(void) ++{ ++ static int so; ++ static short int i5; ++ int wj; ++ int *il; ++ int *nk = &so; ++ for (wj = 0; wj < 2; ++wj) ++ *nk = ((i5 += *il) || kd ); ++} +Index: gcc/testsuite/gcc.dg/pr60844.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/pr60844.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/gcc.dg/pr60844.c (.../branches/gcc-4_9-branch) +@@ -0,0 +1,16 @@ ++/* PR tree-optimization/60844 */ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -g" } */ ++/* { dg-additional-options "-mtune=atom" { target { i?86-*-* x86_64-*-* } } } */ ++ ++void ++foo (int *x, int y, int z) ++{ ++ int b, c = x[0], d = x[1]; ++ for (b = 0; b < 1; b++) ++ { ++ int e = (y ? 1 : 0) | (d ? 2 : 0) | (z ? 1 : 0); ++ e |= (c ? 2 : 0) | ((1 >> b) ? 1 : 0); ++ x[2 + b] = e; ++ } ++} +Index: gcc/testsuite/gcc.dg/vect/pr60841.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/vect/pr60841.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/gcc.dg/vect/pr60841.c (.../branches/gcc-4_9-branch) +@@ -0,0 +1,183 @@ ++/* { dg-do compile } */ ++/* { dg-additional-options "-ffast-math" } */ ++ ++/* This testcase shouldn't consume much memory or produce a 1GB vectorizer ++ dump file due to SLP tree explosion. */ ++ ++struct S { int f1, f2, f3, f4; } a; ++struct T { short f3, f2, f1, f4; }; ++int b, c, d, e, f, g; ++unsigned long z; ++ ++void ++foo (struct T *p, struct T *q, int x, int w) ++{ ++ for (; x; x++) ++ { ++ struct S h; ++ int i; ++ struct T j; ++ struct T *r; ++ h = a; ++ g = 0; ++ r = p + 2 * (c + 4) + 1; ++ j = *r; ++ r = p; ++ f = r->f1 - 1; ++ b = +1.0 + f * f; ++ i = (r->f2 + j.f2) / 2; ++ f = r->f3 - 1; ++ b += 1.0 - i * f * f; ++ f = r->f4 - 1; ++ if (b) ++ b += -1.0 - i * f; ++ if (b / w) ++ { ++ h.f1 += 8.0 * r->f1; ++ h.f2 += 8.0 * r->f2; ++ h.f3 += 8.0 * r->f3; ++ h.f4 += 8.0 * r->f4; ++ g = 1; ++ } ++ r++; ++ f = r->f1; ++ i = (r->f2 + j.f2) / 2; ++ f = r->f3 - 1; ++ b += 1.0 - i * f * f; ++ i = (r->f4); ++ if (b * 65535UL / w) ++ { ++ h.f1 += 10.0 * r->f1; ++ h.f2 += 10.0 * r->f2; ++ h.f3 += 10.0 * r->f3; ++ h.f4 += 10.0 * r->f4; ++ g += 10.0; ++ } ++ r++; ++ f = r->f1; ++ z = 5UL * i; ++ f = r->f2; ++ i = (r->f3 + j.f3) / 2; ++ b = -i * f * f; ++ i = (r->f4 + j.f4) / 2; ++ if (b * 65535UL / 25.0f) ++ { ++ h.f1 += 8.0 * r->f1; ++ h.f2 += 8.0 * r->f2; ++ h.f3 += 8.0 * r->f3; ++ h.f4 += 8.0 * r->f4; ++ g += 8.0; ++ } ++ r++; ++ f = r->f1 - j.f1; ++ b = 1 * 2.0 * i * f * f; ++ f = r->f2; ++ b += 4.0 * f; ++ i = r->f3 / 2; ++ f = r->f4 - 1; ++ if (b * 1) ++ { ++ h.f1 += 8.0 * r->f1; ++ h.f2 += 8.0 * r->f2; ++ h.f3 += 8.0 * r->f3; ++ h.f4 += 8.0 * r->f4; ++ g += 8.0; ++ } ++ b = 4.0 * 1 * f; ++ if (b * 65535UL / 25.0f) ++ { ++ h.f1 += 20.0 * r->f1; ++ h.f2 += 20.0 * r->f2; ++ h.f3 += 20.0 * r->f3; ++ h.f4 += 20.0 * r->f4; ++ g += 20.0; ++ } ++ b = 5 * (0.0 - i); ++ if (b < 0) ++ { ++ h.f1 += 8.0 * r->f1; ++ h.f2 += 8.0 * r->f2; ++ h.f3 += 8.0 * r->f3; ++ h.f4 += 8.0 * r->f4; ++ g += 8.0; ++ } ++ r = p + 2 * (c + 4); ++ i = (r->f1 + j.f1); ++ b = 1 * 2.0 * i * 1; ++ f = r->f2 - 1; ++ i = (r->f3 + j.f3) / 2; ++ b = 5 * (0.0 - i) * f * f; ++ i = (r->f4 + j.f4) / 2; ++ if (b * 65535UL / 25.0f) ++ { ++ h.f1 += 10.0 * r->f1; ++ h.f2 += 10.0 * r->f2; ++ h.f3 += 10.0 * r->f3; ++ h.f4 += 10.0 * r->f4; ++ g += 10.0; ++ } ++ r++; ++ f = r->f1; ++ b = 5UL * i * f; ++ i = (r->f2 + j.f2) / 2; ++ f = r->f3 - 1; ++ b = 5 * (0.0 - i) * f * f; ++ f = r->f4 - 1; ++ if (b * 65535UL / 25.0f) ++ { ++ h.f1 += 40.0 * r->f1; ++ h.f2 += 40.0 * r->f2; ++ h.f3 += 40.0 * r->f3; ++ h.f4 += 40.0 * r->f4; ++ g += 40.0; ++ } ++ r++; ++ i = (r->f1 + j.f1); ++ b = 5 * i * f; ++ f = r->f2; ++ b = 4.0 * f * f; ++ f = r->f3; ++ i = (r->f4 + j.f4) / 2; ++ b = 5 * (0.0 - i) * f * f; ++ if (b * 25.0f) ++ { ++ h.f1 += 8.0 * r->f1; ++ h.f2 += 8.0 * r->f2; ++ h.f3 += 8.0 * r->f3; ++ h.f4 += 8.0 * r->f4; ++ g += 8.0; ++ } ++ r = p + 4 * (c + 4); ++ i = r->f1 / 2; ++ b = 5 * (1.0 + i); ++ i = r->f2 + j.f2; ++ f = r->f3 - 1; ++ b = 5 * (0.0 - i) * f * f; ++ i = (r->f4 + j.f4) / 2; ++ if (b * 65535UL / 25.0f) ++ { ++ h.f1 += 5.0 * r->f1; ++ h.f2 += 5.0 * r->f2; ++ h.f3 += 5.0 * r->f3; ++ h.f4 += 5.0 * r->f4; ++ g += 5.0; ++ } ++ b = 5 * (1.0 + i); ++ if (b < 0) ++ { ++ h.f1 += 5.0 * r->f1; ++ h.f2 += 5.0 * r->f2; ++ h.f3 += 5.0 * r->f3; ++ h.f4 += 5.0 * r->f4; ++ g += 5.0; ++ } ++ q->f1 = (h.f1 + g / 2 - 1) / g; ++ q->f2 = (h.f2 + g / 2 - 1) / g; ++ q->f3 = (h.f3 + g / 2 - 1) / g; ++ q->f4 = (h.f4 + g / 2 - 1) / g; ++ p++; ++ q++; ++ } ++} ++ ++/* { dg-final { cleanup-tree-dump "vect" } } */ +Index: gcc/testsuite/ChangeLog +=================================================================== +--- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-4_9-branch) +@@ -1,3 +1,85 @@ ++2014-04-22 H.J. Lu <hongjiu.lu@intel.com> ++ ++ Backport from mainline ++ 2014-04-22 H.J. Lu <hongjiu.lu@intel.com> ++ ++ * gcc.target/i386/pr60868.c: New testcase. ++ ++2014-04-22 Jakub Jelinek <jakub@redhat.com> ++ ++ PR c/59073 ++ * c-c++-common/gomp/pr59073.c: New test. ++ ++2014-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com> ++ ++ * gcc.dg/vmx/merge-vsx.c: Add V4SI and V4SF tests. ++ * gcc.dg/vmx/merge-vsx-be-order.c: Likewise. ++ ++2014-04-22 Richard Biener <rguenther@suse.de> ++ ++ Backport from mainline ++ 2014-04-14 Richard Biener <rguenther@suse.de> ++ ++ PR middle-end/55022 ++ * gcc.dg/graphite/pr55022.c: New testcase. ++ ++2014-04-22 Richard Biener <rguenther@suse.de> ++ ++ Backport from mainline ++ 2014-04-17 Richard Biener <rguenther@suse.de> ++ ++ PR middle-end/60849 ++ * g++.dg/opt/pr60849.C: New testcase. ++ ++2014-04-22 Richard Biener <rguenther@suse.de> ++ ++ Backport from mainline ++ 2014-04-17 Richard Biener <rguenther@suse.de> ++ ++ PR tree-optimization/60841 ++ * gcc.dg/vect/pr60841.c: New testcase. ++ ++2014-04-22 Richard Biener <rguenther@suse.de> ++ ++ Backport from mainline ++ 2014-04-17 Richard Biener <rguenther@suse.de> ++ ++ PR tree-optimization/60836 ++ * g++.dg/vect/pr60836.cc: New testcase. ++ ++2014-04-22 Richard Biener <rguenther@suse.de> ++ ++ Backport from mainline ++ 2014-04-14 Richard Biener <rguenther@suse.de> ++ Marc Glisse <marc.glisse@inria.fr> ++ ++ PR c/60819 ++ * gcc.target/i386/vec-may_alias.c: New testcase. ++ ++2014-04-22 Richard Biener <rguenther@suse.de> ++ ++ Backport from mainline ++ 2014-04-14 Richard Biener <rguenther@suse.de> ++ ++ PR tree-optimization/59817 ++ PR tree-optimization/60453 ++ * gfortran.dg/graphite/pr59817.f: New testcase. ++ * gcc.dg/graphite/pr59817-1.c: Likewise. ++ * gcc.dg/graphite/pr59817-2.c: Likewise. ++ ++2014-04-22 Jakub Jelinek <jakub@redhat.com> ++ ++ PR tree-optimization/60823 ++ * c-c++-common/gomp/pr60823-1.c: New test. ++ * c-c++-common/gomp/pr60823-2.c: New test. ++ * c-c++-common/gomp/pr60823-3.c: New test. ++ ++ Backported from mainline ++ 2014-04-16 Jakub Jelinek <jakub@redhat.com> ++ ++ PR tree-optimization/60844 ++ * gcc.dg/pr60844.c: New test. ++ + 2014-04-22 Release Manager + + * GCC 4.9.0 released. +Index: gcc/testsuite/g++.dg/vect/pr60836.cc +=================================================================== +--- a/src/gcc/testsuite/g++.dg/vect/pr60836.cc (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/g++.dg/vect/pr60836.cc (.../branches/gcc-4_9-branch) +@@ -0,0 +1,39 @@ ++// { dg-do compile } ++ ++int a, b; ++typedef double (*NormFunc) (const int &); ++int & ++max (int &p1, int &p2) ++{ ++ if (p1 < p2) ++ return p2; ++ return p1; ++} ++ ++struct A ++{ ++ int operator () (int p1, int p2) ++ { ++ return max (p1, p2); ++ } ++}; ++template < class, class > double ++norm_ (const int &) ++{ ++ char c, d; ++ A e; ++ for (; a; a++) ++ { ++ b = e (b, d); ++ b = e (b, c); ++ } ++} ++ ++void ++norm () ++{ ++ static NormFunc f = norm_ < int, A >; ++ f = 0; ++} ++ ++// { dg-final { cleanup-tree-dump "vect" } } +Index: gcc/testsuite/g++.dg/opt/pr60849.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/opt/pr60849.C (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/g++.dg/opt/pr60849.C (.../branches/gcc-4_9-branch) +@@ -0,0 +1,13 @@ ++// { dg-do compile } ++// { dg-options "-O2" } ++ ++int g; ++ ++extern "C" int isnan (); ++ ++void foo(float a) { ++ int (*xx)(...); ++ xx = isnan; ++ if (xx(a)) ++ g++; ++} +Index: gcc/testsuite/c-c++-common/gomp/pr60823-1.c +=================================================================== +--- a/src/gcc/testsuite/c-c++-common/gomp/pr60823-1.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/c-c++-common/gomp/pr60823-1.c (.../branches/gcc-4_9-branch) +@@ -0,0 +1,19 @@ ++/* PR tree-optimization/60823 */ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -fopenmp-simd" } */ ++ ++#pragma omp declare simd simdlen(4) notinbranch ++int ++foo (const double c1, const double c2) ++{ ++ double z1 = c1, z2 = c2; ++ int res = 100, i; ++ ++ for (i = 0; i < 100; i++) ++ { ++ res = (z1 * z1 + z2 * z2 > 4.0) ? (i < res ? i : res) : res; ++ z1 = c1 + z1 * z1 - z2 * z2; ++ z2 = c2 + 2.0 * z1 * z2; ++ } ++ return res; ++} +Index: gcc/testsuite/c-c++-common/gomp/pr60823-2.c +=================================================================== +--- a/src/gcc/testsuite/c-c++-common/gomp/pr60823-2.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/c-c++-common/gomp/pr60823-2.c (.../branches/gcc-4_9-branch) +@@ -0,0 +1,43 @@ ++/* PR tree-optimization/60823 */ ++/* { dg-do run } */ ++/* { dg-options "-O2 -fopenmp-simd" } */ ++ ++#pragma omp declare simd simdlen(4) notinbranch ++__attribute__((noinline)) int ++foo (double c1, double c2) ++{ ++ double z1 = c1, z2 = c2; ++ int res = 100, i; ++ ++ for (i = 0; i < 5; i++) ++ { ++ res = (z1 * z1 + z2 * z2 > 4.0) ? (i < res ? i : res) : res; ++ z1 = c1 + z1 * z1 - z2 * z2; ++ z2 = c2 + 2.0 * z1 * z2; ++ c1 += 0.5; ++ c2 += 0.5; ++ } ++ return res; ++} ++ ++__attribute__((noinline, noclone)) void ++bar (double *x, double *y) ++{ ++ asm volatile ("" : : "rm" (x), "rm" (y) : "memory"); ++} ++ ++int ++main () ++{ ++ int i; ++ double c[4] = { 0.0, 1.0, 0.0, 1.0 }; ++ double d[4] = { 0.0, 1.0, 2.0, 0.0 }; ++ int e[4]; ++ bar (c, d); ++#pragma omp simd safelen(4) ++ for (i = 0; i < 4; i++) ++ e[i] = foo (c[i], d[i]); ++ if (e[0] != 3 || e[1] != 1 || e[2] != 1 || e[3] != 2) ++ __builtin_abort (); ++ return 0; ++} +Index: gcc/testsuite/c-c++-common/gomp/pr60823-3.c +=================================================================== +--- a/src/gcc/testsuite/c-c++-common/gomp/pr60823-3.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/c-c++-common/gomp/pr60823-3.c (.../branches/gcc-4_9-branch) +@@ -0,0 +1,32 @@ ++/* PR tree-optimization/60823 */ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -fopenmp-simd -fno-strict-aliasing" } */ ++ ++void bar (char *, double *); ++ ++#if __SIZEOF_DOUBLE__ >= 4 ++ ++struct S { char c[sizeof (double)]; }; ++void baz (struct S, struct S); ++union U { struct S s; double d; }; ++ ++#pragma omp declare simd simdlen(4) notinbranch ++__attribute__((noinline)) int ++foo (double c1, double c2) ++{ ++ double *a = &c1; ++ char *b = (char *) &c1 + 2; ++ ++ b[-2]++; ++ b[1]--; ++ *a++; ++ c2++; ++ bar ((char *) &c2 + 1, &c2); ++ c2 *= 3.0; ++ bar (b, a); ++ baz (((union U) { .d = c1 }).s, ((union U) { .d = c2 }).s); ++ baz (*(struct S *)&c1, *(struct S *)&c2); ++ return c1 + c2 + ((struct S *)&c1)->c[1]; ++} ++ ++#endif +Index: gcc/testsuite/c-c++-common/gomp/pr59073.c +=================================================================== +--- a/src/gcc/testsuite/c-c++-common/gomp/pr59073.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/testsuite/c-c++-common/gomp/pr59073.c (.../branches/gcc-4_9-branch) +@@ -0,0 +1,12 @@ ++/* PR c/59073 */ ++/* { dg-do compile } */ ++/* { dg-options "-fopenmp" } */ ++ ++void ++foo () ++{ ++ int i; ++#pragma omp distribute parallel for ++ for (i = 0; i < 10; i) /* { dg-error "invalid increment expression" } */ ++ ; ++} +Index: gcc/cp/ChangeLog +=================================================================== +--- a/src/gcc/cp/ChangeLog (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/cp/ChangeLog (.../branches/gcc-4_9-branch) +@@ -1,3 +1,9 @@ ++2014-04-22 Jakub Jelinek <jakub@redhat.com> ++ ++ PR c/59073 ++ * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for ++ fails, don't set OM_PARALLEL_COMBINED and return NULL. ++ + 2014-04-22 Release Manager + + * GCC 4.9.0 released. +Index: gcc/cp/parser.c +=================================================================== +--- a/src/gcc/cp/parser.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/cp/parser.c (.../branches/gcc-4_9-branch) +@@ -29825,10 +29825,12 @@ + return cp_parser_omp_for (parser, pragma_tok, p_name, mask, cclauses); + block = begin_omp_parallel (); + save = cp_parser_begin_omp_structured_block (parser); +- cp_parser_omp_for (parser, pragma_tok, p_name, mask, cclauses); ++ tree ret = cp_parser_omp_for (parser, pragma_tok, p_name, mask, cclauses); + cp_parser_end_omp_structured_block (parser, save); + stmt = finish_omp_parallel (cclauses[C_OMP_CLAUSE_SPLIT_PARALLEL], + block); ++ if (ret == NULL_TREE) ++ return ret; + OMP_PARALLEL_COMBINED (stmt) = 1; + return stmt; + } +Index: gcc/tree-ssa-propagate.c +=================================================================== +--- a/src/gcc/tree-ssa-propagate.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/tree-ssa-propagate.c (.../branches/gcc-4_9-branch) +@@ -571,8 +571,18 @@ + /* All constants are ok. */ + break; + ++ case tcc_comparison: ++ /* GENERIC allows comparisons with non-boolean types, reject ++ those for GIMPLE. Let vector-typed comparisons pass - rules ++ for GENERIC and GIMPLE are the same here. */ ++ if (!(INTEGRAL_TYPE_P (TREE_TYPE (expr)) ++ && (TREE_CODE (TREE_TYPE (expr)) == BOOLEAN_TYPE ++ || TYPE_PRECISION (TREE_TYPE (expr)) == 1)) ++ && TREE_CODE (TREE_TYPE (expr)) != VECTOR_TYPE) ++ return false; ++ ++ /* Fallthru. */ + case tcc_binary: +- case tcc_comparison: + if (!is_gimple_val (TREE_OPERAND (expr, 0)) + || !is_gimple_val (TREE_OPERAND (expr, 1))) + return false; +Index: gcc/asan.c +=================================================================== +--- a/src/gcc/asan.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/asan.c (.../branches/gcc-4_9-branch) +@@ -1017,8 +1017,17 @@ + base_align_bias = ((asan_frame_size + alignb - 1) + & ~(alignb - HOST_WIDE_INT_1)) - asan_frame_size; + } ++ /* Align base if target is STRICT_ALIGNMENT. */ ++ if (STRICT_ALIGNMENT) ++ base = expand_binop (Pmode, and_optab, base, ++ gen_int_mode (-((GET_MODE_ALIGNMENT (SImode) ++ << ASAN_SHADOW_SHIFT) ++ / BITS_PER_UNIT), Pmode), NULL_RTX, ++ 1, OPTAB_DIRECT); ++ + if (use_after_return_class == -1 && pbase) + emit_move_insn (pbase, base); ++ + base = expand_binop (Pmode, add_optab, base, + gen_int_mode (base_offset - base_align_bias, Pmode), + NULL_RTX, 1, OPTAB_DIRECT); +@@ -1097,6 +1106,8 @@ + && (ASAN_RED_ZONE_SIZE >> ASAN_SHADOW_SHIFT) == 4); + shadow_mem = gen_rtx_MEM (SImode, shadow_base); + set_mem_alias_set (shadow_mem, asan_shadow_set); ++ if (STRICT_ALIGNMENT) ++ set_mem_align (shadow_mem, (GET_MODE_ALIGNMENT (SImode))); + prev_offset = base_offset; + for (l = length; l; l -= 2) + { +@@ -1186,6 +1197,10 @@ + + shadow_mem = gen_rtx_MEM (BLKmode, shadow_base); + set_mem_alias_set (shadow_mem, asan_shadow_set); ++ ++ if (STRICT_ALIGNMENT) ++ set_mem_align (shadow_mem, (GET_MODE_ALIGNMENT (SImode))); ++ + prev_offset = base_offset; + last_offset = base_offset; + last_size = 0; +Index: gcc/tree-vectorizer.h +=================================================================== +--- a/src/gcc/tree-vectorizer.h (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/tree-vectorizer.h (.../branches/gcc-4_9-branch) +@@ -1057,7 +1057,8 @@ + extern bool vect_prune_runtime_alias_test_list (loop_vec_info); + extern tree vect_check_gather (gimple, loop_vec_info, tree *, tree *, + int *); +-extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *); ++extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *, ++ unsigned *); + extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree, + tree *, gimple_stmt_iterator *, + gimple *, bool, bool *); +@@ -1107,7 +1108,7 @@ + slp_instance, bool); + extern bool vect_schedule_slp (loop_vec_info, bb_vec_info); + extern void vect_update_slp_costs_according_to_vf (loop_vec_info); +-extern bool vect_analyze_slp (loop_vec_info, bb_vec_info); ++extern bool vect_analyze_slp (loop_vec_info, bb_vec_info, unsigned); + extern bool vect_make_slp_decision (loop_vec_info); + extern void vect_detect_hybrid_slp (loop_vec_info); + extern void vect_get_slp_defs (vec<tree> , slp_tree, +Index: gcc/tree-vect-loop.c +=================================================================== +--- a/src/gcc/tree-vect-loop.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/tree-vect-loop.c (.../branches/gcc-4_9-branch) +@@ -1629,6 +1629,7 @@ + int max_vf = MAX_VECTORIZATION_FACTOR; + int min_vf = 2; + unsigned int th; ++ unsigned int n_stmts = 0; + + /* Find all data references in the loop (which correspond to vdefs/vuses) + and analyze their evolution in the loop. Also adjust the minimal +@@ -1637,7 +1638,7 @@ + FORNOW: Handle only simple, array references, which + alignment can be forced, and aligned pointer-references. */ + +- ok = vect_analyze_data_refs (loop_vinfo, NULL, &min_vf); ++ ok = vect_analyze_data_refs (loop_vinfo, NULL, &min_vf, &n_stmts); + if (!ok) + { + if (dump_enabled_p ()) +@@ -1747,7 +1748,7 @@ + } + + /* Check the SLP opportunities in the loop, analyze and build SLP trees. */ +- ok = vect_analyze_slp (loop_vinfo, NULL); ++ ok = vect_analyze_slp (loop_vinfo, NULL, n_stmts); + if (ok) + { + /* Decide which possible SLP instances to SLP. */ +@@ -3951,8 +3952,12 @@ + /* Set phi nodes arguments. */ + FOR_EACH_VEC_ELT (reduction_phis, i, phi) + { +- tree vec_init_def = vec_initial_defs[i]; +- tree def = vect_defs[i]; ++ tree vec_init_def, def; ++ gimple_seq stmts; ++ vec_init_def = force_gimple_operand (vec_initial_defs[i], &stmts, ++ true, NULL_TREE); ++ gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts); ++ def = vect_defs[i]; + for (j = 0; j < ncopies; j++) + { + /* Set the loop-entry arg of the reduction-phi. */ +Index: gcc/tree-vect-data-refs.c +=================================================================== +--- a/src/gcc/tree-vect-data-refs.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/tree-vect-data-refs.c (.../branches/gcc-4_9-branch) +@@ -3172,7 +3172,7 @@ + bool + vect_analyze_data_refs (loop_vec_info loop_vinfo, + bb_vec_info bb_vinfo, +- int *min_vf) ++ int *min_vf, unsigned *n_stmts) + { + struct loop *loop = NULL; + basic_block bb = NULL; +@@ -3207,6 +3207,9 @@ + for (gsi = gsi_start_bb (bbs[i]); !gsi_end_p (gsi); gsi_next (&gsi)) + { + gimple stmt = gsi_stmt (gsi); ++ if (is_gimple_debug (stmt)) ++ continue; ++ ++*n_stmts; + if (!find_data_references_in_stmt (loop, stmt, &datarefs)) + { + if (is_gimple_call (stmt) && loop->safelen) +@@ -3260,6 +3263,9 @@ + for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) + { + gimple stmt = gsi_stmt (gsi); ++ if (is_gimple_debug (stmt)) ++ continue; ++ ++*n_stmts; + if (!find_data_references_in_stmt (NULL, stmt, + &BB_VINFO_DATAREFS (bb_vinfo))) + { +Index: gcc/graphite-scop-detection.c +=================================================================== +--- a/src/gcc/graphite-scop-detection.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/graphite-scop-detection.c (.../branches/gcc-4_9-branch) +@@ -219,7 +219,14 @@ + + switch (TREE_CODE (scev)) + { ++ case NEGATE_EXPR: ++ case BIT_NOT_EXPR: ++ CASE_CONVERT: ++ case NON_LVALUE_EXPR: ++ return graphite_can_represent_scev (TREE_OPERAND (scev, 0)); ++ + case PLUS_EXPR: ++ case POINTER_PLUS_EXPR: + case MINUS_EXPR: + return graphite_can_represent_scev (TREE_OPERAND (scev, 0)) + && graphite_can_represent_scev (TREE_OPERAND (scev, 1)); +@@ -241,6 +248,7 @@ + if (!evolution_function_right_is_integer_cst (scev) + || !graphite_can_represent_init (scev)) + return false; ++ return graphite_can_represent_scev (CHREC_LEFT (scev)); + + default: + break; +@@ -247,7 +255,8 @@ + } + + /* Only affine functions can be represented. */ +- if (!scev_is_linear_expression (scev)) ++ if (tree_contains_chrecs (scev, NULL) ++ || !scev_is_linear_expression (scev)) + return false; + + return true; +Index: gcc/tree-dfa.c +=================================================================== +--- a/src/gcc/tree-dfa.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/tree-dfa.c (.../branches/gcc-4_9-branch) +@@ -343,7 +343,7 @@ + { + loc = htab_find_slot_with_hash (DEFAULT_DEFS (fn), &in, + DECL_UID (var), NO_INSERT); +- if (*loc) ++ if (loc) + { + SSA_NAME_IS_DEFAULT_DEF (*(tree *)loc) = false; + htab_clear_slot (DEFAULT_DEFS (fn), loc); +Index: gcc/cfgexpand.c +=================================================================== +--- a/src/gcc/cfgexpand.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/cfgexpand.c (.../branches/gcc-4_9-branch) +@@ -1013,10 +1013,19 @@ + if (data->asan_base == NULL) + data->asan_base = gen_reg_rtx (Pmode); + base = data->asan_base; ++ ++ if (!STRICT_ALIGNMENT) ++ base_align = crtl->max_used_stack_slot_alignment; ++ else ++ base_align = MAX (crtl->max_used_stack_slot_alignment, ++ GET_MODE_ALIGNMENT (SImode) ++ << ASAN_SHADOW_SHIFT); + } + else +- offset = alloc_stack_frame_space (stack_vars[i].size, alignb); +- base_align = crtl->max_used_stack_slot_alignment; ++ { ++ offset = alloc_stack_frame_space (stack_vars[i].size, alignb); ++ base_align = crtl->max_used_stack_slot_alignment; ++ } + } + else + { +@@ -1845,6 +1854,11 @@ + = alloc_stack_frame_space (redzonesz, ASAN_RED_ZONE_SIZE); + data.asan_vec.safe_push (prev_offset); + data.asan_vec.safe_push (offset); ++ /* Leave space for alignment if STRICT_ALIGNMENT. */ ++ if (STRICT_ALIGNMENT) ++ alloc_stack_frame_space ((GET_MODE_ALIGNMENT (SImode) ++ << ASAN_SHADOW_SHIFT) ++ / BITS_PER_UNIT, 1); + + var_end_seq + = asan_emit_stack_protection (virtual_stack_vars_rtx, +Index: gcc/tree-ssa-reassoc.c +=================================================================== +--- a/src/gcc/tree-ssa-reassoc.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/tree-ssa-reassoc.c (.../branches/gcc-4_9-branch) +@@ -221,7 +221,36 @@ + static long get_rank (tree); + static bool reassoc_stmt_dominates_stmt_p (gimple, gimple); + ++/* Wrapper around gsi_remove, which adjusts gimple_uid of debug stmts ++ possibly added by gsi_remove. */ + ++bool ++reassoc_remove_stmt (gimple_stmt_iterator *gsi) ++{ ++ gimple stmt = gsi_stmt (*gsi); ++ ++ if (!MAY_HAVE_DEBUG_STMTS || gimple_code (stmt) == GIMPLE_PHI) ++ return gsi_remove (gsi, true); ++ ++ gimple_stmt_iterator prev = *gsi; ++ gsi_prev (&prev); ++ unsigned uid = gimple_uid (stmt); ++ basic_block bb = gimple_bb (stmt); ++ bool ret = gsi_remove (gsi, true); ++ if (!gsi_end_p (prev)) ++ gsi_next (&prev); ++ else ++ prev = gsi_start_bb (bb); ++ gimple end_stmt = gsi_stmt (*gsi); ++ while ((stmt = gsi_stmt (prev)) != end_stmt) ++ { ++ gcc_assert (stmt && is_gimple_debug (stmt) && gimple_uid (stmt) == 0); ++ gimple_set_uid (stmt, uid); ++ gsi_next (&prev); ++ } ++ return ret; ++} ++ + /* Bias amount for loop-carried phis. We want this to be larger than + the depth of any reassociation tree we can see, but not larger than + the rank difference between two blocks. */ +@@ -1123,7 +1152,7 @@ + update_stmt (use_stmt); + gsi = gsi_for_stmt (stmt); + unlink_stmt_vdef (stmt); +- gsi_remove (&gsi, true); ++ reassoc_remove_stmt (&gsi); + release_defs (stmt); + } + +@@ -3072,7 +3101,7 @@ + { + var = gimple_assign_rhs1 (stmt); + gsi = gsi_for_stmt (stmt); +- gsi_remove (&gsi, true); ++ reassoc_remove_stmt (&gsi); + release_defs (stmt); + } + else +@@ -3494,7 +3523,7 @@ + update_stmt (stmt); + + gsi = gsi_for_stmt (oldbinrhs); +- gsi_remove (&gsi, true); ++ reassoc_remove_stmt (&gsi); + release_defs (oldbinrhs); + + gimple_set_visited (stmt, true); +@@ -3896,7 +3925,7 @@ + gimple_assign_set_rhs_with_ops (&gsi2, NEGATE_EXPR, x, NULL); + user = gsi_stmt (gsi2); + update_stmt (user); +- gsi_remove (&gsi, true); ++ reassoc_remove_stmt (&gsi); + release_defs (feed); + plus_negates.safe_push (gimple_assign_lhs (user)); + } +@@ -4413,7 +4442,7 @@ + reassociations. */ + if (has_zero_uses (gimple_get_lhs (stmt))) + { +- gsi_remove (&gsi, true); ++ reassoc_remove_stmt (&gsi); + release_defs (stmt); + /* We might end up removing the last stmt above which + places the iterator to the end of the sequence. +Index: gcc/config/i386/i386.c +=================================================================== +--- a/src/gcc/config/i386/i386.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/config/i386/i386.c (.../branches/gcc-4_9-branch) +@@ -24390,7 +24390,8 @@ + if (jump_around_label == NULL_RTX) + jump_around_label = gen_label_rtx (); + emit_cmp_and_jump_insns (count_exp, GEN_INT (dynamic_check - 1), +- LEU, 0, GET_MODE (count_exp), 1, hot_label); ++ LEU, 0, counter_mode (count_exp), ++ 1, hot_label); + predict_jump (REG_BR_PROB_BASE * 90 / 100); + if (issetmem) + set_storage_via_libcall (dst, count_exp, val_exp, false); +Index: gcc/config/rs6000/vsx.md +=================================================================== +--- a/src/gcc/config/rs6000/vsx.md (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/config/rs6000/vsx.md (.../branches/gcc-4_9-branch) +@@ -1891,7 +1891,12 @@ + (parallel [(const_int 0) (const_int 4) + (const_int 1) (const_int 5)])))] + "VECTOR_MEM_VSX_P (<MODE>mode)" +- "xxmrghw %x0,%x1,%x2" ++{ ++ if (BYTES_BIG_ENDIAN) ++ return "xxmrghw %x0,%x1,%x2"; ++ else ++ return "xxmrglw %x0,%x2,%x1"; ++} + [(set_attr "type" "vecperm")]) + + (define_insn "vsx_xxmrglw_<mode>" +@@ -1903,7 +1908,12 @@ + (parallel [(const_int 2) (const_int 6) + (const_int 3) (const_int 7)])))] + "VECTOR_MEM_VSX_P (<MODE>mode)" +- "xxmrglw %x0,%x1,%x2" ++{ ++ if (BYTES_BIG_ENDIAN) ++ return "xxmrglw %x0,%x1,%x2"; ++ else ++ return "xxmrghw %x0,%x2,%x1"; ++} + [(set_attr "type" "vecperm")]) + + ;; Shift left double by word immediate +Index: gcc/tree-vect-slp.c +=================================================================== +--- a/src/gcc/tree-vect-slp.c (.../tags/gcc_4_9_0_release) ++++ b/src/gcc/tree-vect-slp.c (.../branches/gcc-4_9-branch) +@@ -849,9 +849,10 @@ + unsigned int *max_nunits, + vec<slp_tree> *loads, + unsigned int vectorization_factor, +- bool *matches, unsigned *npermutes) ++ bool *matches, unsigned *npermutes, unsigned *tree_size, ++ unsigned max_tree_size) + { +- unsigned nops, i, this_npermutes = 0; ++ unsigned nops, i, this_npermutes = 0, this_tree_size = 0; + gimple stmt; + + if (!matches) +@@ -911,6 +912,12 @@ + if (oprnd_info->first_dt != vect_internal_def) + continue; + ++ if (++this_tree_size > max_tree_size) ++ { ++ vect_free_oprnd_info (oprnds_info); ++ return false; ++ } ++ + child = vect_create_new_slp_node (oprnd_info->def_stmts); + if (!child) + { +@@ -921,7 +928,8 @@ + bool *matches = XALLOCAVEC (bool, group_size); + if (vect_build_slp_tree (loop_vinfo, bb_vinfo, &child, + group_size, max_nunits, loads, +- vectorization_factor, matches, npermutes)) ++ vectorization_factor, matches, ++ npermutes, &this_tree_size, max_tree_size)) + { + oprnd_info->def_stmts = vNULL; + SLP_TREE_CHILDREN (*node).quick_push (child); +@@ -961,7 +969,8 @@ + if (vect_build_slp_tree (loop_vinfo, bb_vinfo, &child, + group_size, max_nunits, loads, + vectorization_factor, +- matches, npermutes)) ++ matches, npermutes, &this_tree_size, ++ max_tree_size)) + { + oprnd_info->def_stmts = vNULL; + SLP_TREE_CHILDREN (*node).quick_push (child); +@@ -977,6 +986,9 @@ + return false; + } + ++ if (tree_size) ++ *tree_size += this_tree_size; ++ + vect_free_oprnd_info (oprnds_info); + return true; + } +@@ -1436,7 +1448,7 @@ + + static bool + vect_analyze_slp_instance (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo, +- gimple stmt) ++ gimple stmt, unsigned max_tree_size) + { + slp_instance new_instance; + slp_tree node; +@@ -1536,7 +1548,8 @@ + /* Build the tree for the SLP instance. */ + if (vect_build_slp_tree (loop_vinfo, bb_vinfo, &node, group_size, + &max_nunits, &loads, +- vectorization_factor, NULL, NULL)) ++ vectorization_factor, NULL, NULL, NULL, ++ max_tree_size)) + { + /* Calculate the unrolling factor based on the smallest type. */ + if (max_nunits > nunits) +@@ -1641,7 +1654,8 @@ + trees of packed scalar stmts if SLP is possible. */ + + bool +-vect_analyze_slp (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo) ++vect_analyze_slp (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo, ++ unsigned max_tree_size) + { + unsigned int i; + vec<gimple> grouped_stores; +@@ -1664,7 +1678,8 @@ + + /* Find SLP sequences starting from groups of grouped stores. */ + FOR_EACH_VEC_ELT (grouped_stores, i, first_element) +- if (vect_analyze_slp_instance (loop_vinfo, bb_vinfo, first_element)) ++ if (vect_analyze_slp_instance (loop_vinfo, bb_vinfo, first_element, ++ max_tree_size)) + ok = true; + + if (bb_vinfo && !ok) +@@ -1681,7 +1696,8 @@ + { + /* Find SLP sequences starting from reduction chains. */ + FOR_EACH_VEC_ELT (reduc_chains, i, first_element) +- if (vect_analyze_slp_instance (loop_vinfo, bb_vinfo, first_element)) ++ if (vect_analyze_slp_instance (loop_vinfo, bb_vinfo, first_element, ++ max_tree_size)) + ok = true; + else + return false; +@@ -1693,7 +1709,8 @@ + + /* Find SLP sequences starting from groups of reductions. */ + if (loop_vinfo && LOOP_VINFO_REDUCTIONS (loop_vinfo).length () > 1 +- && vect_analyze_slp_instance (loop_vinfo, bb_vinfo, reductions[0])) ++ && vect_analyze_slp_instance (loop_vinfo, bb_vinfo, reductions[0], ++ max_tree_size)) + ok = true; + + return true; +@@ -2071,12 +2088,13 @@ + slp_instance instance; + int i; + int min_vf = 2; ++ unsigned n_stmts = 0; + + bb_vinfo = new_bb_vec_info (bb); + if (!bb_vinfo) + return NULL; + +- if (!vect_analyze_data_refs (NULL, bb_vinfo, &min_vf)) ++ if (!vect_analyze_data_refs (NULL, bb_vinfo, &min_vf, &n_stmts)) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, +@@ -2124,7 +2142,7 @@ + + /* Check the SLP opportunities in the basic block, analyze and build SLP + trees. */ +- if (!vect_analyze_slp (NULL, bb_vinfo)) ++ if (!vect_analyze_slp (NULL, bb_vinfo, n_stmts)) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, |