https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71509

--- Comment #4 from Anton Blanchard <anton at samba dot org> ---
Created attachment 39683
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39683&action=edit
Another bitop LHS test case

Here's another issue found in the Linux kernel. Seems like this should be a
single lwz/stw since the union of counter and the bitops completely overlap.

The half word store followed by word load is going to prevent it from store
forwarding.

0000000000000000 <set_page_slub_counters>:
   0:   00 00 03 81     lwz     r8,0(r3)
   4:   20 00 89 78     clrldi  r9,r4,32
   8:   c2 0f 2a 79     rldicl  r10,r9,33,31
   c:   00 f8 48 51     rlwimi  r8,r10,31,0,0
  10:   5e 00 2a 55     rlwinm  r10,r9,0,1,15
  14:   00 00 03 91     stw     r8,0(r3)
  18:   00 00 83 b0     sth     r4,0(r3)
  1c:   00 00 42 60     ori     r2,r2,0
  20:   00 00 23 81     lwz     r9,0(r3)
  24:   00 04 29 55     rlwinm  r9,r9,0,16,0
  28:   78 53 29 7d     or      r9,r9,r10
  2c:   00 00 23 91     stw     r9,0(r3)
  30:   20 00 80 4e     blr

Reply via email to