summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivopts.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-06 11:42:22 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-06 11:42:22 +0000
commite892c6256cf6f4bc627c38cb7be0786bb3622a47 (patch)
tree311615d21e4b9ce25f0d64f553575c95a396a12d /gcc/tree-ssa-loop-ivopts.c
parent41442dd1837bb67c872d3706d9a45894fca7dfae (diff)
downloadgcc-e892c6256cf6f4bc627c38cb7be0786bb3622a47.tar.gz
2014-08-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/61320 * tree-ssa-loop-ivopts.c (may_be_unaligned_p): Properly handle misaligned loads. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213662 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r--gcc/tree-ssa-loop-ivopts.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 8bc4e8fc791..78f036ebd06 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -1679,6 +1679,8 @@ may_be_unaligned_p (tree ref, tree step)
return false;
unsigned int align = TYPE_ALIGN (TREE_TYPE (ref));
+ if (GET_MODE_ALIGNMENT (TYPE_MODE (TREE_TYPE (ref))) > align)
+ align = GET_MODE_ALIGNMENT (TYPE_MODE (TREE_TYPE (ref)));
unsigned HOST_WIDE_INT bitpos;
unsigned int ref_align;