[POWERPC] Move common code out of if/else