AMDGPU: Fix machine sink crash on an undef SGPR operand (#216721)
isSafeToSink dereferenced the defining instruction of an
SGPR use without checking for a null def, which crashes on
an undef operand that has no defining instruction.
Found by AI while working on something else.
Co-authored-by: Claude (Opus 4.8) <noreply@anthropic.com>