]> granicus.if.org Git - llvm/commitdiff
Turn a TableGen FastISelEmitter warning into an error.
authorMichael Kuperstein <mkuper@google.com>
Mon, 30 Jan 2017 19:03:26 +0000 (19:03 +0000)
committerMichael Kuperstein <mkuper@google.com>
Mon, 30 Jan 2017 19:03:26 +0000 (19:03 +0000)
Tablegen emitted a warning when the fast isel emitter created dead
code by emitting a pattern that has no predicate before a pattern
that has one.

This should be an error but was originally only a warning because the X86
backend had a buggy definition that unintentionally caused this to be hit
(PR21575). That has been fixed a while ago (r222094), so it's safe to
upgrade the warning to an error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293534 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/FastISelEmitter.cpp

index 43c6a982633029f8267ab71a870caf1a183914f9..0e7b0dc09442d88eb94ead3082f2382a78fa696d 100644 (file)
@@ -1,4 +1,4 @@
-//===- FastISelEmitter.cpp - Generate an instruction selector -------------===//
+///===- FastISelEmitter.cpp - Generate an instruction selector -------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -640,12 +640,9 @@ void FastISelMap::emitInstructionCode(raw_ostream &OS,
       OneHadNoPredicate = true;
     } else {
       if (OneHadNoPredicate) {
-        // FIXME: This should be a PrintError once the x86 target
-        // fixes PR21575.
-        PrintWarning("Multiple instructions match and one with no "
-                     "predicate came before one with a predicate!  "
-                     "name:" + Memo.Name + "  predicate: " + 
-                     PredicateCheck);
+        PrintFatalError("Multiple instructions match and one with no "
+                        "predicate came before one with a predicate!  "
+                        "name:" + Memo.Name + "  predicate: " + PredicateCheck);
       }
       OS << "  if (" + PredicateCheck + ") {\n";
       OS << "  ";