Optimization of bit field assignemnts

2024-02-12 Thread Hugh Gleaves via Gcc
I’m interested in whether it would be feasible to add an optimization that compacted assignments to multiple bit fields. Today, if I have a 32 bit long struct composed of say, four 8 bit fields and assign constants to them like this: ahb1_ptr->RCC.CFGR.MCO1_PRE = 7;

Re: Optimization of bit field assignemnts

2024-02-12 Thread David Brown
On 12/02/2024 17:47, Hugh Gleaves via Gcc wrote: I’m interested in whether it would be feasible to add an optimization that compacted assignments to multiple bit fields. Today, if I have a 32 bit long struct composed of say, four 8 bit fields and assign constants to them like this: