https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104440
--- Comment #8 from Tom de Vries <vries at gcc dot gnu.org> --- Created attachment 52456 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52456&action=edit Tentative patch, introducing -minit-regs=<0|1|2> This patch fixes the problem, and survived a standalone build and gcc testsuite run. Currently testing in offloading setting. Uses DF_MIR_IN, otherwise only used by pass_ree. Effect of -minit-regs=1 (insert init at function entry): ... .reg.pred %r50; .reg.pred %r51; .reg.u32 %r52; + mov.u32 %r26, 0; mov.u64 %r33, %ar0; mov.u32 %r34, %ar1; setp.le.s32 %r35, %r34, 0; ... Effect of -minit-regs=2 (insert init close to use): ... add.u64 %r32, %r33, %r37; mov.u32 %r31, 0; mov.u32 %r52, 1; + mov.u32 %r26, 0; $L4: mov.u32 %r30, %r26; ld.u32 %r26, [%r25]; ...