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
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 @@
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;