aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2009-09-10 17:14:39 +0200
committerUros Bizjak <uros@gcc.gnu.org>2009-09-10 17:14:39 +0200
commit3a3d54f2fe6d6e9a56bdb79d92c635ddff9fa358 (patch)
tree85d528eea7bb80b6b58720a9f4e5a3bd776005fc /gcc/expr.c
parent1c6679e236a9cbe030ea9f57712b42c36fa1e199 (diff)
downloadgcc-3a3d54f2fe6d6e9a56bdb79d92c635ddff9fa358.zip
gcc-3a3d54f2fe6d6e9a56bdb79d92c635ddff9fa358.tar.gz
gcc-3a3d54f2fe6d6e9a56bdb79d92c635ddff9fa358.tar.bz2
Revert:
2009-09-09 Uros Bizjak <ubizjak@gmail.com> PR rtl-optimization/39779 * expr.c (convert_modes): Return when mode == oldmode after CONST_INTs are processed. testsuite/ChangeLog: Revert: 2009-09-09 Uros Bizjak <ubizjak@gmail.com> PR rtl-optimization/39779 * gcc.dg/pr39979.c: New test. From-SVN: r151596
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index fe74280..cd5eae1 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -761,6 +761,9 @@ 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
@@ -826,9 +829,6 @@ 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)