From 842eeb9b72e45297b0f6c8a712aa0ec03157b434 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Tue, 26 Jul 2011 19:21:21 +0200 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/tree-sra.c | 4 ++++ 2 files changed, 9 insertions(+) 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; -- 2.30.2