[Mlir-commits] [mlir] [mlir][index] Implement folders for CastSOp and CastUOp (PR #66960)

Jeff Niu llvmlistbot at llvm.org
Wed Sep 20 17:22:51 PDT 2023


================
@@ -556,3 +556,11 @@ func.func @sub_identity(%arg0: index) -> index {
   // CHECK-NEXT: return %arg0
   return %0 : index
 }
+
+// CHECK-LABEL: @castu_to_index
+func.func @castu_to_index() -> index {
+  // CHECK: index.constant 8000000000000
----------------
Mogball wrote:

I'm trying to figure out the best way to test the other direction besides a test pass or unit test, because it's not possible to test the other direction via the canonicalizer -- the index dialect doesn't have a constant materializer for fixed-width integer constants...

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


More information about the Mlir-commits mailing list