@@ -609,17 +609,17 @@ func.func @redundantTest(%arg0: i32) -> i32 {
609
609
// Test either directive
610
610
//===----------------------------------------------------------------------===//
611
611
612
- // CHECK: @either_dag_leaf_only
613
- func.func @either_dag_leaf_only_1 (%arg0 : i32 , %arg1 : i16 , %arg2 : i8 ) -> () {
612
+ // CHECK-LABEL : @eitherDagLeafOnly
613
+ func.func @eitherDagLeafOnly (%arg0 : i32 , %arg1 : i16 , %arg2 : i8 ) -> () {
614
614
// CHECK: "test.either_op_b"(%arg1, %arg2) : (i16, i8) -> i32
615
615
%0 = " test.either_op_a" (%arg0 , %arg1 , %arg2 ) : (i32 , i16 , i8 ) -> i32
616
616
// CHECK: "test.either_op_b"(%arg1, %arg2) : (i16, i8) -> i32
617
617
%1 = " test.either_op_a" (%arg1 , %arg0 , %arg2 ) : (i16 , i32 , i8 ) -> i32
618
618
return
619
619
}
620
620
621
- // CHECK: @either_dag_leaf_dag_node
622
- func.func @either_dag_leaf_dag_node (%arg0 : i32 , %arg1 : i16 , %arg2 : i8 ) -> () {
621
+ // CHECK-LABEL : @eitherDagLeafDagNode
622
+ func.func @eitherDagLeafDagNode (%arg0 : i32 , %arg1 : i16 , %arg2 : i8 ) -> () {
623
623
%0 = " test.either_op_b" (%arg0 , %arg0 ) : (i32 , i32 ) -> i32
624
624
// CHECK: "test.either_op_b"(%arg1, %arg2) : (i16, i8) -> i32
625
625
%1 = " test.either_op_a" (%0 , %arg1 , %arg2 ) : (i32 , i16 , i8 ) -> i32
@@ -628,8 +628,8 @@ func.func @either_dag_leaf_dag_node(%arg0 : i32, %arg1 : i16, %arg2 : i8) -> ()
628
628
return
629
629
}
630
630
631
- // CHECK: @either_dag_node_dag_node
632
- func.func @either_dag_node_dag_node (%arg0 : i32 , %arg1 : i16 , %arg2 : i8 ) -> () {
631
+ // CHECK-LABEL : @eitherDagNodeDagNode
632
+ func.func @eitherDagNodeDagNode (%arg0 : i32 , %arg1 : i16 , %arg2 : i8 ) -> () {
633
633
%0 = " test.either_op_b" (%arg0 , %arg0 ) : (i32 , i32 ) -> i32
634
634
%1 = " test.either_op_b" (%arg1 , %arg1 ) : (i16 , i16 ) -> i32
635
635
// CHECK: "test.either_op_b"(%arg1, %arg2) : (i16, i8) -> i32
@@ -639,6 +639,17 @@ func.func @either_dag_node_dag_node(%arg0 : i32, %arg1 : i16, %arg2 : i8) -> ()
639
639
return
640
640
}
641
641
642
+ // CHECK-LABEL: testEitherOpWithAttr
643
+ func.func @testEitherOpWithAttr (%arg0 : i32 , %arg1 : i16 ) -> () {
644
+ // CHECK: "test.either_op_b"(%arg1, %arg0) : (i16, i32) -> i32
645
+ %0 = " test.either_op_c" (%arg0 , %arg1 ) {attr = 0 : i32 } : (i32 , i16 ) -> i32
646
+ // CHECK: "test.either_op_b"(%arg1, %arg0) : (i16, i32) -> i32
647
+ %1 = " test.either_op_c" (%arg1 , %arg0 ) {attr = 0 : i32 } : (i16 , i32 ) -> i32
648
+ // CHECK: "test.either_op_c"(%arg0, %arg1) <{attr = 1 : i32}> : (i32, i16) -> i32
649
+ %2 = " test.either_op_c" (%arg0 , %arg1 ) {attr = 1 : i32 } : (i32 , i16 ) -> i32
650
+ return
651
+ }
652
+
642
653
//===----------------------------------------------------------------------===//
643
654
// Test that ops without type deduction can be created with type builders.
644
655
//===----------------------------------------------------------------------===//
0 commit comments