summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-08-26 18:50:00 +0000
committerOwen Anderson <resistor@mac.com>2008-08-26 18:50:00 +0000
commit70647e81e320245f02f003f6403d0222f5951c52 (patch)
treedd1ef88e6cc3feb5a9a1642cbee4777ecb2e3feb /utils
parent940f83e772ca2007d62faffc83094bd7e8da6401 (diff)
downloadllvm-70647e81e320245f02f003f6403d0222f5951c52.tar.gz
llvm-70647e81e320245f02f003f6403d0222f5951c52.tar.bz2
llvm-70647e81e320245f02f003f6403d0222f5951c52.tar.xz
We need to check that the return type is correct, even in cases where we don't
have a return type that differs from the operand types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55376 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/FastISelEmitter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/TableGen/FastISelEmitter.cpp b/utils/TableGen/FastISelEmitter.cpp
index c9978e5311..20b39c6089 100644
--- a/utils/TableGen/FastISelEmitter.cpp
+++ b/utils/TableGen/FastISelEmitter.cpp
@@ -437,6 +437,9 @@ void FastISelEmitter::run(std::ostream &OS) {
Operands.PrintParameters(OS);
OS << ") {\n";
+ OS << " if (RetVT != " << getName(RM.begin()->first)
+ << ")\n return 0;\n";
+
const PredMap &PM = RM.begin()->second;
bool HasPred = false;