From 26e2e9f2de7efdfb843a5440e7a94c4e919efd7a Mon Sep 17 00:00:00 2001 From: "Paul C. Anagnostopoulos" Date: Fri, 23 Oct 2020 13:36:57 -0400 Subject: [PATCH] [TableGen] [tests] Change integer ranges to use new '...' punctuation Differential Revision: https://reviews.llvm.org/D90057 --- llvm/test/TableGen/Common/reg-with-subregs-common.td | 4 ++-- llvm/test/TableGen/FixedLenDecoderEmitter/InitValue.td | 6 +++--- llvm/test/TableGen/FixedLenDecoderEmitter/conflict.td | 4 ++-- llvm/unittests/TableGen/Automata.td | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/llvm/test/TableGen/Common/reg-with-subregs-common.td b/llvm/test/TableGen/Common/reg-with-subregs-common.td index cb8ada4b2664..438523fb6780 100644 --- a/llvm/test/TableGen/Common/reg-with-subregs-common.td +++ b/llvm/test/TableGen/Common/reg-with-subregs-common.td @@ -19,7 +19,7 @@ class Indexes { #ifdef USE_NAMESPACE let Namespace = "TestNamespace" in { #endif -foreach Index = 0-31 in { +foreach Index = 0...31 in { def sub#Index : SubRegIndex<32, !shl(Index, 5)>; } @@ -35,7 +35,7 @@ foreach Size = {2,4,8,16} in { } } -foreach Index = 0-255 in { +foreach Index = 0...255 in { def R#Index : Register <"r"#Index>; } #ifdef USE_NAMESPACE diff --git a/llvm/test/TableGen/FixedLenDecoderEmitter/InitValue.td b/llvm/test/TableGen/FixedLenDecoderEmitter/InitValue.td index 2ed3f1343b4b..f0f7b00af825 100644 --- a/llvm/test/TableGen/FixedLenDecoderEmitter/InitValue.td +++ b/llvm/test/TableGen/FixedLenDecoderEmitter/InitValue.td @@ -16,7 +16,7 @@ def foo : Instruction { field bits<16> SoftFail = 0; bits<8> factor; let factor{0} = 0; // zero initial value - let Inst{15-8} = factor{7-0}; + let Inst{15...8} = factor{7...0}; } def bar : Instruction { @@ -25,7 +25,7 @@ def bar : Instruction { field bits<16> SoftFail = 0; bits<8> factor; let factor{0} = 1; // non-zero initial value - let Inst{15-8} = factor{7-0}; + let Inst{15...8} = factor{7...0}; } def bax : Instruction { @@ -34,7 +34,7 @@ def bax : Instruction { field bits<16> SoftFail = 0; bits<33> factor; let factor{32} = 1; // non-zero initial value - let Inst{15-8} = factor{32-25}; + let Inst{15...8} = factor{32...25}; } } diff --git a/llvm/test/TableGen/FixedLenDecoderEmitter/conflict.td b/llvm/test/TableGen/FixedLenDecoderEmitter/conflict.td index a9a95bc05a32..a8290a57e321 100644 --- a/llvm/test/TableGen/FixedLenDecoderEmitter/conflict.td +++ b/llvm/test/TableGen/FixedLenDecoderEmitter/conflict.td @@ -21,11 +21,11 @@ class I Pat> def A : I<(outs GPR32:$dst), (ins GPR32:$src1), []> { let Size = 4; - let Inst{31-0} = 0; + let Inst{31...0} = 0; } def B : I<(outs GPR32:$dst), (ins GPR32:$src1), []> { let Size = 4; - let Inst{31-0} = 0; + let Inst{31...0} = 0; } // CHECK: Decoding Conflict: diff --git a/llvm/unittests/TableGen/Automata.td b/llvm/unittests/TableGen/Automata.td index 80671e5e61cb..96f44e5f35cb 100644 --- a/llvm/unittests/TableGen/Automata.td +++ b/llvm/unittests/TableGen/Automata.td @@ -15,7 +15,7 @@ def SymKind : GenericEnum { // Define a transition implementation. class SimpleTransition State, SymKindTy A> : Transition { - let NewState{1-0} = State; + let NewState{1...0} = State; SymKindTy ActionSym = A; } @@ -38,7 +38,7 @@ def SimpleAutomaton : GenericAutomaton { // Define a transition implementation. class TupleTransition State, SymKindTy s1, SymKindTy s2, string s3> : Transition { - let NewState{1-0} = State; + let NewState{1...0} = State; SymKindTy S1 = s1; SymKindTy S2 = s2; string S3 = s3; @@ -59,7 +59,7 @@ def TupleAutomaton : GenericAutomaton { // NfaAutomaton test implementation class NfaTransition State, SymKindTy S> : Transition { - let NewState{1-0} = State; + let NewState{1...0} = State; SymKindTy A = S; }