[llvm-commits] [llvm] r129677 - in /llvm/trunk: include/llvm/Target/TargetSelectionDAG.td utils/TableGen/CodeGenDAGPatterns.cpp

Chris Lattner sabre at nondot.org
Sun Apr 17 15:17:27 PDT 2011


Author: lattner
Date: Sun Apr 17 17:17:27 2011
New Revision: 129677

URL: http://llvm.org/viewvc/llvm-project?rev=129677&view=rev
Log:
since the VT is fixed for a ImmLeaf, there is no reason to expose it to the matching code.

Modified:
    llvm/trunk/include/llvm/Target/TargetSelectionDAG.td
    llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp

Modified: llvm/trunk/include/llvm/Target/TargetSelectionDAG.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetSelectionDAG.td?rev=129677&r1=129676&r2=129677&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetSelectionDAG.td (original)
+++ llvm/trunk/include/llvm/Target/TargetSelectionDAG.td Sun Apr 17 17:17:27 2011
@@ -532,8 +532,7 @@
 
 // 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; }]>;
 //

Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=129677&r1=129676&r2=129677&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Sun Apr 17 17:17:27 2011
@@ -657,8 +657,6 @@
   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;
   }
   





More information about the llvm-commits mailing list