Personally experienced it. Wife worked at Google, had always positive performance reviews. Come pregnancy time she informed her manager, 3 days later they put her on a performance improvement plan. It didn't take long for them to realize they were making a big mistake, risking an expensive lawsuit so they let it go and let her have her paid 12 month leave. After returning she got the choice to do the PIP or take seve…
And, given how hard it is for large companies in the bay area to hire enough people who fit their needs, it seems irrational to let someone go for only this reason.