diff options
author | segher <segher@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-07-02 16:27:11 +0000 |
---|---|---|
committer | segher <segher@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-07-02 16:27:11 +0000 |
commit | 3d3b7ccd954a6d06c0ec95773c3d1b8bc10ae98a (patch) | |
tree | d174096834a05a5f44f5c2a50ff943b93ef3cce3 /gcc/combine.c | |
parent | b77049e845c1dd1d5d81c8f7301265bc32ed7b9f (diff) | |
download | gcc-3d3b7ccd954a6d06c0ec95773c3d1b8bc10ae98a.tar.gz |
PR rtl-optimization/66706
* combine.c (make_compound_operation): If an AND of SUBREG of
LSHIFTRT does not simplify, see if just the AND of SUBREG does.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225344 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 8eaae7c4e3e..b97aa10be07 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -7893,6 +7893,15 @@ make_compound_operation (rtx x, enum rtx_code in_code) new_rtx = make_extraction (GET_MODE (SUBREG_REG (XEXP (x, 0))), new_rtx, 0, XEXP (SUBREG_REG (XEXP (x, 0)), 1), i, 1, 0, in_code == COMPARE); + + /* If that didn't give anything, see if the AND simplifies on + its own. */ + if (!new_rtx && i >= 0) + { + new_rtx = make_compound_operation (XEXP (x, 0), next_code); + new_rtx = make_extraction (mode, new_rtx, 0, NULL_RTX, i, 1, + 0, in_code == COMPARE); + } } /* Same as previous, but for (xor/ior (lshiftrt...) (lshiftrt...)). */ else if ((GET_CODE (XEXP (x, 0)) == XOR |