On Sat, Sep 11, 2021 at 5:21 AM Segher Boessenkool <seg...@kernel.crashing.org> wrote: > > On Fri, Sep 10, 2021 at 10:25:45PM +0800, Hongtao Liu wrote: > > Updated patch. > > > > Bootstrapped and regtested on x86_64-linux-gnu{-m32,}, do I need to > > run this patch on other targets machine, or the patch is supposed to > > have minimal impact on other targets? > > Then, ok for trunk? > > [-- Attachment #2: > v2-0001-Check-modes_tieable_p-before-call-gen_lowpart-to-.pat > ch --] > [-- Type: application/octet-stream, Encoding: base64, Size: 1.4K --] > > [-- application/octet-stream is unsupported (use 'v' to view this part) --] > > Please send your patches inline, or if you *have to* use attachments, > use text attachments. Without encoding. > hmm, my local file is $file 0001-Check-modes_tieable_p-before-call-gen_lowpart-to-avo.patch --mime-type 0001-Check-modes_tieable_p-before-call-gen_lowpart-to-avo.patch: text/x-diff
Didn't figure out how to let webgmail not change mime type of attachment. > <https://gcc.gnu.org/contribute.html#patches> > > (It says "strongly discouraged", which means people will put it to the > bottom of the stack of things to look at). > > > Segher Here is an updated patch. Bootstrapped and regtested on x86_64-linux-gnu{-m32,} Ok for trunk? gcc/ChangeLog: * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Check SCALAR_INT_MODE_P for both modes. --- gcc/machmode.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/machmode.h b/gcc/machmode.h index 158351350de..9f95d7d046c 100644 --- a/gcc/machmode.h +++ b/gcc/machmode.h @@ -959,9 +959,10 @@ extern scalar_int_mode ptr_mode; /* Target-dependent machine mode initialization - in insn-modes.c. */ extern void init_adjust_machine_modes (void); -#define TRULY_NOOP_TRUNCATION_MODES_P(MODE1, MODE2) \ - (targetm.truly_noop_truncation (GET_MODE_PRECISION (MODE1), \ - GET_MODE_PRECISION (MODE2))) +#define TRULY_NOOP_TRUNCATION_MODES_P(MODE1, MODE2) \ + (SCALAR_INT_MODE_P(MODE1) && SCALAR_INT_MODE_P(MODE2) \ + && targetm.truly_noop_truncation (GET_MODE_PRECISION (MODE1), \ + GET_MODE_PRECISION (MODE2))) /* Return true if MODE is a scalar integer mode that fits in a HOST_WIDE_INT. */ -- BR, Hongtao