diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2015-11-08 18:33:42 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-11-08 18:33:42 +0000 |
commit | ee45a32dae253f7daa966573eb8cb64b2cf7bf52 (patch) | |
tree | cf927ff52a6d5ba28290472db09363fe67a835d6 /gcc/tree-vect-data-refs.c | |
parent | eb11eb157cf07500e2915da8a72f2f3a501cc5ae (diff) | |
download | gcc-ee45a32dae253f7daa966573eb8cb64b2cf7bf52.zip gcc-ee45a32dae253f7daa966573eb8cb64b2cf7bf52.tar.gz gcc-ee45a32dae253f7daa966573eb8cb64b2cf7bf52.tar.bz2 |
Merge of the scalar-storage-order branch.
From-SVN: r229965
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc/tree-vect-data-refs.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 3de71fb..11bce79 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -3027,7 +3027,7 @@ vect_check_gather_scatter (gimple *stmt, loop_vec_info loop_vinfo, tree *basep, tree offtype = NULL_TREE; tree decl, base, off; machine_mode pmode; - int punsignedp, pvolatilep; + int punsignedp, reversep, pvolatilep = 0; base = DR_REF (dr); /* For masked loads/stores, DR_REF (dr) is an artificial MEM_REF, @@ -3059,9 +3059,9 @@ vect_check_gather_scatter (gimple *stmt, loop_vec_info loop_vinfo, tree *basep, vectorized. The following code attempts to find such a preexistng SSA_NAME OFF and put the loop invariants into a tree BASE that can be gimplified before the loop. */ - base = get_inner_reference (base, &pbitsize, &pbitpos, &off, - &pmode, &punsignedp, &pvolatilep, false); - gcc_assert (base != NULL_TREE && (pbitpos % BITS_PER_UNIT) == 0); + base = get_inner_reference (base, &pbitsize, &pbitpos, &off, &pmode, + &punsignedp, &reversep, &pvolatilep, false); + gcc_assert (base && (pbitpos % BITS_PER_UNIT) == 0 && !reversep); if (TREE_CODE (base) == MEM_REF) { @@ -3515,7 +3515,7 @@ again: HOST_WIDE_INT pbitsize, pbitpos; tree poffset; machine_mode pmode; - int punsignedp, pvolatilep; + int punsignedp, preversep, pvolatilep; affine_iv base_iv, offset_iv; tree dinit; @@ -3534,7 +3534,8 @@ again: } outer_base = get_inner_reference (inner_base, &pbitsize, &pbitpos, - &poffset, &pmode, &punsignedp, &pvolatilep, false); + &poffset, &pmode, &punsignedp, + &preversep, &pvolatilep, false); gcc_assert (outer_base != NULL_TREE); if (pbitpos % BITS_PER_UNIT != 0) @@ -3545,6 +3546,14 @@ again: return false; } + if (preversep) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "failed: reverse storage order.\n"); + return false; + } + outer_base = build_fold_addr_expr (outer_base); if (!simple_iv (loop, loop_containing_stmt (stmt), outer_base, &base_iv, false)) |