File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,18 @@ func.func @select_extui_i1(%arg0: i1) -> i1 {
5454 return %res : i1
5555}
5656
57+ // CHECK-LABEL: @select_no_fold_ui1
58+ // CHECK: %[[CONST_0:.+]] = "test.constant"() <{value = 0 : i32}> : () -> ui1
59+ // CHECK: %[[CONST_1:.+]] = "test.constant"() <{value = 1 : i32}> : () -> ui1
60+ // CHECK-NEXT: %[[RES:.+]] = arith.select %arg0, %[[CONST_1]], %[[CONST_0]] : ui1
61+ // CHECK-NEXT: return %[[RES]]
62+ func.func @select_no_fold_ui1 (%arg0: i1 ) -> ui1 {
63+ %c0_i1 = " test.constant" () {value = 0 : i32 } : () -> ui1
64+ %c1_i1 = " test.constant" () {value = 1 : i32 } : () -> ui1
65+ %res = arith.select %arg0 , %c1_i1 , %c0_i1 : ui1
66+ return %res : ui1
67+ }
68+
5769// CHECK-LABEL: @select_cst_false_scalar
5870// CHECK-SAME: (%[[ARG0:.+]]: i32, %[[ARG1:.+]]: i32)
5971// CHECK-NEXT: return %[[ARG1]]
You can’t perform that action at this time.
0 commit comments