[AMDGPU] Fix ubsan error
authorSebastian Neubauer <sebastian.neubauer@amd.com>
Mon, 12 Apr 2021 10:10:32 +0000 (12:10 +0200)
committerSebastian Neubauer <sebastian.neubauer@amd.com>
Mon, 12 Apr 2021 10:14:00 +0000 (12:14 +0200)
commit7a8e65dd3dfa72069471a316844b7a6c2ef89e84
tree6ada019c9bb295306affe187bae1219d4c4bac0f
parent428b17ce70523b1c54cb89095fed39e84f5ca8fc
[AMDGPU] Fix ubsan error

The RegScavenger can be null sometimes, so a pointer is needed.

Fixes UBSan error introduced in f9a8c6a0e505.
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp