summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-10 15:14:39 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-10 15:14:39 +0000
commit79a80d86c386ac97fecde94d3bb4084017f58f37 (patch)
tree85d528eea7bb80b6b58720a9f4e5a3bd776005fc
parent2d6df6a779a452b34939f8ba7f84c5f8ff01565b (diff)
downloadgcc-79a80d86c386ac97fecde94d3bb4084017f58f37.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151596 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/expr.c6
-rw-r--r--gcc/testsuite/ChangeLog8
3 files changed, 20 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 752b1a7dd7d..69d80ea2ef4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2009-09-10 Uros Bizjak <ubizjak@gmail.com>
+
+ 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.
+
2009-09-10 Nick Clifton <nickc@redhat.com>
* config/mep/mep.c (mep_encode_section_info): Copy weakness
diff --git a/gcc/expr.c b/gcc/expr.c
index fe74280d7fe..cd5eae16880 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)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c3d6c52f9a4..03271ae82f6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2009-09-10 Uros Bizjak <ubizjak@gmail.com>
+
+ Revert:
+ 2009-09-09 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/39779
+ * gcc.dg/pr39979.c: New test.
+
2009-09-10 Richard Guenther <rguenther@suse.de>
PR middle-end/41257