[Bug middle-end/91869] New: Constant bitfield assignment causes unnecessary use of memory and instructions

2019-09-23 Thread pdj at knaldgas dot dk
: missed-optimization Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: pdj at knaldgas dot dk Target Milestone: --- Host: x86_64 Target: x86_64 Build: x86_64

[Bug middle-end/91131] Bad bitfield coalescing

2019-07-11 Thread pdj at knaldgas dot dk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91131 --- Comment #12 from Per Dalgas Jakobsen --- Created attachment 46591 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46591&action=edit Added more combinations of bitfield sets. Now includes all 8 combinations of zero/non-zero assignments t

[Bug middle-end/91131] Bad bitfield coalescing

2019-07-11 Thread pdj at knaldgas dot dk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91131 --- Comment #11 from Per Dalgas Jakobsen --- (In reply to Richard Biener from comment #10) > (In reply to Per Dalgas Jakobsen from comment #9) > > avr-gcc -O3 (and -Os, -O1, -O2): > > sts 0x0064, r1 ; 0x800064 > > ldi r24, 0

[Bug middle-end/91131] Bad bitfield coalescing

2019-07-11 Thread pdj at knaldgas dot dk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91131 --- Comment #9 from Per Dalgas Jakobsen --- (In reply to Richard Biener from comment #8) > Fixed on trunk sofar. > > Note the non-optimal code-gen probably was a side-effect of us making > three volatile accesses out of one. On x86 I now see >

[Bug middle-end/91131] Bad bitfield coalescing

2019-07-10 Thread pdj at knaldgas dot dk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91131 --- Comment #6 from Per Dalgas Jakobsen --- (In reply to Richard Biener from comment #3) > note your use of packed might end up doing more than one store depending > on the architecture. If you mean that a packed structure beyond the data-width

[Bug middle-end/91131] Bad bitfield coalescing

2019-07-10 Thread pdj at knaldgas dot dk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91131 --- Comment #5 from Per Dalgas Jakobsen --- (In reply to Richard Biener from comment #2) > So your complaint is that > > struct Reg_T { > unsigned int a : 3; > unsigned int b : 1; > unsigned int c : 4; > } __attribute__((

[Bug middle-end/91131] Bad bitfield coalescing

2019-07-10 Thread pdj at knaldgas dot dk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91131 --- Comment #1 from Per Dalgas Jakobsen --- Created attachment 46585 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46585&action=edit MWE: Preprocessed C-file

[Bug middle-end/91131] New: Bad bitfield coalescing

2019-07-10 Thread pdj at knaldgas dot dk
Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: pdj at knaldgas dot dk Target Milestone: --- In both C and Ada, bitfield coalescing does not work right, or at least not optimal. Since the issue manifests itself in the same way in