From 39b2ac744aa646a35dee80b7b4d47d21b7a30d2b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 14 Mar 2009 09:10:55 +0100 Subject: re PR bootstrap/39454 (Bootstrap failure on sparcv9-linux with profiledbootstrap) PR bootstrap/39454 * cse.c (fold_rtx): Don't modify original const_arg1 when canonicalizing SHIFT_COUNT_TRUNCATED shift count, do it on a separate variable instead. * rtlanal.c (nonzero_bits1) : Don't assume anything from out of range shift counts. (num_sign_bit_copies1) : Similarly. From-SVN: r144857 --- gcc/cse.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gcc/cse.c') diff --git a/gcc/cse.c b/gcc/cse.c index bab0908..04f52fb 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -3464,6 +3464,7 @@ fold_rtx (rtx x, rtx insn) int is_shift = (code == ASHIFT || code == ASHIFTRT || code == LSHIFTRT); rtx y, inner_const, new_const; + rtx canon_const_arg1 = const_arg1; enum rtx_code associate_code; if (is_shift @@ -3471,8 +3472,9 @@ fold_rtx (rtx x, rtx insn) || INTVAL (const_arg1) < 0)) { if (SHIFT_COUNT_TRUNCATED) - const_arg1 = GEN_INT (INTVAL (const_arg1) - & (GET_MODE_BITSIZE (mode) - 1)); + canon_const_arg1 = GEN_INT (INTVAL (const_arg1) + & (GET_MODE_BITSIZE (mode) + - 1)); else break; } @@ -3531,7 +3533,8 @@ fold_rtx (rtx x, rtx insn) associate_code = (is_shift || code == MINUS ? PLUS : code); new_const = simplify_binary_operation (associate_code, mode, - const_arg1, inner_const); + canon_const_arg1, + inner_const); if (new_const == 0) break; -- cgit v1.1