[llvm] 26e2e9f - [TableGen] [tests] Change integer ranges to use new '...' punctuation
Paul C. Anagnostopoulos via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 07:48:06 PDT 2020
Author: Paul C. Anagnostopoulos
Date: 2020-10-26T10:47:29-04:00
New Revision: 26e2e9f2de7efdfb843a5440e7a94c4e919efd7a
URL: https://github.com/llvm/llvm-project/commit/26e2e9f2de7efdfb843a5440e7a94c4e919efd7a
DIFF: https://github.com/llvm/llvm-project/commit/26e2e9f2de7efdfb843a5440e7a94c4e919efd7a.diff
LOG: [TableGen] [tests] Change integer ranges to use new '...' punctuation
Differential Revision: https://reviews.llvm.org/D90057
Added:
Modified:
llvm/test/TableGen/Common/reg-with-subregs-common.td
llvm/test/TableGen/FixedLenDecoderEmitter/InitValue.td
llvm/test/TableGen/FixedLenDecoderEmitter/conflict.td
llvm/unittests/TableGen/Automata.td
Removed:
################################################################################
diff --git a/llvm/test/TableGen/Common/reg-with-subregs-common.td b/llvm/test/TableGen/Common/reg-with-subregs-common.td
index cb8ada4b26647..438523fb6780f 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<int N> {
#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 2ed3f1343b4b1..f0f7b00af825b 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 a9a95bc05a327..a8290a57e3210 100644
--- a/llvm/test/TableGen/FixedLenDecoderEmitter/conflict.td
+++ b/llvm/test/TableGen/FixedLenDecoderEmitter/conflict.td
@@ -21,11 +21,11 @@ class I<dag OOps, dag IOps, list<dag> 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 80671e5e61cbe..96f44e5f35cbd 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<bits<2> 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<bits<2> 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<bits<2> State, SymKindTy S> : Transition {
- let NewState{1-0} = State;
+ let NewState{1...0} = State;
SymKindTy A = S;
}
More information about the llvm-commits
mailing list