diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-25 16:09:20 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-25 16:09:20 +0000 |
commit | a7937bc7f69e236762ce8fad3150c475c27611a9 (patch) | |
tree | 83dcd1058b54834aa9344d686af7700546f5642e /gcc/simplify-rtx.c | |
parent | 0b24eca66a8c6532cc3fc38162eb2dabbcac591b (diff) | |
download | gcc-a7937bc7f69e236762ce8fad3150c475c27611a9.tar.gz |
* simplify-rtx.c (simplify_gen_relational): Simplify the RTX
(cond (compare x y) 0) into the equivalent (cond x y).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53870 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 36bcc1a22dc..6ec33a3935b 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -232,6 +232,10 @@ simplify_gen_relational (code, mode, cmp_mode, op0, op1) if ((tem = simplify_relational_operation (code, cmp_mode, op0, op1)) != 0) return tem; + /* If op0 is a compare, extract the comparison arguments from it. */ + if (GET_CODE (op0) == COMPARE && op1 == const0_rtx) + op1 = XEXP (op0, 1), op0 = XEXP (op0, 0); + /* Put complex operands first and constants second. */ if (swap_commutative_operands_p (op0, op1)) tem = op0, op0 = op1, op1 = tem, code = swap_condition (code); |