re PR rtl-optimization/26235 (FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution...
authorZdenek Dvorak <dvorakz@suse.cz>
Mon, 13 Feb 2006 23:19:49 +0000 (00:19 +0100)
committerZdenek Dvorak <rakdver@gcc.gnu.org>
Mon, 13 Feb 2006 23:19:49 +0000 (23:19 +0000)
PR rtl-optimization/26235
* loop-invariant.c (hash_invariant_expr_1): Handle 'i' and 'n' formats.
(invariant_expr_equal_p): Handle 'i' and 'n' formats.  Fail on unknown
format.

From-SVN: r110939

gcc/ChangeLog
gcc/loop-invariant.c

index 2498b57..a1a30e3 100644 (file)
@@ -1,3 +1,10 @@
+2006-02-13  Zdenek Dvorak <dvorakz@suse.cz>
+
+       PR rtl-optimization/26235
+       * loop-invariant.c (hash_invariant_expr_1): Handle 'i' and 'n' formats.
+       (invariant_expr_equal_p): Handle 'i' and 'n' formats.  Fail on unknown
+       format.
+
 2006-02-13  Jeff Law  <law@redhat.com>
 
        * tree-vrp.c (extract_range_from_binary_expr): Remove handling of
index ce82780..a57857d 100644 (file)
@@ -292,6 +292,8 @@ hash_invariant_expr_1 (rtx insn, rtx x)
          for (j = 0; j < XVECLEN (x, i); j++)
            val ^= hash_invariant_expr_1 (insn, XVECEXP (x, i, j));
        }
+      else if (fmt[i] == 'i' || fmt[i] == 'n')
+       val ^= XINT (x, i);
     }
 
   return val;
@@ -373,6 +375,14 @@ invariant_expr_equal_p (rtx insn1, rtx e1, rtx insn2, rtx e2)
                return false;
            }
        }
+      else if (fmt[i] == 'i' || fmt[i] == 'n')
+       {
+         if (XINT (e1, i) != XINT (e2, i))
+           return false;
+       }
+      /* Unhandled type of subexpression, we fail conservatively.  */
+      else
+       return false;
     }
 
   return true;