summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-data-refs.c
diff options
context:
space:
mode:
authorrevitale <revitale@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-05 15:28:50 +0000
committerrevitale <revitale@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-05 15:28:50 +0000
commit454f25be4550106b133980287ac7da30d2767f92 (patch)
tree571ecc16c72471ada3d0e6110405190f1bf85bd8 /gcc/tree-vect-data-refs.c
parentbe6a5df46280c8373508bd618c28bf1ff84a3dd3 (diff)
downloadgcc-454f25be4550106b133980287ac7da30d2767f92.tar.gz
misaligned store support
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148211 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r--gcc/tree-vect-data-refs.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 3279d8c8f1e..7646cc1ad0f 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -1138,11 +1138,10 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
/* While cost model enhancements are expected in the future, the high level
view of the code at this time is as follows:
- A) If there is a misaligned write then see if peeling to align this write
- can make all data references satisfy vect_supportable_dr_alignment.
- If so, update data structures as needed and return true. Note that
- at this time vect_supportable_dr_alignment is known to return false
- for a misaligned write.
+ A) If there is an unsupported misaligned access then see if peeling
+ to align this access can make all data references satisfy
+ vect_supportable_dr_alignment. If so, update data structures
+ as needed and return true.
B) If peeling wasn't possible and there is a data reference with an
unknown misalignment that does not satisfy vect_supportable_dr_alignment
@@ -1169,8 +1168,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
in code size).
The scheme we use FORNOW: peel to force the alignment of the first
- misaligned store in the loop.
- Rationale: misaligned stores are not yet supported.
+ unsupported misaligned access in the loop.
TODO: Use a cost model. */
@@ -1178,6 +1176,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
{
stmt = DR_STMT (dr);
stmt_info = vinfo_for_stmt (stmt);
+ supportable_dr_alignment = vect_supportable_dr_alignment (dr);
/* For interleaving, only the alignment of the first access
matters. */
@@ -1185,7 +1184,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
&& DR_GROUP_FIRST_DR (stmt_info) != stmt)
continue;
- if (!DR_IS_READ (dr) && !aligned_access_p (dr))
+ if (!supportable_dr_alignment)
{
do_peeling = vector_alignment_reachable_p (dr);
if (do_peeling)
@@ -3475,6 +3474,11 @@ vect_supportable_dr_alignment (struct data_reference *dr)
/* Can't software pipeline the loads, but can at least do them. */
return dr_unaligned_supported;
}
+ else
+ {
+ if (movmisalign_optab->handlers[mode].insn_code != CODE_FOR_nothing)
+ return dr_unaligned_supported;
+ }
/* Unsupported. */
return dr_unaligned_unsupported;