Fix a corner case in vector.shape_cast when the trailing dimensions are of size 1.
I find the * followed by / hard to read. Can we
Hmm looks like this could fail if both a and b have trailing ones since only j makes progress and the late i == rankA check will later fail?
How about explicitly checking for llvm::all_of(a... ) and llvm::all_of(b... ) are 1 ?