[AMDGPU] SIFoldOperands: use isUseMIInFoldList. NFC.
authorJay Foad <jay.foad@amd.com>
Tue, 6 Apr 2021 16:48:31 +0000 (17:48 +0100)
committerJay Foad <jay.foad@amd.com>
Tue, 6 Apr 2021 16:53:48 +0000 (17:53 +0100)
llvm/lib/Target/AMDGPU/SIFoldOperands.cpp

index 3857d3e..c3ff29b 100644 (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();