diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-24 11:01:29 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-24 11:01:29 +0000 |
commit | 85e70f49e1081c9de84b52aa998dbf11f8a53ab1 (patch) | |
tree | 80619cfb79cfe4992a98b70a94b5b710e8868a5d /gcc/simplify-rtx.c | |
parent | d418f48985268051dda2c937efcb2ead4366aeed (diff) | |
download | gcc-85e70f49e1081c9de84b52aa998dbf11f8a53ab1.tar.gz |
* simplify-rtx.c (simplify_relational_operation): Don't
simplify address == constant into address + -constant == 0.
* gcc.dg/20040123-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76490 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index cebbf04b460..7f6b549b0fb 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -2530,6 +2530,8 @@ simplify_relational_operation (enum rtx_code code, enum machine_mode mode, && ! ((GET_CODE (op0) == REG || GET_CODE (trueop0) == CONST_INT) && (GET_CODE (op1) == REG || GET_CODE (trueop1) == CONST_INT)) && 0 != (tem = simplify_binary_operation (MINUS, mode, op0, op1)) + /* We cannot do this for == or != if tem is a nonzero address. */ + && ((code != EQ && code != NE) || ! nonzero_address_p (tem)) && code != GTU && code != GEU && code != LTU && code != LEU) return simplify_relational_operation (signed_condition (code), mode, tem, const0_rtx); |