diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7132bf00d0e1..f2cc02766001 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2020-01-30 Jakub Jelinek + + PR middle-end/93505 + * combine.c (simplify_comparison) : Punt on out of range + rotate counts. + 2020-01-30 Andrew Stubbs * config/gcn/gcn.c (print_operand): Handle LTGT. diff --git a/gcc/combine.c b/gcc/combine.c index 0272e7542972..d44b9c3bf950 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -12410,7 +12410,8 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1) bit. This will be converted into a ZERO_EXTRACT. */ if (const_op == 0 && sign_bit_comparison_p && CONST_INT_P (XEXP (op0, 1)) - && mode_width <= HOST_BITS_PER_WIDE_INT) + && mode_width <= HOST_BITS_PER_WIDE_INT + && UINTVAL (XEXP (op0, 1)) < mode_width) { op0 = simplify_and_const_int (NULL_RTX, mode, XEXP (op0, 0), (HOST_WIDE_INT_1U diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 269adb29e946..ce53e2c8bf8e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-01-30 Jakub Jelinek + + PR middle-end/93505 + * gcc.c-torture/compile/pr93505.c: New test. + 2020-01-30 Jeff Law > (-y & 31); + x >>= 31; + return x; +}