[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp
Jeff Cohen
jeffc at jolt-lang.org
Tue Jan 3 19:23:42 PST 2006
Changes in directory llvm/utils/TableGen:
DAGISelEmitter.cpp updated: 1.123 -> 1.124
---
Log message:
Replace fix with one less disruptive to the original code.
Also note that GCC 4.1 also correctly flags the syntax error.
---
Diffs of the changes: (+3 -4)
DAGISelEmitter.cpp | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.123 llvm/utils/TableGen/DAGISelEmitter.cpp:1.124
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.123 Tue Jan 3 21:15:19 2006
+++ llvm/utils/TableGen/DAGISelEmitter.cpp Tue Jan 3 21:23:30 2006
@@ -2030,13 +2030,12 @@
std::string Fn = CP->getSelectFunc();
NumRes = CP->getNumOperands();
OS << " SDOperand ";
- unsigned i;
- for (i = 0; i < NumRes - 1; ++i)
+ for (unsigned i = 0; i < NumRes - 1; ++i)
OS << "Tmp" << (i+ResNo) << ",";
- OS << "Tmp" << (i+ResNo) << ";\n";
+ OS << "Tmp" << (NumRes - 1 + ResNo) << ";\n";
OS << " if (!" << Fn << "(" << Val;
- for (i = 0; i < NumRes; i++)
+ for (unsigned i = 0; i < NumRes; i++)
OS << ", Tmp" << i + ResNo;
OS << ")) goto P" << PatternNo << "Fail;\n";
TmpNo = ResNo + NumRes;
More information about the llvm-commits
mailing list