Saudi Arabia said on Monday it has smashed three cells linked to the Islamic State group which planned to attack military facilities and other targets and has also detained 17 suspects.