钟居哲 <juzhe.zh...@rivai.ai> writes: > Thanks Richard. > > Is it correct as follows ? > > diff --git a/gcc/dse.cc b/gcc/dse.cc > index 8b07be17674..c58d3bf4e1b 100644 > --- a/gcc/dse.cc > +++ b/gcc/dse.cc > @@ -1733,7 +1733,7 @@ find_shift_sequence (poly_int64 access_size, > /* If a constant was stored into memory, try to simplify it here, > otherwise the cost of the shift might preclude this optimization > e.g. at -Os, even when no actual shift will be needed. */ > - if (store_info->const_rhs) > + if (store_info->const_rhs && known_le (access_size, GET_MODE_SIZE > (MAX_MODE_INT)))
Yes, but the "&& ..." needs to be on a new line because of the 80-character limit. > I failed to find native_encode_rtx and native_decode_rtx. See simplify-rtx.cc. Richard