testing for autocorrelation after xtreg is done usually by xtserial.
But what to do if xtreg includes lagged dependant variables?
And what to do after xtivreg?
If the model includes LDVs xtreg is not the appropriate estimation
technique in any case. Use xtabond or (preferably) xtabond2. Both
handle instrumental variables and provide tests for 1st and 2d order
serial correlation in the errors.