This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH, genrecog: improve warnings


This patch improves the warnings produced by genrecog.  Currently,
genrecog produces a warning when the source of a (set ..) is a modeless
(call ..).  For example:

    rs6000.md:10396: warning: source missing a mode?

That seems to be a common and legitimate idiom, so I propose that we
don't emit a warning in this case.  Okay for mainline?

2009-04-21  Ben Elliston  <bje@au.ibm.com>
 
       * genrecog.c (validate_pattern): Do not warn for VOIDmode CALLs as
       the source of a set operation.

Index: genrecog.c
===================================================================
--- genrecog.c  (revision 146542)
+++ genrecog.c  (working copy)
@@ -793,7 +793,8 @@ validate_pattern (rtx pattern, rtx insn,
                 && GET_CODE (dest) != CC0
                 && GET_CODE (src) != PC
                 && GET_CODE (src) != CC0
-                && GET_CODE (src) != CONST_INT)
+                && GET_CODE (src) != CONST_INT
+                && GET_CODE (src) != CALL)
          {
            const char *which;
            which = (dmode == VOIDmode ? "destination" : "source");



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]