[GISel][SDAG] Avoid push_back in loops for some shuffle mask handling. (#119434)
Each call to push_back contains a check to see if the vector needs to
grow. Using resize or giving the size to the constructor can reduce
the number of checks for growing.