Re: [RFC] Store_bit_field_1: Use mode of SUBREG instead of REG

2023-07-12 Thread YunQiang Su
> 2023年7月12日 15:44,Richard Biener 写道: > > On Wed, Jul 12, 2023 at 5:20 AM YunQiang Su wrote: >> >> PR #104914 >> >> When work with >> int val; >> ((unsigned char*)&val)[0] = *buf; >> The RTX mode is obtained from REG instead of SUBREG, >> which make D is used instead of . >> Thus something

Re: [RFC] Store_bit_field_1: Use mode of SUBREG instead of REG

2023-07-12 Thread Richard Biener via Gcc-patches
On Wed, Jul 12, 2023 at 5:20 AM YunQiang Su wrote: > > PR #104914 > > When work with > int val; > ((unsigned char*)&val)[0] = *buf; > The RTX mode is obtained from REG instead of SUBREG, > which make D is used instead of . > Thus something wrong happens on sign-extend default architectures, >

[RFC] Store_bit_field_1: Use mode of SUBREG instead of REG

2023-07-11 Thread YunQiang Su
PR #104914 When work with int val; ((unsigned char*)&val)[0] = *buf; The RTX mode is obtained from REG instead of SUBREG, which make D is used instead of . Thus something wrong happens on sign-extend default architectures, like MIPS64. gcc/ChangeLog: PR: 104914. * expmed.cc(st