aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp')
-rw-r--r--llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
index c8186d6..163a1a7 100644
--- a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
+++ b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
@@ -3056,6 +3056,14 @@ static bool SimplifyTree(TreePatternNodePtr &N) {
!N->getExtType(0).empty() &&
N->getExtType(0) == N->getChild(0).getExtType(0) &&
N->getName().empty()) {
+ if (!N->getPredicateCalls().empty()) {
+ std::string Str;
+ raw_string_ostream OS(Str);
+ OS << *N
+ << "\n trivial bitconvert node should not have predicate calls\n";
+ PrintFatalError(Str);
+ return false;
+ }
N = N->getChildShared(0);
SimplifyTree(N);
return true;