diff options
author | Ian Lance Taylor <iant@google.com> | 2007-06-01 15:06:19 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2007-06-01 15:06:19 +0000 |
commit | 03743286836c9d50ae98ce033d057789cd8eb3f0 (patch) | |
tree | 704191f0c23c90f6bd8f14099504c8c3976f3824 /gcc/lower-subreg.c | |
parent | 96598938709133c220837081956f1b84516294e1 (diff) | |
download | gcc-03743286836c9d50ae98ce033d057789cd8eb3f0.zip gcc-03743286836c9d50ae98ce033d057789cd8eb3f0.tar.gz gcc-03743286836c9d50ae98ce033d057789cd8eb3f0.tar.bz2 |
re PR rtl-optimization/31455 (lower subreg causes a performance regression in the inner loop sometimes)
PR rtl-optimization/31455
* lower-subreg.c (find_decomposable_subregs): Don't decompose
subregs which have a cast between modes which are not tieable.
From-SVN: r125265
Diffstat (limited to 'gcc/lower-subreg.c')
-rw-r--r-- | gcc/lower-subreg.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c index ac29272..0b50a88 100644 --- a/gcc/lower-subreg.c +++ b/gcc/lower-subreg.c @@ -281,6 +281,18 @@ find_decomposable_subregs (rtx *px, void *data) bitmap_set_bit (decomposable_context, regno); return -1; } + + /* If this is a cast from one mode to another, where the modes + have the same size, and they are not tieable, then mark this + register as non-decomposable. If we decompose it we are + likely to mess up whatever the backend is trying to do. */ + if (outer_words > 1 + && outer_size == inner_size + && !MODES_TIEABLE_P (GET_MODE (x), GET_MODE (inner))) + { + bitmap_set_bit (non_decomposable_context, regno); + return -1; + } } else if (REG_P (x)) { |