since the VT is fixed for a ImmLeaf, there is no reason to expose it to the matching...
authorChris Lattner <sabre@nondot.org>
Sun, 17 Apr 2011 22:17:27 +0000 (22:17 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 17 Apr 2011 22:17:27 +0000 (22:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129677 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetSelectionDAG.td
utils/TableGen/CodeGenDAGPatterns.cpp

index f7fac7afa3e5b43f41a99a767eb6f5a541bd89ec..552dc84864c500a7106574b514c0ced7f2eeb51a 100644 (file)
@@ -532,8 +532,7 @@ class PatLeaf<dag frag, code pred = [{}], SDNodeXForm xform = NOOP_SDNodeXForm>
 
 // 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<i16, [{ return (char)Imm == Imm; }]>;
 //
index 13ac6b15ba3ff1892d2968d3316cd4ab34200c5f..a08cde60fb2a9e2451ccc77634dc69a4dc3a8dd0 100644 (file)
@@ -657,8 +657,6 @@ std::string TreePredicateFn::getCodeToRunOnSDNode() const {
   if (!ImmCode.empty()) {
     std::string Result =
       "    int64_t Imm = cast<ConstantSDNode>(Node)->getSExtValue();\n";
-    if (ImmCode.find("VT") != std::string::npos)
-      Result += "    MVT VT = Node->getValueType(0).getSimpleVT();\n";
     return Result + ImmCode;
   }