Is it possible to complete a PhD in CS in 3 years?
In theory, yes, it is possible. In practice it depends on many things. Let me try to list a bunch of the variables that have affect the time required. 

The minimum requirements that you are likely to find for a doctorate are (a) pass a set of qualifying exams and (b) write a dissertation acceptable to the faculty. There may be a few exceptions but most of the exceptions will add requirements. 

To pass the examinations, you normally take certain courses. You may already have the knowledge needed to take the exams from your masters, but many courses are designed specifically to ready you for the exams. If you don't have the knowledge you need to get it (courses or elsewhere) and that takes time. 

The examinations normally guarantee that you have a solid but broad knowledge of your field. Research, on the other hand requires deep but narrow knowledge of a small sub-field. The graduate courses are also fairly broad, but also start to take you into the depths of some subfield and many will stress recent advances in some field. 

To write a dissertation requires that in a small area of your discipline you become a subject expert - world class. That may require additional course work in the form of seminars with faculty and a few students. If you start out close to the boundary of the known world in the area in which you want to do research then you can move quickly. Otherwise it may take time and study to gain the required focus. 

To write a dissertation, requires some knowledge of research process and in some fields that can take time to master. It is less likely to be an issue in mathematics, say, or in some parts of CS. But if you lack the knowledge of how to do the specific sort of research required of you, it will take time to gain it. 

To write a dissertation requires a suitable problem. That problem can come from you or from a suitable advisor. But if there is no problem at hand then it will take time and study just to find a problem. Moreover, the problem has to be suitable. If it is too easy to solve or too hard then it isn't suitable. I worked, briefly, on both too hard and too easy problems in my math degree. But disposing of them and coming to the right problem only took several weeks of study. But it is hard to put a time limit here as research, by definition, is an exploration of the unknown. 

To write an acceptable dissertation you have to produce some valuable work at the boundary of knowledge by solving the problem(s) posed. You also have to write it up and make sure there are no gaps that might invalidate the work. This can take time. 

You have to make your advisor happy. Sometimes this is easy but sometimes not. Usually, however, there is the question of "How much is enough?" This is a value judgement, of course, and you and your advisor need to come to agreement. 

Finally, you need, in most places, to defend your dissertation before a committee or the public and you need to handle a fair amount of paperwork. This can take some time, also, but isn't normally a big issue. 

Note that lots of these things take time, but most of them require an amount of time that is hard to estimate and impossible to bound. If you are well prepared for exams and research and you have a suitable advisor and a suitable problem then three years is feasible, provided that the problem itself doesn't have hidden traps that aren't apparent at the start. Again, the existence of those traps is impossible to predict since you are extending the known world.