File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,26 @@ func.func @clamp_f32_is_noop(%arg0: tensor<4xf32>) -> tensor<4xf32> {
241241
242242// -----
243243
244+ // CHECK-LABEL: @clamp_boolean_is_noop
245+ func.func @clamp_boolean_is_noop (%arg0: tensor <4 xi1 >) -> tensor <4 xi1 > {
246+ // CHECK: return %arg0
247+ // CHECK-NOT: tosa.clamp
248+ %0 = tosa.clamp %arg0 {min_val = false , max_val = true } : (tensor <4 xi1 >) -> tensor <4 xi1 >
249+ return %0 : tensor <4 xi1 >
250+ }
251+
252+ // -----
253+
254+ // CHECK-LABEL: @clamp_boolean_dynamic_is_noop
255+ func.func @clamp_boolean_dynamic_is_noop (%arg0: tensor <?xi1 >) -> tensor <?xi1 > {
256+ // CHECK: return %arg0
257+ // CHECK-NOT: tosa.clamp
258+ %0 = tosa.clamp %arg0 {min_val = false , max_val = true } : (tensor <?xi1 >) -> tensor <?xi1 >
259+ return %0 : tensor <?xi1 >
260+ }
261+
262+ // -----
263+
244264// CHECK-LABEL: @clamp_int8_is_noop
245265func.func @clamp_int8_is_noop (%arg0: tensor <4 xi8 >) -> tensor <4 xi8 > {
246266 // CHECK: return %arg0
You can’t perform that action at this time.
0 commit comments