https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017
--- Comment #13 from Surya Kumari Jangala <jskumari at gcc dot gnu.org> --- With the patch at https://gcc.gnu.org/pipermail/gcc-patches/2023-October/631849.html, the testcase gets shrink wrapped. This is the assembly produced: addis 2,12,.TOC.-.LCF0@ha addi 2,2,.TOC.-.LCF0@l lwz %r10,0(%r3) addis %r9,%r2,.LC0@toc@ha ld %r9,.LC0@toc@l(%r9) cmpwi %cr0,%r10,0 lwz %r9,0(%r9) bne %cr0,.L11 extsw %r3,%r9 blr .L11: mflr %r0 std %r0,16(%r1) stdu %r1,-48(%r1) stw %r9,32(%r1) bl slowpath nop lwz %r9,32(%r1) addi %r1,%r1,48 ld %r0,16(%r1) extsw %r3,%r9 mtlr %r0 blr