[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp
Evan Cheng
evan.cheng at apple.com
Tue May 8 14:04:26 PDT 2007
Changes in directory llvm/utils/TableGen:
DAGISelEmitter.cpp updated: 1.294 -> 1.295
---
Log message:
If a PredicateOperand has an empty ExecuteAlways field, treat it as if a normal operand for isel.
---
Diffs of the changes: (+9 -4)
DAGISelEmitter.cpp | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.294 llvm/utils/TableGen/DAGISelEmitter.cpp:1.295
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.294 Thu Apr 26 12:03:22 2007
+++ llvm/utils/TableGen/DAGISelEmitter.cpp Tue May 8 16:04:07 2007
@@ -775,8 +775,10 @@
Record *OperandNode = Inst.getOperand(i);
// If the instruction expects a predicate operand, we codegen this by
- // setting the predicate to it's "execute always" value.
- if (OperandNode->isSubClassOf("PredicateOperand"))
+ // setting the predicate to it's "execute always" value if it has a
+ // non-empty ExecuteAlways field.
+ if (OperandNode->isSubClassOf("PredicateOperand") &&
+ !ISE.getPredicateOperand(OperandNode).AlwaysOps.empty())
continue;
// Verify that we didn't run out of provided operands.
@@ -2801,8 +2803,11 @@
InstOpNo != II.OperandList.size(); ++InstOpNo) {
std::vector<std::string> Ops;
- // If this is a normal operand, emit it.
- if (!II.OperandList[InstOpNo].Rec->isSubClassOf("PredicateOperand")) {
+ // If this is a normal operand or a predicate operand without
+ // 'execute always', emit it.
+ Record *OperandNode = II.OperandList[InstOpNo].Rec;
+ if (!OperandNode->isSubClassOf("PredicateOperand") ||
+ ISE.getPredicateOperand(OperandNode).AlwaysOps.empty()) {
Ops = EmitResultCode(N->getChild(ChildNo), RetSelected,
InFlagDecled, ResNodeDecled);
AllOps.insert(AllOps.end(), Ops.begin(), Ops.end());
More information about the llvm-commits
mailing list