I believe they should be given rights, but not the same rights we have (and that's not to say I think they deserve less, if such an AI existed) An AI will not have the same limitations or issues humans have, so placing human rights on an AI would simply not suit the form of life that's been created. It's a totally unique form of life and it needs its own unique set of rights.
It will naturally have to share many of the rigts we have currently, but some would have to be created to suit an AIs life more specifically or else they're open to possible gray areas where things don't quite fit.