diff options
author | Martin Jambor <mjambor@suse.cz> | 2011-07-26 19:21:21 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2011-07-26 19:21:21 +0200 |
commit | 842eeb9b72e45297b0f6c8a712aa0ec03157b434 (patch) | |
tree | 6a6aa7d363a1e6f02730b72a15c2d5638595607d /gcc | |
parent | 52bed4d7eeab395604e0d5e92d291be661d46222 (diff) | |
download | gcc-842eeb9b72e45297b0f6c8a712aa0ec03157b434.zip gcc-842eeb9b72e45297b0f6c8a712aa0ec03157b434.tar.gz gcc-842eeb9b72e45297b0f6c8a712aa0ec03157b434.tar.bz2 |
tree-sra.c (tree_non_mode_aligned_mem_p): Strip conversions and return false for invariants.
2011-07-26 Martin Jambor <mjambor@suse.cz>
* tree-sra.c (tree_non_mode_aligned_mem_p): Strip conversions and
return false for invariants.
From-SVN: r176797
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-sra.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ab5aaff..bc2fd58 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-07-26 Martin Jambor <mjambor@suse.cz> + + * tree-sra.c (tree_non_mode_aligned_mem_p): Strip conversions and + return false for invariants. + 2011-07-26 Uros Bizjak <ubizjak@gmail.com> * config/i386/i386.md (add->lea splitter): Implement using SWI diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index cbebb81..cc5cd36 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1075,9 +1075,13 @@ tree_non_mode_aligned_mem_p (tree exp) enum machine_mode mode = TYPE_MODE (TREE_TYPE (exp)); unsigned int align; + if (TREE_CODE (exp) == VIEW_CONVERT_EXPR) + exp = TREE_OPERAND (exp, 0); + if (TREE_CODE (exp) == SSA_NAME || TREE_CODE (exp) == MEM_REF || mode == BLKmode + || is_gimple_min_invariant (exp) || !STRICT_ALIGNMENT) return false; |