[AMDGPU] Fix crash in SIOptimizeExecMaskingPreRA
authorJay Foad <jay.foad@amd.com>
Wed, 30 Mar 2022 15:26:47 +0000 (16:26 +0100)
committerJay Foad <jay.foad@amd.com>
Wed, 20 Apr 2022 13:42:48 +0000 (14:42 +0100)
commit879ac4108979a617d502aad520b7282f0f29ce56
tree8af738b0107dd671b526a34fe002378f8fc7e31c
parentbea5e88bcf5908b676da35fb8c64f9f8449ba73b
[AMDGPU] Fix crash in SIOptimizeExecMaskingPreRA

When folding a COPY of exec into another COPY, the call to
TII->isOperandLegal would crash because COPYs don't have defined
register classes for their operands.

Differential Revision: https://reviews.llvm.org/D122737
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/test/CodeGen/AMDGPU/atomic-optimizer-strict-wqm.ll [new file with mode: 0644]