diff options
author | Richard Biener <rguenther@suse.de> | 2014-06-27 10:03:51 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-06-27 10:03:51 +0000 |
commit | 3fd269db216915329a3f016e4a7431a82ed564ef (patch) | |
tree | 184d0d107cc67e9a8e87328f1ba226432a0ebe3b /gcc/tree-ssa-math-opts.c | |
parent | 807b7d6209c7bd54b4dfc9abdc17f451e71aa648 (diff) | |
download | gcc-3fd269db216915329a3f016e4a7431a82ed564ef.zip gcc-3fd269db216915329a3f016e4a7431a82ed564ef.tar.gz gcc-3fd269db216915329a3f016e4a7431a82ed564ef.tar.bz2 |
tree-ssa-math-opts.c (bswap_replace): Fix SLOW_UNALIGNED_ACCESS test to only apply to unaligned object.
2014-06-27 Richard Biener <rguenther@suse.de>
* tree-ssa-math-opts.c (bswap_replace): Fix
SLOW_UNALIGNED_ACCESS test to only apply to unaligned object.
From-SVN: r212068
Diffstat (limited to 'gcc/tree-ssa-math-opts.c')
-rw-r--r-- | gcc/tree-ssa-math-opts.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index ca2b30d..65dfdec 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -2179,7 +2179,9 @@ bswap_replace (gimple cur_stmt, gimple_stmt_iterator gsi, gimple src_stmt, unsigned align; align = get_object_alignment (src); - if (bswap && SLOW_UNALIGNED_ACCESS (TYPE_MODE (load_type), align)) + if (bswap + && align < GET_MODE_ALIGNMENT (TYPE_MODE (load_type)) + && SLOW_UNALIGNED_ACCESS (TYPE_MODE (load_type), align)) return false; gsi_move_before (&gsi, &gsi_ins); |