diff options
| author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-01 15:06:19 +0000 |
|---|---|---|
| committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-01 15:06:19 +0000 |
| commit | 4e7a1eb86a1b273d882474a660fb9a332b91c5c8 (patch) | |
| tree | 704191f0c23c90f6bd8f14099504c8c3976f3824 | |
| parent | fd82ebdcc2639a54610bb305e6ef3936c90a8ae7 (diff) | |
| download | ppe42-gcc-4e7a1eb86a1b273d882474a660fb9a332b91c5c8.tar.gz ppe42-gcc-4e7a1eb86a1b273d882474a660fb9a332b91c5c8.zip | |
PR rtl-optimization/31455
* lower-subreg.c (find_decomposable_subregs): Don't decompose
subregs which have a cast between modes which are not tieable.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125265 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/lower-subreg.c | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c1ee9fbfe42..ece60c7ae48 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-06-01 Ian Lance Taylor <iant@google.com> + + PR rtl-optimization/31455 + * lower-subreg.c (find_decomposable_subregs): Don't decompose + subregs which have a cast between modes which are not tieable. + 2007-06-01 Uros Bizjak <ubizjak@gmail.com> * expr.c (force_operand) [DIV, MOD, UDIV, UMOD, ASHIFTRT]: Remove diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c index ac29272211d..0b50a88de99 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)) { |

