From: Martin Jambor Date: Tue, 26 Jul 2011 17:21:21 +0000 (+0200) Subject: tree-sra.c (tree_non_mode_aligned_mem_p): Strip conversions and return false for... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=842eeb9b72e45297b0f6c8a712aa0ec03157b434;p=gcc.git tree-sra.c (tree_non_mode_aligned_mem_p): Strip conversions and return false for invariants. 2011-07-26 Martin Jambor * tree-sra.c (tree_non_mode_aligned_mem_p): Strip conversions and return false for invariants. From-SVN: r176797 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ab5aaff9003..bc2fd587c1b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-07-26 Martin Jambor + + * tree-sra.c (tree_non_mode_aligned_mem_p): Strip conversions and + return false for invariants. + 2011-07-26 Uros Bizjak * config/i386/i386.md (add->lea splitter): Implement using SWI diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index cbebb81ba02..cc5cd36123f 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;