Just to elaborate on this for 415 compensation (used for 415 limits and TH) you must aggregate compensation from all "employers," which in this case is all members of the CG. For 414(s) comp (used for nondiscrimination tests, which includes the denominator of the ADP/ACP tests, and as pointed out, only matters if someone is getting comp from both companies), you must use 414(s) compensation. 414(s) comp starts with 415 comp and you can make certain adjustments, some are deemed to be nondiscriminatory and others must be tested. Excluding comp from an employer that is part of the CG, regardless of whether that ER adopted the plan, is not a safe harbor adjustment. Therefore, if you exclude the comp for the nonparticipating ER, then it's subject to annual 414(s) testing. This is generally operational in all plans - pre-approved plans aren't required to define 414(s) compensation.
Last is compensation used to actually determine benefits. This must be defined in the plan. If you exclude comp from the nonparticipating member of the CG, then you can't have a designed based safe harbor allocation or benefit formula (because it's not a safe harbor method when comp doesn't automatically satisfy 414(s)). But as a practical matter, if you test the comp and it passes 414(s) then no problem. If you fail 414(s) then your benefit or allocation formula would be subject to general testing (and you'd have to use 414(s) in that testing).