diff options
| author | Manuel Freiberger <manuel.freiberger@gmail.com> | 2019-12-22 10:01:35 -0800 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-12-22 10:02:13 -0800 |
| commit | 22954a0e408afde1d8686dffb3a3dcab107a2cd3 (patch) | |
| tree | d206709d143fb15efd807a2c601035668fcae7b2 /mlir/test/Transforms | |
| parent | dcc14f08656a82aadd326aeca54b95b5b866fc86 (diff) | |
| download | bcm5719-llvm-22954a0e408afde1d8686dffb3a3dcab107a2cd3.tar.gz bcm5719-llvm-22954a0e408afde1d8686dffb3a3dcab107a2cd3.zip | |
Add integer bit-shift operations to the standard dialect.
Rename the 'shlis' operation in the standard dialect to 'shift_left'. Add tests
for this operation (these have been missing so far) and add a lowering to the
'shl' operation in the LLVM dialect.
Add also 'shift_right_signed' (lowered to LLVM's 'ashr') and 'shift_right_unsigned'
(lowered to 'lshr').
The original plan was to name these operations 'shift.left', 'shift.right.signed'
and 'shift.right.unsigned'. This works if the operations are prefixed with 'std.'
in MLIR assembly. Unfortunately during import the short form is ambigous with
operations from a hypothetical 'shift' dialect. The best solution seems to omit
dots in standard operations for now.
Closes tensorflow/mlir#226
PiperOrigin-RevId: 286803388
Diffstat (limited to 'mlir/test/Transforms')
| -rw-r--r-- | mlir/test/Transforms/canonicalize.mlir | 12 | ||||
| -rw-r--r-- | mlir/test/Transforms/constant-fold.mlir | 68 | ||||
| -rw-r--r-- | mlir/test/Transforms/loop-coalescing.mlir | 32 | ||||
| -rw-r--r-- | mlir/test/Transforms/lower-affine.mlir | 6 | ||||
| -rw-r--r-- | mlir/test/Transforms/parametric-tiling.mlir | 16 |
5 files changed, 67 insertions, 67 deletions
diff --git a/mlir/test/Transforms/canonicalize.mlir b/mlir/test/Transforms/canonicalize.mlir index 07a7e7cad05..09db0889655 100644 --- a/mlir/test/Transforms/canonicalize.mlir +++ b/mlir/test/Transforms/canonicalize.mlir @@ -576,7 +576,7 @@ func @lowered_affine_mod() -> (index, index) { // CHECK-NEXT: {{.*}} = constant 41 : index %c-43 = constant -43 : index %c42 = constant 42 : index - %0 = remis %c-43, %c42 : index + %0 = remi_signed %c-43, %c42 : index %c0 = constant 0 : index %1 = cmpi "slt", %0, %c0 : index %2 = addi %0, %c42 : index @@ -584,7 +584,7 @@ func @lowered_affine_mod() -> (index, index) { // CHECK-NEXT: {{.*}} = constant 1 : index %c43 = constant 43 : index %c42_0 = constant 42 : index - %4 = remis %c43, %c42_0 : index + %4 = remi_signed %c43, %c42_0 : index %c0_1 = constant 0 : index %5 = cmpi "slt", %4, %c0_1 : index %6 = addi %4, %c42_0 : index @@ -607,7 +607,7 @@ func @lowered_affine_floordiv() -> (index, index) { %0 = cmpi "slt", %c-43, %c0 : index %1 = subi %c-1, %c-43 : index %2 = select %0, %1, %c-43 : index - %3 = divis %2, %c42 : index + %3 = divi_signed %2, %c42 : index %4 = subi %c-1, %3 : index %5 = select %0, %4, %3 : index // CHECK-NEXT: %c1 = constant 1 : index @@ -618,7 +618,7 @@ func @lowered_affine_floordiv() -> (index, index) { %6 = cmpi "slt", %c43, %c0_1 : index %7 = subi %c-1_2, %c43 : index %8 = select %6, %7, %c43 : index - %9 = divis %8, %c42_0 : index + %9 = divi_signed %8, %c42_0 : index %10 = subi %c-1_2, %9 : index %11 = select %6, %10, %9 : index return %5, %11 : index, index @@ -640,7 +640,7 @@ func @lowered_affine_ceildiv() -> (index, index) { %1 = subi %c0, %c-43 : index %2 = subi %c-43, %c1 : index %3 = select %0, %1, %2 : index - %4 = divis %3, %c42 : index + %4 = divi_signed %3, %c42 : index %5 = subi %c0, %4 : index %6 = addi %4, %c1 : index %7 = select %0, %5, %6 : index @@ -653,7 +653,7 @@ func @lowered_affine_ceildiv() -> (index, index) { %9 = subi %c0_1, %c43 : index %10 = subi %c43, %c1_2 : index %11 = select %8, %9, %10 : index - %12 = divis %11, %c42_0 : index + %12 = divi_signed %11, %c42_0 : index %13 = subi %c0_1, %12 : index %14 = addi %12, %c1_2 : index %15 = select %8, %13, %14 : index diff --git a/mlir/test/Transforms/constant-fold.mlir b/mlir/test/Transforms/constant-fold.mlir index b45fec665ef..a24aad2847a 100644 --- a/mlir/test/Transforms/constant-fold.mlir +++ b/mlir/test/Transforms/constant-fold.mlir @@ -212,8 +212,8 @@ func @mulf_splat_tensor() -> tensor<4xf32> { // ----- -// CHECK-LABEL: func @simple_divis -func @simple_divis() -> (i32, i32, i32) { +// CHECK-LABEL: func @simple_divi_signed +func @simple_divi_signed() -> (i32, i32, i32) { // CHECK-DAG: [[C0:%.+]] = constant 0 %z = constant 0 : i32 // CHECK-DAG: [[C6:%.+]] = constant 6 @@ -221,15 +221,15 @@ func @simple_divis() -> (i32, i32, i32) { %1 = constant 2 : i32 // CHECK-NEXT: [[C3:%.+]] = constant 3 : i32 - %2 = divis %0, %1 : i32 + %2 = divi_signed %0, %1 : i32 %3 = constant -2 : i32 // CHECK-NEXT: [[CM3:%.+]] = constant -3 : i32 - %4 = divis %0, %3 : i32 + %4 = divi_signed %0, %3 : i32 - // CHECK-NEXT: [[XZ:%.+]] = divis [[C6]], [[C0]] - %5 = divis %0, %z : i32 + // CHECK-NEXT: [[XZ:%.+]] = divi_signed [[C6]], [[C0]] + %5 = divi_signed %0, %z : i32 // CHECK-NEXT: return [[C3]], [[CM3]], [[XZ]] return %2, %4, %5 : i32, i32, i32 @@ -237,8 +237,8 @@ func @simple_divis() -> (i32, i32, i32) { // ----- -// CHECK-LABEL: func @divis_splat_tensor -func @divis_splat_tensor() -> (tensor<4xi32>, tensor<4xi32>, tensor<4xi32>) { +// CHECK-LABEL: func @divi_signed_splat_tensor +func @divi_signed_splat_tensor() -> (tensor<4xi32>, tensor<4xi32>, tensor<4xi32>) { // CHECK-DAG: [[C0:%.+]] = constant dense<0> %z = constant dense<0> : tensor<4xi32> // CHECK-DAG: [[C6:%.+]] = constant dense<6> @@ -246,15 +246,15 @@ func @divis_splat_tensor() -> (tensor<4xi32>, tensor<4xi32>, tensor<4xi32>) { %1 = constant dense<2> : tensor<4xi32> // CHECK-NEXT: [[C3:%.+]] = constant dense<3> : tensor<4xi32> - %2 = divis %0, %1 : tensor<4xi32> + %2 = divi_signed %0, %1 : tensor<4xi32> %3 = constant dense<-2> : tensor<4xi32> // CHECK-NEXT: [[CM3:%.+]] = constant dense<-3> : tensor<4xi32> - %4 = divis %0, %3 : tensor<4xi32> + %4 = divi_signed %0, %3 : tensor<4xi32> - // CHECK-NEXT: [[XZ:%.+]] = divis [[C6]], [[C0]] - %5 = divis %0, %z : tensor<4xi32> + // CHECK-NEXT: [[XZ:%.+]] = divi_signed [[C6]], [[C0]] + %5 = divi_signed %0, %z : tensor<4xi32> // CHECK-NEXT: return [[C3]], [[CM3]], [[XZ]] return %2, %4, %5 : tensor<4xi32>, tensor<4xi32>, tensor<4xi32> @@ -262,24 +262,24 @@ func @divis_splat_tensor() -> (tensor<4xi32>, tensor<4xi32>, tensor<4xi32>) { // ----- -// CHECK-LABEL: func @simple_diviu -func @simple_diviu() -> (i32, i32, i32) { +// CHECK-LABEL: func @simple_divi_unsigned +func @simple_divi_unsigned() -> (i32, i32, i32) { %z = constant 0 : i32 // CHECK-DAG: [[C6:%.+]] = constant 6 %0 = constant 6 : i32 %1 = constant 2 : i32 // CHECK-DAG: [[C3:%.+]] = constant 3 : i32 - %2 = diviu %0, %1 : i32 + %2 = divi_unsigned %0, %1 : i32 %3 = constant -2 : i32 // Unsigned division interprets -2 as 2^32-2, so the result is 0. // CHECK-DAG: [[C0:%.+]] = constant 0 : i32 - %4 = diviu %0, %3 : i32 + %4 = divi_unsigned %0, %3 : i32 - // CHECK-NEXT: [[XZ:%.+]] = diviu [[C6]], [[C0]] - %5 = diviu %0, %z : i32 + // CHECK-NEXT: [[XZ:%.+]] = divi_unsigned [[C6]], [[C0]] + %5 = divi_unsigned %0, %z : i32 // CHECK-NEXT: return [[C3]], [[C0]], [[XZ]] return %2, %4, %5 : i32, i32, i32 @@ -288,24 +288,24 @@ func @simple_diviu() -> (i32, i32, i32) { // ----- -// CHECK-LABEL: func @diviu_splat_tensor -func @diviu_splat_tensor() -> (tensor<4xi32>, tensor<4xi32>, tensor<4xi32>) { +// CHECK-LABEL: func @divi_unsigned_splat_tensor +func @divi_unsigned_splat_tensor() -> (tensor<4xi32>, tensor<4xi32>, tensor<4xi32>) { %z = constant dense<0> : tensor<4xi32> // CHECK-DAG: [[C6:%.+]] = constant dense<6> %0 = constant dense<6> : tensor<4xi32> %1 = constant dense<2> : tensor<4xi32> // CHECK-DAG: [[C3:%.+]] = constant dense<3> : tensor<4xi32> - %2 = diviu %0, %1 : tensor<4xi32> + %2 = divi_unsigned %0, %1 : tensor<4xi32> %3 = constant dense<-2> : tensor<4xi32> // Unsigned division interprets -2 as 2^32-2, so the result is 0. // CHECK-DAG: [[C0:%.+]] = constant dense<0> : tensor<4xi32> - %4 = diviu %0, %3 : tensor<4xi32> + %4 = divi_unsigned %0, %3 : tensor<4xi32> - // CHECK-NEXT: [[XZ:%.+]] = diviu [[C6]], [[C0]] - %5 = diviu %0, %z : tensor<4xi32> + // CHECK-NEXT: [[XZ:%.+]] = divi_unsigned [[C6]], [[C0]] + %5 = divi_unsigned %0, %z : tensor<4xi32> // CHECK-NEXT: return [[C3]], [[C0]], [[XZ]] return %2, %4, %5 : tensor<4xi32>, tensor<4xi32>, tensor<4xi32> @@ -313,18 +313,18 @@ func @diviu_splat_tensor() -> (tensor<4xi32>, tensor<4xi32>, tensor<4xi32>) { // ----- -// CHECK-LABEL: func @simple_remis -func @simple_remis(%a : i32) -> (i32, i32, i32) { +// CHECK-LABEL: func @simple_remi_signed +func @simple_remi_signed(%a : i32) -> (i32, i32, i32) { %0 = constant 5 : i32 %1 = constant 2 : i32 %2 = constant 1 : i32 %3 = constant -2 : i32 // CHECK-NEXT:[[C1:%.+]] = constant 1 : i32 - %4 = remis %0, %1 : i32 - %5 = remis %0, %3 : i32 + %4 = remi_signed %0, %1 : i32 + %5 = remi_signed %0, %3 : i32 // CHECK-NEXT:[[C0:%.+]] = constant 0 : i32 - %6 = remis %a, %2 : i32 + %6 = remi_signed %a, %2 : i32 // CHECK-NEXT: return [[C1]], [[C1]], [[C0]] : i32, i32, i32 return %4, %5, %6 : i32, i32, i32 @@ -332,19 +332,19 @@ func @simple_remis(%a : i32) -> (i32, i32, i32) { // ----- -// CHECK-LABEL: func @simple_remiu -func @simple_remiu(%a : i32) -> (i32, i32, i32) { +// CHECK-LABEL: func @simple_remi_unsigned +func @simple_remi_unsigned(%a : i32) -> (i32, i32, i32) { %0 = constant 5 : i32 %1 = constant 2 : i32 %2 = constant 1 : i32 %3 = constant -2 : i32 // CHECK-DAG:[[C1:%.+]] = constant 1 : i32 - %4 = remiu %0, %1 : i32 + %4 = remi_unsigned %0, %1 : i32 // CHECK-DAG:[[C5:%.+]] = constant 5 : i32 - %5 = remiu %0, %3 : i32 + %5 = remi_unsigned %0, %3 : i32 // CHECK-DAG:[[C0:%.+]] = constant 0 : i32 - %6 = remiu %a, %2 : i32 + %6 = remi_unsigned %a, %2 : i32 // CHECK-NEXT: return [[C1]], [[C5]], [[C0]] : i32, i32, i32 return %4, %5, %6 : i32, i32, i32 diff --git a/mlir/test/Transforms/loop-coalescing.mlir b/mlir/test/Transforms/loop-coalescing.mlir index 45e2b5d07fc..d10cf19543e 100644 --- a/mlir/test/Transforms/loop-coalescing.mlir +++ b/mlir/test/Transforms/loop-coalescing.mlir @@ -26,10 +26,10 @@ func @one_3d_nest() { // CHECK-NOT: loop.for // Reconstruct original IVs from the linearized one. - // CHECK: %[[orig_k:.*]] = remis %[[i]], %[[orig_ub_k]] - // CHECK: %[[div:.*]] = divis %[[i]], %[[orig_ub_k]] - // CHECK: %[[orig_j:.*]] = remis %[[div]], %[[orig_ub_j]] - // CHECK: %[[orig_i:.*]] = divis %[[div]], %[[orig_ub_j]] + // CHECK: %[[orig_k:.*]] = remi_signed %[[i]], %[[orig_ub_k]] + // CHECK: %[[div:.*]] = divi_signed %[[i]], %[[orig_ub_k]] + // CHECK: %[[orig_j:.*]] = remi_signed %[[div]], %[[orig_ub_j]] + // CHECK: %[[orig_i:.*]] = divi_signed %[[div]], %[[orig_ub_j]] loop.for %j = %c0 to %c56 step %c1 { loop.for %k = %c0 to %c3 step %c1 { // CHECK: "use"(%[[orig_i]], %[[orig_j]], %[[orig_k]]) @@ -52,10 +52,10 @@ func @multi_use() { loop.for %i = %c1 to %c10 step %c1 { loop.for %j = %c1 to %c10 step %c1 { loop.for %k = %c1 to %c10 step %c1 { - // CHECK: %[[k_unshifted:.*]] = remis %[[iv]], %[[k_extent:.*]] - // CHECK: %[[ij:.*]] = divis %[[iv]], %[[k_extent]] - // CHECK: %[[j_unshifted:.*]] = remis %[[ij]], %[[j_extent:.*]] - // CHECK: %[[i_unshifted:.*]] = divis %[[ij]], %[[j_extent]] + // CHECK: %[[k_unshifted:.*]] = remi_signed %[[iv]], %[[k_extent:.*]] + // CHECK: %[[ij:.*]] = divi_signed %[[iv]], %[[k_extent]] + // CHECK: %[[j_unshifted:.*]] = remi_signed %[[ij]], %[[j_extent:.*]] + // CHECK: %[[i_unshifted:.*]] = divi_signed %[[ij]], %[[j_extent]] // CHECK: %[[k:.*]] = addi %[[k_unshifted]] // CHECK: %[[j:.*]] = addi %[[j_unshifted]] // CHECK: %[[i:.*]] = addi %[[i_unshifted]] @@ -91,7 +91,7 @@ func @unnormalized_loops() { // CHECK: %[[c1:.*]] = constant 1 // CHECK: %[[step_minus_c1:.*]] = subi %[[orig_step_i]], %[[c1]] // CHECK: %[[dividend:.*]] = addi %[[diff_i]], %[[step_minus_c1]] - // CHECK: %[[numiter_i:.*]] = divis %[[dividend]], %[[orig_step_i]] + // CHECK: %[[numiter_i:.*]] = divi_signed %[[dividend]], %[[orig_step_i]] // Normalized lower bound and step for the outer loop. // CHECK: %[[lb_i:.*]] = constant 0 @@ -99,7 +99,7 @@ func @unnormalized_loops() { // Number of iterations in the inner loop, the pattern is the same as above, // only capture the final result. - // CHECK: %[[numiter_j:.*]] = divis {{.*}}, %[[orig_step_j]] + // CHECK: %[[numiter_j:.*]] = divi_signed {{.*}}, %[[orig_step_j]] // New bounds of the outer loop. // CHECK: %[[range:.*]] = muli %[[numiter_i]], %[[numiter_j]] @@ -109,8 +109,8 @@ func @unnormalized_loops() { // CHECK-NOT: loop.for loop.for %j = %c7 to %c17 step %c3 { // The IVs are rewritten. - // CHECK: %[[normalized_j:.*]] = remis %[[i]], %[[numiter_j]] - // CHECK: %[[normalized_i:.*]] = divis %[[i]], %[[numiter_j]] + // CHECK: %[[normalized_j:.*]] = remi_signed %[[i]], %[[numiter_j]] + // CHECK: %[[normalized_i:.*]] = divi_signed %[[i]], %[[numiter_j]] // CHECK: %[[scaled_j:.*]] = muli %[[normalized_j]], %[[orig_step_j]] // CHECK: %[[orig_j:.*]] = addi %[[scaled_j]], %[[orig_lb_j]] // CHECK: %[[scaled_i:.*]] = muli %[[normalized_i]], %[[orig_step_i]] @@ -137,11 +137,11 @@ func @parametric(%lb1 : index, %ub1 : index, %step1 : index, // CHECK: %[[range1:.*]] = subi %[[orig_ub1]], %[[orig_lb1]] // CHECK: %[[orig_step1_minus_1:.*]] = subi %[[orig_step1]], %c1 // CHECK: %[[dividend1:.*]] = addi %[[range1]], %[[orig_step1_minus_1]] - // CHECK: %[[numiter1:.*]] = divis %[[dividend1]], %[[orig_step1]] + // CHECK: %[[numiter1:.*]] = divi_signed %[[dividend1]], %[[orig_step1]] // CHECK: %[[range2:.*]] = subi %[[orig_ub2]], %[[orig_lb2]] // CHECK: %[[orig_step2_minus_1:.*]] = subi %arg5, %c1 // CHECK: %[[dividend2:.*]] = addi %[[range2]], %[[orig_step2_minus_1]] - // CHECK: %[[numiter2:.*]] = divis %[[dividend2]], %[[orig_step2]] + // CHECK: %[[numiter2:.*]] = divi_signed %[[dividend2]], %[[orig_step2]] // CHECK: %[[range:.*]] = muli %[[numiter1]], %[[numiter2]] : index // Check that the outer loop is updated. @@ -151,8 +151,8 @@ func @parametric(%lb1 : index, %ub1 : index, %step1 : index, // CHECK-NOT: loop.for loop.for %j = %lb2 to %ub2 step %step2 { // Remapping of the induction variables. - // CHECK: %[[normalized_j:.*]] = remis %[[i]], %[[numiter2]] : index - // CHECK: %[[normalized_i:.*]] = divis %[[i]], %[[numiter2]] : index + // CHECK: %[[normalized_j:.*]] = remi_signed %[[i]], %[[numiter2]] : index + // CHECK: %[[normalized_i:.*]] = divi_signed %[[i]], %[[numiter2]] : index // CHECK: %[[scaled_j:.*]] = muli %[[normalized_j]], %[[orig_step2]] // CHECK: %[[orig_j:.*]] = addi %[[scaled_j]], %[[orig_lb2]] // CHECK: %[[scaled_i:.*]] = muli %[[normalized_i]], %[[orig_step1]] diff --git a/mlir/test/Transforms/lower-affine.mlir b/mlir/test/Transforms/lower-affine.mlir index dac35578808..1c3de885adf 100644 --- a/mlir/test/Transforms/lower-affine.mlir +++ b/mlir/test/Transforms/lower-affine.mlir @@ -452,7 +452,7 @@ func @args_ret_affine_apply(index, index) -> (index, index) { // CHECK-LABEL: func @affine_apply_mod func @affine_apply_mod(%arg0 : index) -> (index) { // CHECK-NEXT: %[[c42:.*]] = constant 42 : index -// CHECK-NEXT: %[[v0:.*]] = remis %{{.*}}, %[[c42]] : index +// CHECK-NEXT: %[[v0:.*]] = remi_signed %{{.*}}, %[[c42]] : index // CHECK-NEXT: %[[c0:.*]] = constant 0 : index // CHECK-NEXT: %[[v1:.*]] = cmpi "slt", %[[v0]], %[[c0]] : index // CHECK-NEXT: %[[v2:.*]] = addi %[[v0]], %[[c42]] : index @@ -476,7 +476,7 @@ func @affine_apply_floordiv(%arg0 : index) -> (index) { // CHECK-NEXT: %[[v0:.*]] = cmpi "slt", %{{.*}}, %[[c0]] : index // CHECK-NEXT: %[[v1:.*]] = subi %[[cm1]], %{{.*}} : index // CHECK-NEXT: %[[v2:.*]] = select %[[v0]], %[[v1]], %{{.*}} : index -// CHECK-NEXT: %[[v3:.*]] = divis %[[v2]], %[[c42]] : index +// CHECK-NEXT: %[[v3:.*]] = divi_signed %[[v2]], %[[c42]] : index // CHECK-NEXT: %[[v4:.*]] = subi %[[cm1]], %[[v3]] : index // CHECK-NEXT: %[[v5:.*]] = select %[[v0]], %[[v4]], %[[v3]] : index %0 = affine.apply #mapfloordiv (%arg0) @@ -499,7 +499,7 @@ func @affine_apply_ceildiv(%arg0 : index) -> (index) { // CHECK-NEXT: %[[v1:.*]] = subi %[[c0]], %{{.*}} : index // CHECK-NEXT: %[[v2:.*]] = subi %{{.*}}, %[[c1]] : index // CHECK-NEXT: %[[v3:.*]] = select %[[v0]], %[[v1]], %[[v2]] : index -// CHECK-NEXT: %[[v4:.*]] = divis %[[v3]], %[[c42]] : index +// CHECK-NEXT: %[[v4:.*]] = divi_signed %[[v3]], %[[c42]] : index // CHECK-NEXT: %[[v5:.*]] = subi %[[c0]], %[[v4]] : index // CHECK-NEXT: %[[v6:.*]] = addi %[[v4]], %[[c1]] : index // CHECK-NEXT: %[[v7:.*]] = select %[[v0]], %[[v5]], %[[v6]] : index diff --git a/mlir/test/Transforms/parametric-tiling.mlir b/mlir/test/Transforms/parametric-tiling.mlir index 2e715fd3176..afa33cb07c1 100644 --- a/mlir/test/Transforms/parametric-tiling.mlir +++ b/mlir/test/Transforms/parametric-tiling.mlir @@ -12,11 +12,11 @@ func @rectangular(%arg0: memref<?x?xf32>) { // COMMON: %[[diff:.*]] = subi %c44, %c2 // COMMON: %[[adjustment:.*]] = subi %c1, %c1_{{.*}} // COMMON-NEXT: %[[diff_adj:.*]] = addi %[[diff]], %[[adjustment]] - // COMMON-NEXT: %[[range:.*]] = divis %[[diff_adj]], %c1 + // COMMON-NEXT: %[[range:.*]] = divi_signed %[[diff_adj]], %c1 // Ceildiv to get the parametric tile size. // COMMON: %[[sum:.*]] = addi %[[range]], %c6 - // COMMON-NEXT: %[[size:.*]] = divis %[[sum]], %c7 + // COMMON-NEXT: %[[size:.*]] = divi_signed %[[sum]], %c7 // New outer step (original is %c1). // COMMON-NEXT: %[[step:.*]] = muli %c1, %[[size]] @@ -26,11 +26,11 @@ func @rectangular(%arg0: memref<?x?xf32>) { // TILE_74: %[[diff2:.*]] = subi %c44, %c1 // TILE_74: %[[adjustment2:.*]] = subi %c2, %c1_{{.*}} // TILE_74-NEXT: %[[diff2_adj:.*]] = addi %[[diff2]], %[[adjustment2]] - // TILE_74-NEXT: %[[range2:.*]] = divis %[[diff2_adj]], %c2 + // TILE_74-NEXT: %[[range2:.*]] = divi_signed %[[diff2_adj]], %c2 // Ceildiv to get the parametric tile size for the second original loop. // TILE_74: %[[sum2:.*]] = addi %[[range2]], %c3 - // TILE_74-NEXT: %[[size2:.*]] = divis %[[sum2]], %c4 + // TILE_74-NEXT: %[[size2:.*]] = divi_signed %[[sum2]], %c4 // New inner step (original is %c2). // TILE_74-NEXT: %[[step2:.*]] = muli %c2, %[[size2]] @@ -76,11 +76,11 @@ func @triangular(%arg0: memref<?x?xf32>) { // COMMON: %[[diff:.*]] = subi %c44, %c2 // COMMON: %[[adjustment:.*]] = subi %c1, %c1_{{.*}} // COMMON-NEXT: %[[diff_adj:.*]] = addi %[[diff]], %[[adjustment]] - // COMMON-NEXT: %[[range:.*]] = divis %[[diff_adj]], %c1 + // COMMON-NEXT: %[[range:.*]] = divi_signed %[[diff_adj]], %c1 // Ceildiv to get the parametric tile size. // COMMON: %[[sum:.*]] = addi %[[range]], %c6 - // COMMON-NEXT: %[[size:.*]] = divis %[[sum]], %c7 + // COMMON-NEXT: %[[size:.*]] = divi_signed %[[sum]], %c7 // New outer step (original is %c1). // COMMON-NEXT: %[[step:.*]] = muli %c1, %[[size]] @@ -95,11 +95,11 @@ func @triangular(%arg0: memref<?x?xf32>) { // where step is known to be %c2. // TILE_74: %[[diff2:.*]] = subi %[[i]], %c1 // TILE_74-NEXT: %[[diff2_adj:.*]] = addi %[[diff2]], %[[adjustment2]] - // TILE_74-NEXT: %[[range2:.*]] = divis %[[diff2_adj]], %c2 + // TILE_74-NEXT: %[[range2:.*]] = divi_signed %[[diff2_adj]], %c2 // Ceildiv to get the parametric tile size for the second original loop. // TILE_74: %[[sum2:.*]] = addi %[[range2]], %c3 - // TILE_74-NEXT: %[[size2:.*]] = divis %[[sum2]], %c4 + // TILE_74-NEXT: %[[size2:.*]] = divi_signed %[[sum2]], %c4 // New inner step (original is %c2). // TILE_74-NEXT: %[[step2:.*]] = muli %c2, %[[size2]] |

