[llvm] 8f79856 - [AMDGPU] SIFoldOperands: use isUseMIInFoldList. NFC.

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 6 09:53:54 PDT 2021


Author: Jay Foad
Date: 2021-04-06T17:53:48+01:00
New Revision: 8f798566a3988491b8ff4d2e77cff5063e2fc92f

URL: https://github.com/llvm/llvm-project/commit/8f798566a3988491b8ff4d2e77cff5063e2fc92f
DIFF: https://github.com/llvm/llvm-project/commit/8f798566a3988491b8ff4d2e77cff5063e2fc92f.diff

LOG: [AMDGPU] SIFoldOperands: use isUseMIInFoldList. NFC.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SIFoldOperands.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp b/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
index 3857d3ebaa96..c3ff29b6fe9c 100644
--- a/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
@@ -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();


        


More information about the llvm-commits mailing list