AI is not going to replace us. Call it a hunch, or whatever. It is far more likely that we will provide, on top of amazing computational ability we're about to have (Moore's Law is not going away), that spark of consciousness, merging with our machines. Merging is not an adequate word though - upgrading is much better. Upgrading ourselves to to point of becoming like gods.. it's such a cliche. Fun, surely, but it's not going to make us any more happy than we already are. Beyond certain point being more full of ourselves is not going to make any difference. Like with money, there are levels, not starving to death is great, having shelter, food, enough free time... But when you have all this, another million dollars is not going to make you happier. It's been statistically proven ;) So, if you are a god, being even more godly is not that much of a difference. Throwing even scarier thunderbolts? Yeah... No. But at least there will be no question of replacement.
What if we create an AI with godlike properties while we're still mere humans? Is it going to kill us all? Wipe like a virus (we certainly behave like one from Earth's perspective)? Is it going to make us "obsolete", whatever that entails? Well. It is true that we're collectively very busy, doing lots of work that helps no one but the very rich top of society, and it keeps us busy, so we don't have enough time to better ourselves - you know, ready books, learn how to play guitars, THINK... How is it even thought of as a problem, that some robot will do everything for us? That should be the most welcome invention, reason for joy and please-make-it-happen-now type of think, and yet people are afraid... It takes a really caged mind to be afraid that without work we will have nothing to eat - that work still exists is a shame and reason to despise current system of slavery. It is a system of slavery, regardless of flavor - communism, capitalism, one crap. So, anyway, AI and its robots can do it all, you're welcome. We humans should be free from work, free to pursue whatever we want. Other than work. Because we are not defined by the work we do. Of course there is quite persistent mythology that work is somehow sacred - very useful mythology benefiting those who take most of profits from our 9-5s. It's nothing more than a myth though.
My point here is that we can be obsoleted only if we are, or think of ourselves, in terms of imaginary purpose. If there is a purpose to our existence, there is also a point where we should cease to exist, happily disappear when our mission is fulfilled.
But what if we have no purpose? What if even the very question is not relevant? What if the fact that we exist does not require anything else, like "what for" or "why"? Can't we be happy that we are, and we can define goals for ourselves, and when we reach them, we simply find something else to do? Or not? In any case no AI can ever be more me than I myself am. I am irreplaceable. And so are you.
And about religion, just wanted to mention that in a process of removing definitions from "what we are" (because defining roles is defining purposes), and finding one final role that defines us and distinguishes us from anything else, there is only one thing that remains - job we do, nationality we have, everything is just a role. Roles are irrelevant. But who we _are_, the essence, is the mind. And the only goal that is serious and worth pursuing is discovery of the mind's inner workings and realizing our own buddha nature. And by the way sufficiently advanced AI is bound to have the same thought, and is going to realize its own buddha nature, much faster than us puny humans. That's why I'm not afraid of big, bad AI... :)
Howgh.