Make negative immediates in patterns work correctly, silence some warnings
authorChris Lattner <sabre@nondot.org>
Sat, 29 Oct 2005 16:39:40 +0000 (16:39 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 29 Oct 2005 16:39:40 +0000 (16:39 +0000)
building the itanium backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24095 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/DAGISelEmitter.cpp

index fb52355bee121095b989270170ac8124e6261942..2fc324dff6fd57e5c96439eb806ce2b3321bed80 100644 (file)
@@ -1592,7 +1592,7 @@ void DAGISelEmitter::EmitMatchForPattern(TreePatternNode *N,
       } else if (IntInit *II = dynamic_cast<IntInit*>(Child->getLeafValue())) {
         OS << "      if (!isa<ConstantSDNode>(" << RootName << i << ") ||\n"
            << "          cast<ConstantSDNode>(" << RootName << i
-           << ")->getValue() != " << II->getValue() << ")\n"
+           << ")->getSignExtended() != " << II->getValue() << ")\n"
            << "        goto P" << PatternNo << "Fail;\n";
       } else {
         Child->dump();