32 changes: 16 additions & 16 deletions llvm/test/TableGen/foreach-variable-range.td
Original file line number Diff line number Diff line change
Expand Up @@ -13,92 +13,92 @@ def Constants : ConstantsImpl;
// CHECK-DAG: def var_bound_whitespaceA0
// CHECK-DAG: def var_bound_whitespaceA1
// CHECK-DAG: def var_bound_whitespaceA2
foreach Index = Constants.Zero - Constants.Two in {
foreach Index = Constants.Zero ... Constants.Two in {
def var_bound_whitespaceA#Index;
}

// CHECK-DAG: def var_bound_whitespaceB0
// CHECK-DAG: def var_bound_whitespaceB1
// CHECK-DAG: def var_bound_whitespaceB2
foreach Index = Constants.Zero-Constants.Two in {
foreach Index = Constants.Zero...Constants.Two in {
def var_bounds_whitespaceB#Index;
}

// CHECK-DAG: def var_bound_whitespaceC0
// CHECK-DAG: def var_bound_whitespaceC1
// CHECK-DAG: def var_bound_whitespaceC2
foreach Index = Constants.Zero -Constants.Two in {
foreach Index = Constants.Zero ...Constants.Two in {
def var_bounds_whitespaceC#Index;
}

// CHECK-DAG: def var_bound_whitespaceD0
// CHECK-DAG: def var_bound_whitespaceD1
// CHECK-DAG: def var_bound_whitespaceD2
foreach Index = Constants.Zero- Constants.Two in {
foreach Index = Constants.Zero... Constants.Two in {
def var_bounds_whitespaceD#Index;
}

// CHECK-DAG: def const_lower_whitespaceA0
// CHECK-DAG: def const_lower_whitespaceA1
// CHECK-DAG: def const_lower_whitespaceA2
foreach Index = 0 - Constants.Two in {
foreach Index = 0 ... Constants.Two in {
def const_lower_whitespaceA#Index;
}

// CHECK-DAG: def const_lower_whitespaceB0
// CHECK-DAG: def const_lower_whitespaceB1
// CHECK-DAG: def const_lower_whitespaceB2
foreach Index = 0-Constants.Two in {
foreach Index = 0...Constants.Two in {
def const_lower_whitespaceB#Index;
}

// CHECK-DAG: def const_lower_whitespaceC0
// CHECK-DAG: def const_lower_whitespaceC1
// CHECK-DAG: def const_lower_whitespaceC2
foreach Index = 0 -Constants.Two in {
foreach Index = 0 ...Constants.Two in {
def const_lower_whitespaceC#Index;
}

// CHECK-DAG: def const_lower_whitespaceD0
// CHECK-DAG: def const_lower_whitespaceD1
// CHECK-DAG: def const_lower_whitespaceD2
foreach Index = 0- Constants.Two in {
foreach Index = 0... Constants.Two in {
def const_lower_whitespaceD#Index;
}

// CHECK-DAG: def const_upper_whitespaceA0
// CHECK-DAG: def const_upper_whitespaceA1
// CHECK-DAG: def const_upper_whitespaceA2
foreach Index = Constants.Zero - 2 in {
foreach Index = Constants.Zero ... 2 in {
def const_upper_whitespaceA#Index;
}

// CHECK-DAG: def const_upper_whitespaceB0
// CHECK-DAG: def const_upper_whitespaceB1
// CHECK-DAG: def const_upper_whitespaceB2
foreach Index = Constants.Zero-2 in {
foreach Index = Constants.Zero...2 in {
def const_upper_whitespaceB#Index;
}

// CHECK-DAG: def const_upper_whitespaceC0
// CHECK-DAG: def const_upper_whitespaceC1
// CHECK-DAG: def const_upper_whitespaceC2
foreach Index = Constants.Zero -2 in {
foreach Index = Constants.Zero ...2 in {
def const_upper_whitespaceC#Index;
}

// CHECK-DAG: def const_upper_whitespaceD0
// CHECK-DAG: def const_upper_whitespaceD1
// CHECK-DAG: def const_upper_whitespaceD2
foreach Index = Constants.Zero- 2 in {
foreach Index = Constants.Zero... 2 in {
def const_upper_whitespaceD#Index;
}

// CHECK-DAG: def multi_rangeA0
// CHECK-DAG: def multi_rangeA1
// CHECK-DAG: def multi_rangeA2
// CHECK-DAG: def multi_rangeA3
foreach Index = {Constants.Zero-Constants.One, Constants.Two-Constants.Three} in {
foreach Index = {Constants.Zero...Constants.One, Constants.Two...Constants.Three} in {
def multi_rangeA#Index;
}

Expand All @@ -107,22 +107,22 @@ foreach Index = {Constants.Zero-Constants.One, Constants.Two-Constants.Three} in
// CHECK-DAG: def multi_rangeB3
// CHECK-DAG: def multi_rangeB4
// CHECK-DAG: def multi_rangeB5
foreach Index = {0-Constants.One, Constants.Three-Constants.Five} in {
foreach Index = {0...Constants.One, Constants.Three...Constants.Five} in {
def multi_rangeB#Index;
}

// CHECK-DAG: def multi_rangeC0
// CHECK-DAG: def multi_rangeC1
// CHECK-DAG: def multi_rangeC2
// CHECK-DAG: def multi_rangeC3
foreach Index = {0-Constants.One, 2-Constants.Three} in {
foreach Index = {0...Constants.One, 2...Constants.Three} in {
def multi_rangeC#Index;
}

// CHECK-DAG: def multi_rangeD0
// CHECK-DAG: def multi_rangeD1
// CHECK-DAG: def multi_rangeD2
// CHECK-DAG: def multi_rangeD3
foreach Index = {0-1, Constants.Two-3} in {
foreach Index = {0...1, Constants.Two...3} in {
def multi_rangeD#Index;
}
12 changes: 6 additions & 6 deletions llvm/test/TableGen/if.td
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ class C<bits<3> x, bits<4> y, bit z> {
!if(y{2}, x{0},
!if(y{1}, x{1},
!if(y{0}, x{2}, ?))));
let n{10-9}= !if(x{2}, y{3-2},
!if(x{1}, y{2-1},
!if(x{0}, y{1-0}, ?)));
let n{8-6} = !if(x{2}, 0b010, 0b110);
let n{5-4} = !if(x{1}, y{3-2}, {0, 1});
let n{3-0} = !if(x{0}, y{3-0}, {z, y{2}, y{1}, y{0}});
let n{10...9}= !if(x{2}, y{3...2},
!if(x{1}, y{2...1},
!if(x{0}, y{1...0}, ?)));
let n{8...6} = !if(x{2}, 0b010, 0b110);
let n{5...4} = !if(x{1}, y{3...2}, {0, 1});
let n{3...0} = !if(x{0}, y{3...0}, {z, y{2}, y{1}, y{0}});
}

def C1 : C<{1, 0, 1}, {0, 1, 0, 1}, 0>;
Expand Down
6 changes: 3 additions & 3 deletions llvm/test/TableGen/ifstmt.td
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if 1 then def aYes;
// CHECK: def bNotThree2
// CHECK: def bNotThree4
// CHECK: def bThree3
foreach i = 1-4 in {
foreach i = 1...4 in {
if !eq(i, 3) then {
def "bThree" # i;
} else {
Expand Down Expand Up @@ -61,8 +61,8 @@ defm c3: Multi<3>;
// CHECK-NOT: def dThenElse1
// CHECK-NOT: def dThenElse11
// CHECK: def dThenThen01
foreach i = 0-1 in
foreach j = 0-1 in
foreach i = 0...1 in
foreach j = 0...1 in
if !eq(i,0) then
if !eq(j,1) then
def "dThenThen"#i#j;
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/TableGen/list-element-bitref.td
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// XFAIL: vg_leak

class C<list<bits<4>> L> {
bits<2> V0 = L[0]{1-0};
bits<2> V1 = L[1]{3-2};
bits<2> V0 = L[0]{1...0};
bits<2> V1 = L[1]{3...2};
string V2 = !if(L[0]{0}, "Odd", "Even");
}

Expand Down
3 changes: 2 additions & 1 deletion llvm/test/TableGen/range-lists.td
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// RUN: llvm-tblgen %s | FileCheck %s
// XFAIL: vg_leak

// This file has tests for range lists and range pieces.
// This file has tests for range lists and range pieces. Some use the
// deprecated '-' range punctuation just to be sure it still works.

// These are tests for bits ranges.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/TableGen/simplify-patfrag.td
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def Demo : Target {
}

// Some registers which can hold ints or floats
foreach i = 0-7 in
foreach i = 0...7 in
def "R" # i: Register<"r" # i>;
def GPR : RegisterClass<"Demo", [i32, f32], 32, (sequence "R%u", 0, 7)>;

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/TableGen/trydecode-emission3.td
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def InstBOp : Operand<i32> {

def InstB : TestInstruction {
bits<2> op;
let Inst{7-2} = {0,0,0,0,0,0};
let Inst{1-0} = op;
let Inst{7...2} = {0,0,0,0,0,0};
let Inst{1...0} = op;
let OutOperandList = (outs InstBOp:$op);
let AsmString = "InstB";
}
Expand Down