[Mlir-commits] [mlir] [mlir][tosa] Add a canonicalization to optimize cast cast sequences (PR #176904)

Sayan Saha llvmlistbot at llvm.org
Wed Jan 21 10:57:50 PST 2026


================
@@ -1466,3 +1466,24 @@ func.func @test_fold_i32_to_i1_cast() -> tensor<i1> {
   %1 = "tosa.cast"(%0) : (tensor<i32>) -> tensor<i1>
   return %1 : tensor<i1>
 }
+
+// -----
+
+// CHECK-LABEL: @test_canonicalize_non_narrowing_cast_i8_to_i32
----------------
sahas3 wrote:

I'm not sure of general recommendations for adding LIT tests but should the failure cases be locked down as well for robustness?

https://github.com/llvm/llvm-project/pull/176904


More information about the Mlir-commits mailing list