Skip to content

Commit e8b7f53

Browse files
authored
[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: llvm#113732
1 parent ef455e6 commit e8b7f53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2461,7 +2461,8 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
24612461
ValueTypeByHwMode VVT = TP.getInfer().getConcrete(Types[0], false);
24622462
for (auto &P : VVT) {
24632463
MVT::SimpleValueType VT = P.second.SimpleTy;
2464-
if (VT == MVT::iPTR || VT == MVT::iPTRAny)
2464+
// Can only check for types of a known size
2465+
if (VT == MVT::iPTR)
24652466
continue;
24662467
unsigned Size = MVT(VT).getFixedSizeInBits();
24672468
// Make sure that the value is representable for this type.

0 commit comments

Comments
 (0)