Resolving the dim of outputs of a tensor_reshape op in terms of its input shape allows the op to be eliminated when its used only in its dims. The init_tensor -> tensor_reshape canonicalization can be simplified to use the dims of the output of the tensor_reshape which gets canonicalized away later making the tensor_reshape dead. Differential Revision: https://reviews.llvm.org/D96635