https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65478
--- Comment #17 from Jan Hubicka <hubicka at ucw dot cz> --- > <bb 2>: > x.d = arg1_3(D); > _5 = x.i[3]; > if (_5 != 0) > goto <bb 3>; > else > goto <bb 4>; > ... > <bb 4>: > _12 = x.i[2]; > if (_12 != 0) > goto <bb 5>; > else > goto <bb 6>; > > to sth like > > <bb 4>: > _12 = (unsigned short)(arg1_3(D) >> 32); > if (_12 != 0) > goto <bb 5>; > else > goto <bb 6>; > > ? > > SCCVN doesn't handle sth "fancy" for the case of union accesses with > not matching offset/size. We could add that, but I suppose in your > case it's just for the sake of inliner predicates as the actual generated > code might be worse on some targets? Currently function have 1 store and 8 loads, with the change, it would have 4 loads that would make it cheaper (and would make predicates work indeed). > > _12 = BIT_FIELD_REF <arg1_3(D), ...> > > (or REALPART/IMAGPART for special cases where that is valid). Yeah, that would be nice!