Skip to content

Commit 87958eb

Browse files
committed
Change tests from negative to non-positive
1 parent 46d9010 commit 87958eb

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

mlir/test/Dialect/Vector/invalid.mlir

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,9 +1309,9 @@ func.func @store_memref_index_mismatch(%base : memref<?xf32>, %value : vector<16
13091309
// vector.maskedload
13101310
//===----------------------------------------------------------------------===//
13111311

1312-
func.func @maskedload_negative_alignment(%base: memref<4xi32>, %mask: vector<32xi1>, %pass: vector<1xi32>, %index: index) {
1312+
func.func @maskedload_nonpositive_alignment(%base: memref<4xi32>, %mask: vector<32xi1>, %pass: vector<1xi32>, %index: index) {
13131313
// expected-error@below {{'vector.maskedload' op attribute 'alignment' failed to satisfy constraint: 64-bit signless integer attribute whose value is positive and whose value is a power of two > 0}}
1314-
%val = vector.maskedload %base[%index], %mask, %pass { alignment = -1 } : memref<4xi32>, vector<32xi1>, vector<1xi32> into vector<1xi32>
1314+
%val = vector.maskedload %base[%index], %mask, %pass { alignment = 0 } : memref<4xi32>, vector<32xi1>, vector<1xi32> into vector<1xi32>
13151315
return
13161316
}
13171317

@@ -1360,9 +1360,9 @@ func.func @maskedload_memref_mismatch(%base: memref<?xf32>, %mask: vector<16xi1>
13601360
// vector.maskedstore
13611361
//===----------------------------------------------------------------------===//
13621362

1363-
func.func @maskedstore_negative_alignment(%base: memref<4xi32>, %mask: vector<32xi1>, %value: vector<1xi32>, %index: index) {
1363+
func.func @maskedstore_nonpositive_alignment(%base: memref<4xi32>, %mask: vector<32xi1>, %value: vector<1xi32>, %index: index) {
13641364
// expected-error@below {{'vector.maskedstore' op attribute 'alignment' failed to satisfy constraint: 64-bit signless integer attribute whose value is positive and whose value is a power of two > 0}}
1365-
vector.maskedstore %base[%index], %mask, %value { alignment = -1 } : memref<4xi32>, vector<32xi1>, vector<1xi32> into vector<1xi32>
1365+
vector.maskedstore %base[%index], %mask, %value { alignment = 0 } : memref<4xi32>, vector<32xi1>, vector<1xi32> into vector<1xi32>
13661366
return
13671367
}
13681368

@@ -1470,11 +1470,11 @@ func.func @gather_pass_thru_type_mismatch(%base: memref<?xf32>, %indices: vector
14701470

14711471
// -----
14721472

1473-
func.func @gather_negative_alignment(%base: memref<16xf32>, %indices: vector<16xi32>,
1473+
func.func @gather_nonpositive_alignment(%base: memref<16xf32>, %indices: vector<16xi32>,
14741474
%mask: vector<16xi1>, %pass_thru: vector<16xf32>, %c0 : index) {
14751475
// expected-error@+2 {{'vector.gather' op attribute 'alignment' failed to satisfy constraint: 64-bit signless integer attribute whose value is positive and whose value is a power of two > 0}}
14761476
%0 = vector.gather %base[%c0][%indices], %mask, %pass_thru
1477-
{ alignment = -1 } : memref<16xf32>, vector<16xi32>, vector<16xi1>, vector<16xf32> into vector<16xf32>
1477+
{ alignment = 0 } : memref<16xf32>, vector<16xi32>, vector<16xi1>, vector<16xf32> into vector<16xf32>
14781478
}
14791479

14801480
// -----
@@ -1549,10 +1549,10 @@ func.func @scatter_dim_mask_mismatch(%base: memref<?xf32>, %indices: vector<16xi
15491549

15501550
// -----
15511551

1552-
func.func @scatter_negative_alignment(%base: memref<?xf32>, %indices: vector<16xi32>,
1552+
func.func @scatter_nonpositive_alignment(%base: memref<?xf32>, %indices: vector<16xi32>,
15531553
%mask: vector<16xi1>, %value: vector<16xf32>, %c0: index) {
15541554
// expected-error@+1 {{'vector.scatter' op attribute 'alignment' failed to satisfy constraint: 64-bit signless integer attribute whose value is positive and whose value is a power of two > 0}}
1555-
vector.scatter %base[%c0][%indices], %mask, %value { alignment = -1 }
1555+
vector.scatter %base[%c0][%indices], %mask, %value { alignment = 0 }
15561556
: memref<?xf32>, vector<16xi32>, vector<16xi1>, vector<16xf32>
15571557
}
15581558

@@ -1607,9 +1607,9 @@ func.func @expand_memref_mismatch(%base: memref<?x?xf32>, %mask: vector<16xi1>,
16071607

16081608
// -----
16091609

1610-
func.func @expand_negative_alignment(%base: memref<?xf32>, %mask: vector<16xi1>, %pass_thru: vector<16xf32>, %c0: index) {
1610+
func.func @expand_nonpositive_alignment(%base: memref<?xf32>, %mask: vector<16xi1>, %pass_thru: vector<16xf32>, %c0: index) {
16111611
// expected-error@+1 {{'vector.expandload' op attribute 'alignment' failed to satisfy constraint: 64-bit signless integer attribute whose value is positive and whose value is a power of two > 0}}
1612-
%0 = vector.expandload %base[%c0], %mask, %pass_thru { alignment = -1 } : memref<?xf32>, vector<16xi1>, vector<16xf32> into vector<16xf32>
1612+
%0 = vector.expandload %base[%c0], %mask, %pass_thru { alignment = 0 } : memref<?xf32>, vector<16xi1>, vector<16xf32> into vector<16xf32>
16131613
}
16141614

16151615
// -----
@@ -1653,9 +1653,9 @@ func.func @compress_memref_mismatch(%base: memref<?x?xf32>, %mask: vector<16xi1>
16531653

16541654
// -----
16551655

1656-
func.func @compress_negative_alignment(%base: memref<?xf32>, %mask: vector<16xi1>, %value: vector<16xf32>, %c0: index) {
1656+
func.func @compress_nonpositive_alignment(%base: memref<?xf32>, %mask: vector<16xi1>, %value: vector<16xf32>, %c0: index) {
16571657
// expected-error @below {{'vector.compressstore' op attribute 'alignment' failed to satisfy constraint: 64-bit signless integer attribute whose value is positive and whose value is a power of two > 0}}
1658-
vector.compressstore %base[%c0], %mask, %value { alignment = -1 } : memref<?xf32>, vector<16xi1>, vector<16xf32>
1658+
vector.compressstore %base[%c0], %mask, %value { alignment = 0 } : memref<?xf32>, vector<16xi1>, vector<16xf32>
16591659
}
16601660

16611661
// -----
@@ -2016,9 +2016,9 @@ func.func @vector_load(%src : memref<?xi8>) {
20162016

20172017
// -----
20182018

2019-
func.func @load_negative_alignment(%memref: memref<4xi32>, %c0: index) {
2019+
func.func @load_nonpositive_alignment(%memref: memref<4xi32>, %c0: index) {
20202020
// expected-error @below {{'vector.load' op attribute 'alignment' failed to satisfy constraint: 64-bit signless integer attribute whose value is positive and whose value is a power of two > 0}}
2021-
%val = vector.load %memref[%c0] { alignment = -1 } : memref<4xi32>, vector<4xi32>
2021+
%val = vector.load %memref[%c0] { alignment = 0 } : memref<4xi32>, vector<4xi32>
20222022
return
20232023
}
20242024

@@ -2045,9 +2045,9 @@ func.func @vector_store(%dest : memref<?xi8>, %vec : vector<16x16xi8>) {
20452045

20462046
// -----
20472047

2048-
func.func @store_negative_alignment(%memref: memref<4xi32>, %val: vector<4xi32>, %c0: index) {
2048+
func.func @store_nonpositive_alignment(%memref: memref<4xi32>, %val: vector<4xi32>, %c0: index) {
20492049
// expected-error @below {{'vector.store' op attribute 'alignment' failed to satisfy constraint: 64-bit signless integer attribute whose value is positive and whose value is a power of two > 0}}
2050-
vector.store %val, %memref[%c0] { alignment = -1 } : memref<4xi32>, vector<4xi32>
2050+
vector.store %val, %memref[%c0] { alignment = 0 } : memref<4xi32>, vector<4xi32>
20512051
return
20522052
}
20532053

0 commit comments

Comments
 (0)