At what level of intelligence would those rights kick in? We don’t now consider intelligence in non-human beings to confer rights. And we don’t consider sub-normal intelligence in humans to disqualify them from rights.
The whole notion of “rights” is ultimately based on our capacity for empathy. Humans have the ability to generalize their individual desire to be treated with respect and to not be subjected to needless suffering. Because we want it, we assume that others want it as well. Our capacity for empathy then kicks in; to varying degrees, we perceive the happiness of others as our own happiness and their suffering as ours. The whole idea of rights is a formalization of that aspect of the human consciousness.
Our empathy extends easily to beings that are more recognizably like us. When they exhibit signs of happiness or suffering in ways that trigger this self-recognition, we light up with empathy. That’s hard to do with creatures farther removed from our own physical form (like whales or octopods). We tend to empathize strongly with apes because it’s very easy to translate their displays of emotional state in terms of our own. Still, we have done very little to formalize the rights of higher primates.
Some philosophers assert that any information processing system that exceeds some tipping-point capacity will develop a reflexive self-modeling; in other words, build a brain (natural or artificial) with enough processing capacity and a “self” will emerge. That self will then have a capacity for suffering. Many such non-human selves probably already exist in the animal world. The advent of the same phenomenon in a machine would be remarkable, but wouldn’t pose radically different moral questions.
In the end, while we naturally feel empathy, whether or not we o the extra step of formalizing that empathy into rights seems to come down to questions of convenience. If our interests are served by squelching our natural empathy, we deny rights to others, as white Americans did with blacks in the slave days and beyond. If we get to the poit where the moral imparative seems to outweigh matters of convenience, then we accord rights.