%6 = stablehlo.dot_general %4, %5, batching_dims = [0] x [0], contracting_dims = [1] x [1] : (tensor<4x4xf32>, tensor<4x4xf32>) -> tensor<4xf32>
%7 = stablehlo.dot_general %5, %4, batching_dims = [0] x [0], contracting_dims = [1] x [1] : (tensor<4x4xf32>, tensor<4x4xf32>) -> tensor<4xf32>
This would be an example. dot_general(A, B) can be written as dot_general(B, A) if certain patterns on the dot_dimensions hold up. we should expand the current dot general cse pass to account for these