[llvm] [X86][AMX] Avoid to construct invalid shape for checking, NFCI (PR #105973)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 24 21:29:55 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-regalloc
Author: Phoebe Wang (phoebewang)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/105973.diff
1 Files Affected:
- (modified) llvm/include/llvm/CodeGen/VirtRegMap.h (+1-1)
``````````diff
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 {
``````````
</details>
https://github.com/llvm/llvm-project/pull/105973
More information about the llvm-commits
mailing list