[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp
Evan Cheng
evan.cheng at apple.com
Fri Jan 27 14:13:57 PST 2006
Changes in directory llvm/utils/TableGen:
DAGISelEmitter.cpp updated: 1.145 -> 1.146
---
Log message:
(store (op (load ...)), ...)
If store's chain operand is load, then use load's chain operand instead. If
it isn't (likely a TokenFactor), then do not allow the folding.
---
Diffs of the changes: (+10 -3)
DAGISelEmitter.cpp | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.145 llvm/utils/TableGen/DAGISelEmitter.cpp:1.146
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.145 Thu Jan 26 17:08:55 2006
+++ llvm/utils/TableGen/DAGISelEmitter.cpp Fri Jan 27 16:13:45 2006
@@ -1931,9 +1931,16 @@
<< ".getValue(" << CInfo.getNumResults() << "))) goto P"
<< PatternNo << "Fail; // Already selected for a chain use?\n";
}
- if (NodeHasChain && !FoundChain) {
- OS << " SDOperand Chain = " << RootName << ".getOperand(0);\n";
- FoundChain = true;
+ if (NodeHasChain) {
+ if (!FoundChain) {
+ OS << " SDOperand Chain = " << RootName << ".getOperand(0);\n";
+ FoundChain = true;
+ } else {
+ OS << " if (Chain.Val == " << RootName << ".Val)\n";
+ OS << " Chain = " << RootName << ".getOperand(0);\n";
+ OS << " else\n";
+ OS << " goto P" << PatternNo << "Fail;\n";
+ }
}
}
More information about the llvm-commits
mailing list