diff options
author | Jan Hubicka <jh@suse.cz> | 2000-07-30 18:13:10 +0000 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2000-07-30 18:13:10 +0000 |
commit | 47b1e19b64b76712bd3cf26c39b46d0937347f19 (patch) | |
tree | 3ff42cba89273f5cd54afab8421fa8d28be2414f /gcc/simplify-rtx.c | |
parent | c34d53740af2d85e6f9bfbd1f7593aba0ea1cae4 (diff) | |
download | gcc-47b1e19b64b76712bd3cf26c39b46d0937347f19.zip gcc-47b1e19b64b76712bd3cf26c39b46d0937347f19.tar.gz gcc-47b1e19b64b76712bd3cf26c39b46d0937347f19.tar.bz2 |
simplify-rtx.c (simplify_relational_operation): Verify that mode == VOIDmode implies both operands to be VOIDmode.
* simplify-rtx.c (simplify_relational_operation): Verify that mode ==
VOIDmode implies both operands to be VOIDmode.
(simplify_ternary_operation): Compute properly the mode of comparison.
* combine.c (combine_simplify_rtx): Likewise.
From-SVN: r35343
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 2e79a8a..02af1d0 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1691,6 +1691,11 @@ simplify_relational_operation (code, mode, op0, op1) int equal, op0lt, op0ltu, op1lt, op1ltu; rtx tem; + if (mode == VOIDmode + && (GET_MODE (op0) != VOIDmode + || GET_MODE (op1) != VOIDmode)) + abort(); + /* 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); @@ -1980,8 +1985,11 @@ simplify_ternary_operation (code, mode, op0_mode, op0, op1, op2) return op2; else if (GET_RTX_CLASS (GET_CODE (op0)) == '<' && ! side_effects_p (op0)) { + enum machine_mode cmp_mode = (GET_MODE (XEXP (op0, 0)) == VOIDmode + ? GET_MODE (XEXP (op0, 1)) + : GET_MODE (XEXP (op0, 0))); rtx temp - = simplify_relational_operation (GET_CODE (op0), op0_mode, + = simplify_relational_operation (GET_CODE (op0), cmp_mode, XEXP (op0, 0), XEXP (op0, 1)); /* See if any simplifications were possible. */ |