diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-07-04 23:04:54 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-07-04 23:04:54 +0200 |
commit | af421d9cf0a6cbc585e42af653a01619457ecc01 (patch) | |
tree | e6584beeae32a98e8799d34bffe88039b8b8e8e0 /gcc/combine.c | |
parent | 707f991907e5c97c56a05654fee49f4940158994 (diff) | |
download | gcc-af421d9cf0a6cbc585e42af653a01619457ecc01.zip gcc-af421d9cf0a6cbc585e42af653a01619457ecc01.tar.gz gcc-af421d9cf0a6cbc585e42af653a01619457ecc01.tar.bz2 |
re PR rtl-optimization/49619 (ICE in simplify_subreg, at simplify-rtx.c:5362)
PR rtl-optimization/49619
* combine.c (combine_simplify_rtx): In PLUS -> IOR simplification
pass VOIDmode as op0_mode to recursive call, and return temp even
when different from tor, just if it is not IOR of the original
PLUS arguments.
* gcc.dg/pr49619.c: New test.
From-SVN: r175825
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 56fb44e..ba35f28 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -5681,12 +5681,17 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest, { /* Try to simplify the expression further. */ rtx tor = simplify_gen_binary (IOR, mode, XEXP (x, 0), XEXP (x, 1)); - temp = combine_simplify_rtx (tor, mode, in_dest, 0); + temp = combine_simplify_rtx (tor, VOIDmode, in_dest, 0); /* If we could, great. If not, do not go ahead with the IOR replacement, since PLUS appears in many special purpose address arithmetic instructions. */ - if (GET_CODE (temp) != CLOBBER && temp != tor) + if (GET_CODE (temp) != CLOBBER + && (GET_CODE (temp) != IOR + || ((XEXP (temp, 0) != XEXP (x, 0) + || XEXP (temp, 1) != XEXP (x, 1)) + && (XEXP (temp, 0) != XEXP (x, 1) + || XEXP (temp, 1) != XEXP (x, 0))))) return temp; } break; |