Sudden behaviour is due to the impact of certain conditions. Maybe he is suffering from emotional pain due to which he is getting irritated and talking rudely to you. Instead of getting upset you should try to understand the situation he is going through and find out the reason of this behaviour. If he is talking to you then clearly he wants to continue your relationship. You just need to show empathy and things will start fall in place. Good luck
When communication breaks down in a relationship,it can be very difficult to understand why the other person may be behaving the way that they are.
Could you shed more light on your situation?
Since when have you been in a relationship with this person? Since when has this been happening?