From: Rafael Avila de Espindola Date: Fri, 23 May 2008 22:09:46 +0000 (+0000) Subject: see.c (see_get_extension_data): Don't use SUBREG_REG to test if a node is a SUBREG. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fbcfcb3cc3c93d7af538b220b3d57e3254ac6651;p=gcc.git see.c (see_get_extension_data): Don't use SUBREG_REG to test if a node is a SUBREG. 2008-05-23 Rafael Espindola * see.c (see_get_extension_data): Don't use SUBREG_REG to test if a node is a SUBREG. (see_analyze_one_def): Don't use SUBREG_REG to test if a node is a SUBREG. 2008-05-23 Rafael Espindola * gcc/testsuite/gcc.c-torture/compile/20080522-1.c: Move to gcc.dg. * gcc/testsuite/gcc.dg/20080522-1.c: Moved from gcc.c-torture. From-SVN: r135833 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c1712af05eb..2eda8f40bda 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2008-05-23 Rafael Espindola + + * see.c (see_get_extension_data): Don't use SUBREG_REG to test + if a node is a SUBREG. + (see_analyze_one_def): Don't use SUBREG_REG to test if a node + is a SUBREG. + 2008-05-23 Paul Brook Carlos O'Donell diff --git a/gcc/see.c b/gcc/see.c index 96d7ff5aa4b..dce51691cbe 100644 --- a/gcc/see.c +++ b/gcc/see.c @@ -732,7 +732,7 @@ see_get_extension_data (rtx extension, enum machine_mode *source_mode) /* Don't handle extensions to something other then register or subregister. */ - if (!REG_P (lhs) && !SUBREG_REG (lhs)) + if (!REG_P (lhs) && GET_CODE (lhs) != SUBREG) return UNKNOWN; if (GET_CODE (rhs) != SIGN_EXTEND && GET_CODE (rhs) != ZERO_EXTEND) @@ -3523,7 +3523,7 @@ see_analyze_one_def (rtx insn, enum machine_mode *source_mode, /* Don't handle extensions to something other then register or subregister. */ - if (!REG_P (lhs) && !SUBREG_REG (lhs)) + if (!REG_P (lhs) && GET_CODE (lhs) != SUBREG) return NOT_RELEVANT; switch (GET_CODE (rhs)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1c457cc7fa3..a5ece90857f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-05-23 Rafael Espindola + + * gcc/testsuite/gcc.c-torture/compile/20080522-1.c: Move to gcc.dg. + * gcc/testsuite/gcc.dg/20080522-1.c: Moved from gcc.c-torture. + 2008-05-23 Paul Brook Carlos O'Donell diff --git a/gcc/testsuite/gcc.c-torture/compile/20080522-1.c b/gcc/testsuite/gcc.c-torture/compile/20080522-1.c deleted file mode 100644 index e2598439b79..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/20080522-1.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do compile } -/* { dg-options "-O2 -fsee" } */ - -int f(const char* ptr, int bar) { - return (((const char *)0 - ptr ) & (bar - 1)) == 0; -} - - -int g(const char* ptr, const char *test, int N, int bar) { - if (N == 0) { - } - else if (N > 0) { - int count = 0; - while ( count < N) { - if (!f(ptr, bar)) - count++; - } - } - return f(test, bar) ; -} diff --git a/gcc/testsuite/gcc.dg/20080522-1.c b/gcc/testsuite/gcc.dg/20080522-1.c new file mode 100644 index 00000000000..e2598439b79 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20080522-1.c @@ -0,0 +1,20 @@ +/* { dg-do compile } +/* { dg-options "-O2 -fsee" } */ + +int f(const char* ptr, int bar) { + return (((const char *)0 - ptr ) & (bar - 1)) == 0; +} + + +int g(const char* ptr, const char *test, int N, int bar) { + if (N == 0) { + } + else if (N > 0) { + int count = 0; + while ( count < N) { + if (!f(ptr, bar)) + count++; + } + } + return f(test, bar) ; +}