[Bug middle-end/45274] __restrict__ type qualifier does not work on pointers to bitfields
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45274 Andrew Pinski changed: What|Removed |Added Assignee|rguenth at gcc dot gnu.org |pinskia at gcc dot gnu.org --- Comment #5 from Andrew Pinski --- Mine. With my bit-field lowering and a patch to reassociation to some handle BIT_INSERT optimizations, we are able to optimize this to just load/store.
[Bug middle-end/45274] __restrict__ type qualifier does not work on pointers to bitfields
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45274 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #4 from Richard Biener --- The alias-set issue doesn't occur since quite some time (it's using alias-set 1 for me). Also restrict is working. GCC 6 optimizes this on x86_64 to foo: .LFB0: .cfi_startproc movzbl (%rdi), %edx movzbl (%rsi), %eax movl%edx, %r8d movl%edx, %ecx andl$-4, %eax andl$1, %r8d andl$2, %ecx orl %r8d, %eax orl %ecx, %eax movl%edx, %ecx andl$8, %edx andl$4, %ecx andl$-13, %eax orl %ecx, %eax orl %edx, %eax movb%al, (%rsi) movl(%rdi), %eax andl$-16, %eax movl%eax, %edx movl(%rsi), %eax andl$15, %eax orl %edx, %eax movl%eax, (%rsi) ret thus it is doing a good job in piecewise copying of the struct. It doesn't detect that it can simply use a 32bit load/store. But there are duplicates in bugzilla for that issue. Interestingly with some bitfield lowering work plus some match.pd hackery I get that: foo: .LFB0: .cfi_startproc movl(%rdi), %eax movl%eax, (%rsi) ret whee.
[Bug middle-end/45274] __restrict__ type qualifier does not work on pointers to bitfields
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45274 Andrew Pinski pinskia at gcc dot gnu.org changed: What|Removed |Added Keywords||missed-optimization Target|powerpc64-unknown-linux-gnu | |, mips64-elf| --- Comment #3 from Andrew Pinski pinskia at gcc dot gnu.org 2011-04-11 20:13:25 UTC --- (In reply to comment #1) I don't think this has anything to do with restrict and all with lowering bitfield accesses only during expansion, and at RTL level the bitfield operations being too big for combiner to optimize them. No this is unrelated to the combiner not be able to optimize the bitfield accesses. Rather it is related to how store and loads happen on bitfields. We don't try to keep track of individual bits for a change in the store.
[Bug middle-end/45274] __restrict__ type qualifier does not work on pointers to bitfields
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45274 Andrew Pinski pinskia at gcc dot gnu.org changed: What|Removed |Added Target|powerpc64-unknown-linux-gnu |powerpc64-unknown-linux-gnu ||, mips64-elf Status|UNCONFIRMED |NEW Last reconfirmed||2010.10.28 20:05:42 Ever Confirmed|0 |1 --- Comment #2 from Andrew Pinski pinskia at gcc dot gnu.org 2010-10-28 20:05:42 UTC --- Expand has the issue: (insn 7 6 8 t2.c:7 (set (reg:SI 197) (mem/s:SI (reg/v/f:DI 193 [ src ]) [0 S4 A32])) -1 (nil)) Notice the aliasing set of 0. Confirmed.
[Bug middle-end/45274] __restrict__ type qualifier does not work on pointers to bitfields
--- Comment #1 from jakub at gcc dot gnu dot org 2010-08-13 08:01 --- I don't think this has anything to do with restrict and all with lowering bitfield accesses only during expansion, and at RTL level the bitfield operations being too big for combiner to optimize them. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45274