Re: [PATCH] tree-ssa-ccp: Fix up bit_value_binop on RSHIFT_EXPR [PR102134]

2021-08-31 Thread Richard Biener via Gcc-patches
On Tue, 31 Aug 2021, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, this hunk is guarded with !wi::neg_p (r1val | r1mask, > sgn) > which means if sgn is UNSIGNED, it is always true, but r1val | r1mask in > widest_int is still sign-extended. That means wi::clz (arg) returns 0, > wi::get_

[PATCH] tree-ssa-ccp: Fix up bit_value_binop on RSHIFT_EXPR [PR102134]

2021-08-31 Thread Jakub Jelinek via Gcc-patches
Hi! As mentioned in the PR, this hunk is guarded with !wi::neg_p (r1val | r1mask, sgn) which means if sgn is UNSIGNED, it is always true, but r1val | r1mask in widest_int is still sign-extended. That means wi::clz (arg) returns 0, wi::get_precision (arg) returns some very large number (WIDE_INT_