On Tue, 2025-01-21 at 21:52 +0800, Xi Ruoyao wrote: > > struct Pair { unsigned long a, b; }; > > > > struct Pair > > test (struct Pair p, long x, long y) > > { > > p.a &= 0xffffffff; > > p.a <<= 2; > > p.a += x; > > p.b &= 0xffffffff; > > p.b <<= 2; > > p.b += x; > > return p; > > } > > > > in GCC 13 the result is: > > > > or $r12,$r4,$r0 > > Hmm, this strange move is caused by "&" in bstrpick_alsl_paired. Is it > really needed for the fusion?
Never mind, it's needed or a = ((a & 0xffffffff) << 1) + a will blow up. Stupid I. > > bstrpick.d $r4,$r12,31,0 > > alsl.d $r4,$r4,$r6,2 > > or $r12,$r5,$r0 > > bstrpick.d $r5,$r12,31,0 > > alsl.d $r5,$r5,$r6,2 > > jr $r1 -- Xi Ruoyao <xry...@xry111.site> School of Aerospace Science and Technology, Xidian University