Unrealized_conversion_cast failing bufferization passes

Fair. that makes sense. I think bounding that time ties in with PSA: run -reconcile-unrealized-casts after all -convert-*-to-llvm from now on

Just because it’s not clear from your examples, I hope you don’t mean a pass that operates on unrealized_conversion_cast directly and does something other than folding away cast A → B followed by cast B → A.

%1 = builtin.unrealized_conversion_cast %0 : i32 to index
%2 = builtin.unrealized_conversion_cast %1 : index to i32
%3 = "foo.op"(%2) : (i32) -> i32

%3 = "foo.op"(%0) : (i32) -> i32

because those are the only semantics that unrealized_conversion_cast has :slight_smile: