On 02/03/2021 23:37, Ilya Leoshkevich wrote: > Bootstrapped and regtested on x86_64-redhat-linux, ppc64le-redhat-linux > and s390x-redhat-linux. Ok for master? > > > > Commit efb6bc55a93a ("fwprop: Allow (subreg (mem)) simplifications") > introduced a check that was supposed to look at the propagated def's > number of uses. It uses insn_info::num_uses (), which in reality > returns the number of uses def's insn has. The whole change therefore > works only by accident. > > Fix by looking at def_info's uses instead of insn_info's uses. This > requires passing around def_info instead of insn_info. >
If building glibc on s390x with -march=z14, there is currently an extra "unneeded" stackframe in e.g. sqrtl, llroundl, lroundl, llrintl, llrint and roundevenl. 0000000000000000 <__ieee754_sqrtl>: 0: b3 c1 00 4f ldgr %f4,%r15 4: e3 f0 ff 50 ff 71 lay %r15,-176(%r15) a: e3 00 f0 a8 00 20 cg %r0,168(%r15) # The long double argument is loaded ... 10: e7 00 30 00 30 06 vl %v0,0(%r3),3 # ... stored to extra "unneeded" stackframe ... 16: e7 00 f0 a0 30 0e vst %v0,160(%r15),3 # ... and loaded from there into a floating-point-pair 1c: 68 00 f0 a0 ld %f0,160(%r15) 20: 68 20 f0 a8 ld %f2,168(%r15) 24: b3 16 00 00 sqxbr %f0,%f0 28: 60 00 20 00 std %f0,0(%r2) 2c: 60 20 20 08 std %f2,8(%r2) 30: b3 cd 00 f4 lgdr %r15,%f4 34: 07 fe br %r14 With this patch, there is no stackframe in those functions anymore as it was if build with gcc 10. 0000000000000000 <__ieee754_sqrtl>: 0: 68 00 30 00 ld %f0,0(%r3) 4: 68 20 30 08 ld %f2,8(%r3) 8: b3 16 00 00 sqxbr %f0,%f0 c: 60 00 20 00 std %f0,0(%r2) 10: 60 20 20 08 std %f2,8(%r2) 14: 07 fe br %r14 Thanks, Stefan