This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/71310] New: Bitfields cause load hit store with smaller store and larger load
- From: "anton at samba dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 27 May 2016 12:33:32 +0000
- Subject: [Bug target/71310] New: Bitfields cause load hit store with smaller store and larger load
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71310
Bug ID: 71310
Summary: Bitfields cause load hit store with smaller store and
larger load
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: anton at samba dot org
Target Milestone: ---
The following testcase built on ppc64le:
typedef unsigned char __u8;
struct sk_buff {
void *junk;
__u8 pkt_type:3;
__u8 pfmemalloc:1;
__u8 ignore_df:1;
__u8 nfctinfo:3;
__u8 nf_trace:1;
__u8 ip_summed:2;
__u8 ooo_okay:1;
__u8 l4_hash:1;
__u8 sw_hash:1;
__u8 wifi_acked_valid:1;
__u8 wifi_acked:1;
__u8 no_fcs:1;
__u8 encapsulation:1;
__u8 encap_hdr_csum:1;
__u8 csum_valid:1;
};
int foo(struct sk_buff *skb)
{
skb->csum_valid = 1;
if (skb->ip_summed)
return 1;
return 0;
}
Results in a LHS, where the load is larger than the previous store:
lwz 9,8(3)
ori 9,9,0x1000
stw 9,8(3)
ori 2,2,0
ld 9,8(3)
rldicr 9,9,9,54
rldicr 9,9,55,10
addic 3,9,-1
subfe 3,3,9
blr
This may trip up the load hit store forwarding and require the store to hit the
L2 before the load can proceed.