forked from OSchip/llvm-project
Clean up some stray mlfunc/cfgfunc leftovers.
PiperOrigin-RevId: 237936610
This commit is contained in:
parent
fde5bcdae7
commit
8d62a6092f
|
@ -8,14 +8,6 @@ func @test_subi_zero(%arg0: i32) -> i32 {
|
|||
return %y: i32
|
||||
}
|
||||
|
||||
// CHECK-LABEL: func @test_subi_zero_cfg(%arg0: i32)
|
||||
func @test_subi_zero_cfg(%arg0: i32) -> i32 {
|
||||
// CHECK-NEXT: %c0_i32 = constant 0 : i32
|
||||
// CHECK-NEXT: return %c0
|
||||
%y = subi %arg0, %arg0 : i32
|
||||
return %y: i32
|
||||
}
|
||||
|
||||
// CHECK-LABEL: func @dim
|
||||
func @dim(%arg0: tensor<8x4xf32>) -> index {
|
||||
|
||||
|
|
|
@ -3,18 +3,8 @@
|
|||
// CHECK-DAG: #map0 = (d0) -> (d0 mod 2)
|
||||
#map0 = (d0) -> (d0 mod 2)
|
||||
|
||||
// CHECK-LABEL: @simple_constant_ml
|
||||
func @simple_constant_ml() -> (i32, i32) {
|
||||
// CHECK: %c1_i32 = constant 1 : i32
|
||||
%0 = constant 1 : i32
|
||||
%1 = constant 1 : i32
|
||||
|
||||
// CHECK-NEXT: return %c1_i32, %c1_i32 : i32, i32
|
||||
return %0, %1 : i32, i32
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @simple_constant_cfg
|
||||
func @simple_constant_cfg() -> (i32, i32) {
|
||||
// CHECK-LABEL: @simple_constant
|
||||
func @simple_constant() -> (i32, i32) {
|
||||
// CHECK-NEXT: %c1_i32 = constant 1 : i32
|
||||
%0 = constant 1 : i32
|
||||
|
||||
|
@ -23,8 +13,8 @@ func @simple_constant_cfg() -> (i32, i32) {
|
|||
return %0, %1 : i32, i32
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @basic_ml
|
||||
func @basic_ml() -> (index, index) {
|
||||
// CHECK-LABEL: @basic
|
||||
func @basic() -> (index, index) {
|
||||
// CHECK: %c0 = constant 0 : index
|
||||
%c0 = constant 0 : index
|
||||
%c1 = constant 0 : index
|
||||
|
@ -37,8 +27,8 @@ func @basic_ml() -> (index, index) {
|
|||
return %0, %1 : index, index
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @many_cfg
|
||||
func @many_cfg(f32, f32) -> (f32) {
|
||||
// CHECK-LABEL: @many
|
||||
func @many(f32, f32) -> (f32) {
|
||||
^bb0(%a : f32, %b : f32):
|
||||
// CHECK-NEXT: %0 = addf %arg0, %arg1 : f32
|
||||
%c = addf %a, %b : f32
|
||||
|
@ -63,8 +53,8 @@ func @many_cfg(f32, f32) -> (f32) {
|
|||
}
|
||||
|
||||
/// Check that operations are not eliminated if they have different operands.
|
||||
// CHECK-LABEL: @different_ops_ml
|
||||
func @different_ops_ml() -> (i32, i32) {
|
||||
// CHECK-LABEL: @different_ops
|
||||
func @different_ops() -> (i32, i32) {
|
||||
// CHECK: %c0_i32 = constant 0 : i32
|
||||
// CHECK: %c1_i32 = constant 1 : i32
|
||||
%0 = constant 0 : i32
|
||||
|
@ -76,8 +66,8 @@ func @different_ops_ml() -> (i32, i32) {
|
|||
|
||||
/// Check that operations are not eliminated if they have different result
|
||||
/// types.
|
||||
// CHECK-LABEL: @different_results_ml
|
||||
func @different_results_ml(%arg0: tensor<*xf32>) -> (tensor<?x?xf32>, tensor<4x?xf32>) {
|
||||
// CHECK-LABEL: @different_results
|
||||
func @different_results(%arg0: tensor<*xf32>) -> (tensor<?x?xf32>, tensor<4x?xf32>) {
|
||||
// CHECK: %0 = tensor_cast %arg0 : tensor<*xf32> to tensor<?x?xf32>
|
||||
// CHECK-NEXT: %1 = tensor_cast %arg0 : tensor<*xf32> to tensor<4x?xf32>
|
||||
%0 = tensor_cast %arg0 : tensor<*xf32> to tensor<?x?xf32>
|
||||
|
@ -88,8 +78,8 @@ func @different_results_ml(%arg0: tensor<*xf32>) -> (tensor<?x?xf32>, tensor<4x?
|
|||
}
|
||||
|
||||
/// Check that operations are not eliminated if they have different attributes.
|
||||
// CHECK-LABEL: @different_attributes_cfg
|
||||
func @different_attributes_cfg(index, index) -> (i1, i1, i1) {
|
||||
// CHECK-LABEL: @different_attributes
|
||||
func @different_attributes(index, index) -> (i1, i1, i1) {
|
||||
^bb0(%a : index, %b : index):
|
||||
// CHECK: %0 = cmpi "slt", %arg0, %arg1 : index
|
||||
%0 = cmpi "slt", %a, %b : index
|
||||
|
@ -104,8 +94,8 @@ func @different_attributes_cfg(index, index) -> (i1, i1, i1) {
|
|||
}
|
||||
|
||||
/// Check that operations with side effects are not eliminated.
|
||||
// CHECK-LABEL: @side_effect_ml
|
||||
func @side_effect_ml() -> (memref<2x1xf32>, memref<2x1xf32>) {
|
||||
// CHECK-LABEL: @side_effect
|
||||
func @side_effect() -> (memref<2x1xf32>, memref<2x1xf32>) {
|
||||
// CHECK: %0 = alloc() : memref<2x1xf32>
|
||||
%0 = alloc() : memref<2x1xf32>
|
||||
|
||||
|
@ -118,8 +108,8 @@ func @side_effect_ml() -> (memref<2x1xf32>, memref<2x1xf32>) {
|
|||
|
||||
/// Check that operation definitions are properly propagated down the dominance
|
||||
/// tree.
|
||||
// CHECK-LABEL: @down_propagate_for_ml
|
||||
func @down_propagate_for_ml() {
|
||||
// CHECK-LABEL: @down_propagate_for
|
||||
func @down_propagate_for() {
|
||||
// CHECK: %c1_i32 = constant 1 : i32
|
||||
%0 = constant 1 : i32
|
||||
|
||||
|
@ -132,8 +122,8 @@ func @down_propagate_for_ml() {
|
|||
return
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @down_propagate_cfg
|
||||
func @down_propagate_cfg() -> i32 {
|
||||
// CHECK-LABEL: @down_propagate
|
||||
func @down_propagate() -> i32 {
|
||||
// CHECK-NEXT: %c1_i32 = constant 1 : i32
|
||||
%0 = constant 1 : i32
|
||||
|
||||
|
@ -153,8 +143,8 @@ func @down_propagate_cfg() -> i32 {
|
|||
}
|
||||
|
||||
/// Check that operation definitions are NOT propagated up the dominance tree.
|
||||
// CHECK-LABEL: @up_propagate_ml
|
||||
func @up_propagate_ml() -> i32 {
|
||||
// CHECK-LABEL: @up_propagate_for
|
||||
func @up_propagate_for() -> i32 {
|
||||
// CHECK: for %i0 = 0 to 4 {
|
||||
for %i = 0 to 4 {
|
||||
// CHECK-NEXT: %c1_i32 = constant 1 : i32
|
||||
|
@ -169,8 +159,8 @@ func @up_propagate_ml() -> i32 {
|
|||
return %1 : i32
|
||||
}
|
||||
|
||||
// CHECK-LABEL: func @up_propagate_cfg
|
||||
func @up_propagate_cfg() -> i32 {
|
||||
// CHECK-LABEL: func @up_propagate
|
||||
func @up_propagate() -> i32 {
|
||||
// CHECK-NEXT: %c0_i32 = constant 0 : i32
|
||||
%0 = constant 0 : i32
|
||||
|
||||
|
@ -200,8 +190,8 @@ func @up_propagate_cfg() -> i32 {
|
|||
|
||||
/// The same test as above except that we are testing on a cfg embedded within
|
||||
/// an operation region.
|
||||
// CHECK-LABEL: func @up_propagate_region_cfg
|
||||
func @up_propagate_region_cfg() -> i32 {
|
||||
// CHECK-LABEL: func @up_propagate_region
|
||||
func @up_propagate_region() -> i32 {
|
||||
// CHECK-NEXT: %0 = "foo.region"
|
||||
%0 = "foo.region"() : () -> (i32) {
|
||||
// CHECK-NEXT: %c0_i32 = constant 0 : i32
|
||||
|
|
Loading…
Reference in New Issue