diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-09 19:25:31 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-09 19:25:31 +0000 |
commit | 23e2549016503f11f37b2f89ed7b7be4799e6e64 (patch) | |
tree | b456b7854cccbfd703167da199781923fe249c39 /gcc/expr.c | |
parent | 066b13811cec8a1ee2df7d9ba0269b66db915cdb (diff) | |
download | gcc-23e2549016503f11f37b2f89ed7b7be4799e6e64.tar.gz |
PR rtl-optimization/39779
* expr.c (convert_modes): Return when mode == oldmode after
CONST_INTs are processed.
testsuite/ChangeLog:
PR rtl-optimization/39779
* gcc.dg/pr39979.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151573 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index cd5eae16880..fe74280d7fe 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -761,9 +761,6 @@ convert_modes (enum machine_mode mode, enum machine_mode oldmode, rtx x, int uns if (GET_MODE (x) != VOIDmode) oldmode = GET_MODE (x); - if (mode == oldmode) - return x; - /* There is one case that we must handle specially: If we are converting a CONST_INT into a mode whose size is twice HOST_BITS_PER_WIDE_INT and we are to interpret the constant as unsigned, gen_lowpart will do @@ -829,6 +826,9 @@ convert_modes (enum machine_mode mode, enum machine_mode oldmode, rtx x, int uns return gen_lowpart (mode, x); } + if (mode == oldmode) + return x; + /* Converting from integer constant into mode is always equivalent to an subreg operation. */ if (VECTOR_MODE_P (mode) && GET_MODE (x) == VOIDmode) |