From 8012b077dd4d1c88e0221448c67147324c4e00cf Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 5 Jul 2007 07:19:29 +0000 Subject: Instructions with ImmutablePredicateOperand aren't really predicable since their predicates are fixed at isel time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37899 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/CodeGenTarget.cpp | 5 ++++- utils/TableGen/InstrInfoEmitter.cpp | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'utils/TableGen') diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp index c54ecd0..e4d80ee 100644 --- a/utils/TableGen/CodeGenTarget.cpp +++ b/utils/TableGen/CodeGenTarget.cpp @@ -411,7 +411,10 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr) if (unsigned NumArgs = MIOpInfo->getNumArgs()) NumOps = NumArgs; - isPredicable |= Rec->isSubClassOf("PredicateOperand"); + if (Rec->isSubClassOf("PredicateOperand")) { + if (!Rec->getValueAsBit("isImmutable")) + isPredicable = true; + } } else if (Rec->getName() == "variable_ops") { hasVariableNumberOfOperands = true; continue; diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp index af01e4c..a57770d 100644 --- a/utils/TableGen/InstrInfoEmitter.cpp +++ b/utils/TableGen/InstrInfoEmitter.cpp @@ -107,7 +107,8 @@ InstrInfoEmitter::GetOperandInfo(const CodeGenInstruction &Inst) { // Predicate operands. Check to see if the original unexpanded operand // was of type PredicateOperand. - if (Inst.OperandList[i].Rec->isSubClassOf("PredicateOperand")) + if (Inst.OperandList[i].Rec->isSubClassOf("PredicateOperand") && + !Inst.OperandList[i].Rec->getValueAsBit("isImmutable")) Res += "|M_PREDICATE_OPERAND"; // Fill in constraint info. -- cgit v1.1