summaryrefslogtreecommitdiffstats
path: root/mlir/test/Transforms
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-11-20 15:23:52 -0800
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-11-20 15:53:19 -0800
commitfafb708b9a0bb4adbdcba0cd7a7cdacf55211696 (patch)
tree999632ad5284848ab0d4d8ae9765da598815d346 /mlir/test/Transforms
parentd6a70b31be42d2c41b7fc7e8ecc4c803deb867c5 (diff)
downloadbcm5719-llvm-fafb708b9a0bb4adbdcba0cd7a7cdacf55211696.tar.gz
bcm5719-llvm-fafb708b9a0bb4adbdcba0cd7a7cdacf55211696.zip
Merge DCE and unreachable block elimination into a new utility 'simplifyRegions'.
This moves the different canonicalizations of regions into one place and invokes them in the fixed-point iteration of the canonicalizer. PiperOrigin-RevId: 281617072
Diffstat (limited to 'mlir/test/Transforms')
-rw-r--r--mlir/test/Transforms/canonicalize-dce.mlir (renamed from mlir/test/Transforms/dce.mlir)10
1 files changed, 5 insertions, 5 deletions
diff --git a/mlir/test/Transforms/dce.mlir b/mlir/test/Transforms/canonicalize-dce.mlir
index 7bdeadd1ef1..5d0da2167fc 100644
--- a/mlir/test/Transforms/dce.mlir
+++ b/mlir/test/Transforms/canonicalize-dce.mlir
@@ -1,4 +1,4 @@
-// RUN: mlir-opt %s -split-input-file -pass-pipeline='func(dce)' | FileCheck %s --dump-input=fail
+// RUN: mlir-opt %s -split-input-file -pass-pipeline='func(canonicalize)' | FileCheck %s --dump-input=fail
// Test case: Simple case of deleting a dead pure op.
@@ -15,12 +15,12 @@ func @f(%arg0: f32) {
// Test case: Simple case of deleting a block argument.
// CHECK: func @f(%arg0: f32)
-// CHECK-NEXT: br ^bb1
+// CHECK-NEXT: "test.br"()[^bb1]
// CHECK-NEXT: ^bb1:
// CHECK-NEXT: return
func @f(%arg0: f32) {
- br ^succ(%arg0: f32)
+ "test.br"()[^succ(%arg0: f32)] : () -> ()
^succ(%0: f32):
return
}
@@ -141,7 +141,7 @@ func @f(%arg0: f32) {
// Test case: Test the mechanics of deleting multiple block arguments.
// CHECK: func @f(%arg0: tensor<1xf32>, %arg1: tensor<2xf32>, %arg2: tensor<3xf32>, %arg3: tensor<4xf32>, %arg4: tensor<5xf32>)
-// CHECK-NEXT: br ^bb1(%arg1, %arg3 : tensor<2xf32>, tensor<4xf32>)
+// CHECK-NEXT: "test.br"()[^bb1(%arg1, %arg3 : tensor<2xf32>, tensor<4xf32>)
// CHECK-NEXT: ^bb1([[VAL0:%.+]]: tensor<2xf32>, [[VAL1:%.+]]: tensor<4xf32>):
// CHECK-NEXT: "foo.print"([[VAL0]])
// CHECK-NEXT: "foo.print"([[VAL1]])
@@ -154,7 +154,7 @@ func @f(
%arg2: tensor<3xf32>,
%arg3: tensor<4xf32>,
%arg4: tensor<5xf32>) {
- br ^succ(%arg0, %arg1, %arg2, %arg3, %arg4: tensor<1xf32>, tensor<2xf32>, tensor<3xf32>, tensor<4xf32>, tensor<5xf32>)
+ "test.br"()[^succ(%arg0, %arg1, %arg2, %arg3, %arg4 : tensor<1xf32>, tensor<2xf32>, tensor<3xf32>, tensor<4xf32>, tensor<5xf32>)] : () -> ()
^succ(%t1: tensor<1xf32>, %t2: tensor<2xf32>, %t3: tensor<3xf32>, %t4: tensor<4xf32>, %t5: tensor<5xf32>):
"foo.print"(%t2) : (tensor<2xf32>) -> ()
"foo.print"(%t4) : (tensor<4xf32>) -> ()
OpenPOWER on IntegriCloud