https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122533
--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Andrew Pinski from comment #5)
> (In reply to Andrew Pinski from comment #3)
> > (In reply to Andrew Pinski from comment #2)
> > > That is due to uncprop pass which does the wrong thing here. Let me file
> > > that seperately.
> >
> > Actually it is partly that and another issue which I file seperately too.
>
> PR 122534.
The above PR is now fixed, but the improvement is ineffective for this
particular testcase, because %rsi from the AND insn is not dead.
.L3:
mov rsi, rdx
and rsi, QWORD PTR [rcx+rax*8]
jne .L4
add rax, 1
cmp rax, 6
jne .L3
mov rax, rsi <- *** used here ***
ret