summaryrefslogtreecommitdiff
path: root/test/TableGen
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2017-08-24 18:54:16 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2017-08-24 18:54:16 +0000
commita8273d02129daf60471c6d7c0f272314b862aba5 (patch)
treed9ebe5dbf475949ba89c10dc4a87e879dd9b23c0 /test/TableGen
parente34366cdd68f725ca5850a2c0d1a9cc9ef4e9f00 (diff)
[globalisel][tablegen] Predicates should start from GIPFP_Invalid+1 not GIPFP_Invalid
This fixes a warning when there are zero defined predicates and also fixes an unnoticed bug where the first predicate in the table was unusable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/TableGen')
-rw-r--r--test/TableGen/GlobalISelEmitter.td3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/TableGen/GlobalISelEmitter.td b/test/TableGen/GlobalISelEmitter.td
index ddfb4f8744a..4364f8645b8 100644
--- a/test/TableGen/GlobalISelEmitter.td
+++ b/test/TableGen/GlobalISelEmitter.td
@@ -111,10 +111,11 @@ def HasC : Predicate<"Subtarget->hasC()"> { let RecomputePerFunction = 1; }
// CHECK-LABEL: // PatFrag predicates.
// CHECK-NEXT: enum {
-// CHECK-NEXT: GIPFP_Predicate_simm8 = GIPFP_Invalid,
+// CHECK-NEXT: GIPFP_Predicate_simm8 = GIPFP_Invalid + 1,
// CHECK-NEXT: };
// CHECK-NEXT: static bool Predicate_simm8(int64_t Imm) { return isInt<8>(Imm); }
// CHECK-NEXT: static InstructionSelector::ImmediatePredicateFn ImmPredicateFns[] = {
+// CHECK-NEXT: nullptr,
// CHECK-NEXT: Predicate_simm8,
// CHECK-NEXT: };