we discovered (with expensive checks) in the SystemZ backend that while expanding an isel pseudo involving creating a PHI, the NoPHIs attributes must be reset in case the function had no PHIs to begin with. Therefore this is done in SystemZISelLowering.cpp with an explicit call.
It seems however that this is probably needed in more cases (like in AArch64TargetLowering::EmitF128CSEL?), so maybe there ought to be some mechanism (in MachineInstrBuilder?) to do this upon creating a PHI instruction?