diff options
author | Richard Henderson <rth@redhat.com> | 2001-09-06 15:14:43 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-09-06 15:14:43 -0700 |
commit | 7d8be4dab0814a35eb8150722dec6626e7f7162e (patch) | |
tree | e092e83c22a3a8cf7bfdb46857702de8b9cbd22d /gcc/simplify-rtx.c | |
parent | a1dc9455a34010a845a20f7d3dc8a0c64988b44d (diff) | |
download | gcc-7d8be4dab0814a35eb8150722dec6626e7f7162e.zip gcc-7d8be4dab0814a35eb8150722dec6626e7f7162e.tar.gz gcc-7d8be4dab0814a35eb8150722dec6626e7f7162e.tar.bz2 |
simplify-rtx.c (simplify_binary_operation): Simplify contents of CONST.
* simplify-rtx.c (simplify_binary_operation): Simplify contents
of CONST.
From-SVN: r45447
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index ea1cc6d..7f358d3 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1275,6 +1275,28 @@ simplify_binary_operation (code, mode, op0, op1) return simplify_gen_binary (AND, mode, op0, gen_rtx_NOT (mode, XEXP (op1, 0))); } + + /* Simplify operations with constants containing embedded offsets. */ + if (GET_CODE (op0) == CONST) + { + tem = simplify_binary_operation (code, mode, XEXP (op0, 0), op1); + if (tem) + { + if (CONSTANT_P (op1) && ! CONSTANT_P (tem)) + tem = gen_rtx_CONST (mode, tem); + return tem; + } + } + if (GET_CODE (op1) == CONST) + { + tem = simplify_binary_operation (code, mode, op0, XEXP (op1, 0)); + if (tem) + { + if (CONSTANT_P (op0) && ! CONSTANT_P (tem)) + tem = gen_rtx_CONST (mode, tem); + return tem; + } + } break; case MULT: |