OSDN Git Service

PR rtl-optimization/52113
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 4 Feb 2012 12:47:55 +0000 (12:47 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 4 Feb 2012 12:47:55 +0000 (12:47 +0000)
* lower-subreg.c (decompose_multiword_subregs): Call recog_memoized
even for decomposable shift/zext insns.

* gcc.target/avr/pr52113.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183894 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/lower-subreg.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr52113.c [new file with mode: 0644]

index cbb76e4..0dba808 100644 (file)
@@ -1,3 +1,9 @@
+2012-02-04  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/52113
+       * lower-subreg.c (decompose_multiword_subregs): Call recog_memoized
+       even for decomposable shift/zext insns.
+
 2012-02-03  Jakub Jelinek  <jakub@redhat.com>
            Zdenek Dvorak  <ook@ucw.cz>
 
index 779cc5f..89f3044 100644 (file)
@@ -1,5 +1,6 @@
 /* Decompose multiword subregs.
-   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
+   Free Software Foundation, Inc.
    Contributed by Richard Henderson <rth@redhat.com>
                  Ian Lance Taylor <iant@google.com>
 
@@ -1135,10 +1136,11 @@ decompose_multiword_subregs (void)
              || GET_CODE (PATTERN (insn)) == USE)
            continue;
 
+         recog_memoized (insn);
+
          if (find_decomposable_shift_zext (insn))
            continue;
 
-         recog_memoized (insn);
          extract_insn (insn);
 
          set = simple_move (insn);
index 0c20996..1565b87 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-04  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/52113
+       * gcc.target/avr/pr52113.c: New test.
+
 2012-02-03  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/52092
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr52113.c b/gcc/testsuite/gcc.c-torture/compile/pr52113.c
new file mode 100644 (file)
index 0000000..61de64f
--- /dev/null
@@ -0,0 +1,11 @@
+/* PR rtl-optimization/52113 */
+
+unsigned long v1;
+unsigned char v2;
+
+void
+foo (void)
+{
+  if (v1 > (v2 * 1000L))
+    v1 = 0;
+}