genpreds.c (write_lookup_constraint): Do not compare first letter of the constraint...
authorRichard Biener <rguenther@suse.de>
Wed, 20 Feb 2013 09:04:29 +0000 (09:04 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 20 Feb 2013 09:04:29 +0000 (09:04 +0000)
2013-02-20  Richard Biener  <rguenther@suse.de>

* genpreds.c (write_lookup_constraint): Do not compare first
letter of the constraint again.

From-SVN: r196167

gcc/ChangeLog
gcc/genpreds.c

index 2a92d350a42d19012d487c256f3d2ec9e6386860..8bfaaa38ca9c14d3ce325d8a046f051066ffb629 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-20  Richard Biener  <rguenther@suse.de>
+
+       * genpreds.c (write_lookup_constraint): Do not compare first
+       letter of the constraint again.
+
 2013-02-20  Richard Biener  <rguenther@suse.de>
 
        * tree-ssa-loop-ivopts.c (alloc_use_cost_map): Use bitmap_count_bits
index 09fc87b3dd1f889719688fbf0b78c0f05fa1859c..98488e30b8bb2e762a3d8befcb1ad53ba9e44a6e 100644 (file)
@@ -945,9 +945,10 @@ write_lookup_constraint (void)
        {
          do
            {
-             printf ("      if (!strncmp (str, \"%s\", %lu))\n"
+             printf ("      if (!strncmp (str + 1, \"%s\", %lu))\n"
                      "        return CONSTRAINT_%s;\n",
-                     c->name, (unsigned long int) c->namelen, c->c_name);
+                     c->name + 1, (unsigned long int) c->namelen - 1,
+                     c->c_name);
              c = c->next_this_letter;
            }
          while (c);