[llvm] [SelectionDAG] Add instantiated OPC_CheckType (PR #73283)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 11 13:10:40 PST 2023
================
@@ -578,9 +578,16 @@ EmitMatcher(const Matcher *N, const unsigned Indent, unsigned CurrentIdx,
case Matcher::CheckType:
if (cast<CheckTypeMatcher>(N)->getResNo() == 0) {
- OS << "OPC_CheckType, "
- << getEnumName(cast<CheckTypeMatcher>(N)->getType()) << ",\n";
- return 2;
+ MVT::SimpleValueType VT = cast<CheckTypeMatcher>(N)->getType();
+ switch (VT) {
+ case MVT::i32:
+ case MVT::i64:
+ OS << "OPC_CheckTypeI" << MVT(VT).getScalarSizeInBits() << ",\n";
----------------
topperc wrote:
You can use getSizeInBits() here.
https://github.com/llvm/llvm-project/pull/73283
More information about the llvm-commits
mailing list