The key intermediates 5-benzyl-2-phenylpyrimidin-4(3H)-ones or ( E)-5-benzylidene-2-phenyl-5,6-dihydropyrimidin-4( 3H)-ones were obtained conveniently by cyclization of the acetates of Baylis-Hillman adducts and benzamidine hydrochloride in the presence of sodium ethoxide at room temperature. Chlorination of pyrimidinones with phosphorus oxychloride and subsequent treatment with morpholine and demethylation yielded PI3K inhibitors.