diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-10 12:48:16 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-10 12:48:16 +0000 |
commit | 3fc0a3f16dd5c5ab6014aa3711ab8dec16e8932c (patch) | |
tree | f2218b048b74165afd589a8d755a1be51d4af7ba /gcc/combine.c | |
parent | 5a2fc49ddb2749513a204bf2831f30a71baa9938 (diff) | |
download | gcc-3fc0a3f16dd5c5ab6014aa3711ab8dec16e8932c.tar.gz |
PR middle-end/45182
* combine.c (make_compound_operation): Don't try to convert
shifts into multiplications for modes that aren't SCALAR_INT_MODE_P.
PR middle-end/45182
* gcc.c-torture/compile/pr45182.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163057 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 41a0ec1dcb6..d336e5a5613 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -7093,7 +7093,9 @@ make_compound_operation (rtx x, enum rtx_code in_code) address, we stay there. If we have a comparison, set to COMPARE, but once inside, go back to our default of SET. */ - next_code = (code == MEM || code == PLUS || code == MINUS ? MEM + next_code = (code == MEM ? MEM + : ((code == PLUS || code == MINUS) + && SCALAR_INT_MODE_P (mode)) ? MEM : ((code == COMPARE || COMPARISON_P (x)) && XEXP (x, 1) == const0_rtx) ? COMPARE : in_code == COMPARE ? SET : in_code); @@ -7127,8 +7129,8 @@ make_compound_operation (rtx x, enum rtx_code in_code) case PLUS: lhs = XEXP (x, 0); rhs = XEXP (x, 1); - lhs = make_compound_operation (lhs, MEM); - rhs = make_compound_operation (rhs, MEM); + lhs = make_compound_operation (lhs, next_code); + rhs = make_compound_operation (rhs, next_code); if (GET_CODE (lhs) == MULT && GET_CODE (XEXP (lhs, 0)) == NEG && SCALAR_INT_MODE_P (mode)) { @@ -7157,8 +7159,8 @@ make_compound_operation (rtx x, enum rtx_code in_code) case MINUS: lhs = XEXP (x, 0); rhs = XEXP (x, 1); - lhs = make_compound_operation (lhs, MEM); - rhs = make_compound_operation (rhs, MEM); + lhs = make_compound_operation (lhs, next_code); + rhs = make_compound_operation (rhs, next_code); if (GET_CODE (rhs) == MULT && GET_CODE (XEXP (rhs, 0)) == NEG && SCALAR_INT_MODE_P (mode)) { |