diff options
author | Jessica Clarke <jrtc27@jrtc27.com> | 2024-10-30 03:19:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-30 03:19:53 +0000 |
commit | e8b7f53fa4dc8a9f74a3d67dfb89eb68fcd78679 (patch) | |
tree | a1b2e1fa8b606c04723b412b940b74ed0f011d94 /llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp | |
parent | ef455e6b16334128c008fc57a4d8ace701934e80 (diff) | |
download | llvm-e8b7f53fa4dc8a9f74a3d67dfb89eb68fcd78679.zip llvm-e8b7f53fa4dc8a9f74a3d67dfb89eb68fcd78679.tar.gz llvm-e8b7f53fa4dc8a9f74a3d67dfb89eb68fcd78679.tar.bz2 |
[TableGen] Remove a pointless check for iPTRAny
We've already called EnforceInteger on Types[0], and iPTRAny isn't
regarded as an integer type (note that TableGen special-cases iPTR here
to include that, though), so we cannot possibly still have an iPTRAny by
this point. Delete the check, and let getFixedSizeInBits catch it along
with all the other overloaded types if that ever becomes false. Also
document why we have this check whilst here.
Reviewers: arsenm
Reviewed By: arsenm
Pull Request: https://github.com/llvm/llvm-project/pull/113732
Diffstat (limited to 'llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp')
-rw-r--r-- | llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp index d2228c9..3446bfe 100644 --- a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp @@ -2461,7 +2461,8 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) { ValueTypeByHwMode VVT = TP.getInfer().getConcrete(Types[0], false); for (auto &P : VVT) { MVT::SimpleValueType VT = P.second.SimpleTy; - if (VT == MVT::iPTR || VT == MVT::iPTRAny) + // Can only check for types of a known size + if (VT == MVT::iPTR) continue; unsigned Size = MVT(VT).getFixedSizeInBits(); // Make sure that the value is representable for this type. |