[AMDGPU] Add missing physical register check in SIFoldOperands::tryFoldLoad
authorYashwant Singh <Yashwant.Singh@amd.com>
Tue, 24 Jan 2023 08:52:01 +0000 (14:22 +0530)
committerYashwant Singh <Yashwant.Singh@amd.com>
Tue, 24 Jan 2023 08:54:41 +0000 (14:24 +0530)
commit2a832d0f09f73faf46aae54ff73cdcd99a7bacf3
tree9f7edd82a17f78605dc312a03d546852da1d5051
parent01eb01c7fd7ad6f569ad4d7bf65b5327ac111955
[AMDGPU] Add missing physical register check in SIFoldOperands::tryFoldLoad

tryFoldLoad() is not meant to work on physical registers moreover
use_nodbg_instructions(reg) makes the compiler buggy when called with
physical reg

Fix for SWDEV-373493

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D141895
llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
llvm/test/CodeGen/AMDGPU/fold-vgpr-phyreg.mir [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/swdev373493.ll [new file with mode: 0644]