From 4447d6506cdae78037226ef52c0824a42cf6baa6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 17 Apr 2011 22:17:27 +0000 Subject: [PATCH] since the VT is fixed for a ImmLeaf, there is no reason to expose it to the matching code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129677 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetSelectionDAG.td | 3 +-- utils/TableGen/CodeGenDAGPatterns.cpp | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/llvm/Target/TargetSelectionDAG.td b/include/llvm/Target/TargetSelectionDAG.td index f7fac7afa3e..552dc84864c 100644 --- a/include/llvm/Target/TargetSelectionDAG.td +++ b/include/llvm/Target/TargetSelectionDAG.td @@ -532,8 +532,7 @@ class PatLeaf // ImmLeaf is a pattern fragment with a constraint on the immediate. The // constraint is a function that is run on the immediate (always with the value -// sign extended out to an int64_t) as Imm. The value type being matched is -// available as VT. For example: +// sign extended out to an int64_t) as Imm. For example: // // def immSExt8 : ImmLeaf; // diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index 13ac6b15ba3..a08cde60fb2 100644 --- a/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/utils/TableGen/CodeGenDAGPatterns.cpp @@ -657,8 +657,6 @@ std::string TreePredicateFn::getCodeToRunOnSDNode() const { if (!ImmCode.empty()) { std::string Result = " int64_t Imm = cast(Node)->getSExtValue();\n"; - if (ImmCode.find("VT") != std::string::npos) - Result += " MVT VT = Node->getValueType(0).getSimpleVT();\n"; return Result + ImmCode; }