[llvm] 5c94dd7 - [X86][AMX] Avoid to construct invalid shape for checking, NFCI (#105973)

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 24 23:01:36 PDT 2024


Author: Phoebe Wang
Date: 2024-08-25T14:01:32+08:00
New Revision: 5c94dd73b2df1f6b469e858ff29055ac117e8494

URL: https://github.com/llvm/llvm-project/commit/5c94dd73b2df1f6b469e858ff29055ac117e8494
DIFF: https://github.com/llvm/llvm-project/commit/5c94dd73b2df1f6b469e858ff29055ac117e8494.diff

LOG: [X86][AMX] Avoid to construct invalid shape for checking, NFCI (#105973)

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/VirtRegMap.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/VirtRegMap.h b/llvm/include/llvm/CodeGen/VirtRegMap.h
index 42e8d294a637ad..864eb23e133ebd 100644
--- a/llvm/include/llvm/CodeGen/VirtRegMap.h
+++ b/llvm/include/llvm/CodeGen/VirtRegMap.h
@@ -114,7 +114,7 @@ class TargetInstrInfo;
     bool isShapeMapEmpty() const { return Virt2ShapeMap.empty(); }
 
     bool hasShape(Register virtReg) const {
-      return getShape(virtReg).isValid();
+      return Virt2ShapeMap.contains(virtReg);
     }
 
     ShapeT getShape(Register virtReg) const {


        


More information about the llvm-commits mailing list