[AMDGPU] SIFoldOperands: use isUseMIInFoldList. NFC.

This commit is contained in:
Jay Foad 2021-04-06 17:48:31 +01:00
parent dc8d63de5d
commit 8f798566a3
1 changed files with 1 additions and 3 deletions
llvm/lib/Target/AMDGPU

View File

@ -555,9 +555,7 @@ static bool tryToFoldACImm(const SIInstrInfo *TII,
if (!UseReg.isVirtual())
return false;
if (llvm::any_of(FoldList, [UseMI](const FoldCandidate &FC) {
return FC.UseMI == UseMI;
}))
if (isUseMIInFoldList(FoldList, UseMI))
return false;
MachineRegisterInfo &MRI = UseMI->getParent()->getParent()->getRegInfo();