summaryrefslogtreecommitdiff
path: root/gcc/loop-invariant.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-13 23:19:49 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-13 23:19:49 +0000
commit5df640f646860cf0e8bd0dcf7a7b3eb4f7576fd3 (patch)
treec40e57f8c09dbac796305b735c941b4008537d44 /gcc/loop-invariant.c
parent7f56e70db0fc5fa84135a3ca438c6599c4e07a3f (diff)
downloadgcc-5df640f646860cf0e8bd0dcf7a7b3eb4f7576fd3.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110939 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-invariant.c')
-rw-r--r--gcc/loop-invariant.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index ce827807954..a57857d3831 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -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;