Disclosed herein are pyrimidine substituted tetrahydrobenzo[4,5]imidazo[1,2-a]pyrazine and tetrahydropyrazino[1,2-a]indole compounds of the general formula provided where the substituents are as described herein, and pharmaceutically acceptable salts thereof that are liver X receptor modulators. Also provided are compositions comprising the compounds and a carrier, and the use of these compounds and compositions for treating a disease or disorder associated with the liver X receptor. A specific example of the compounds is (R)-(1-isopropyl-7-(methylsulfonyl)-2-(4-(trifluoromethyl)pyrimidin-2-yl)-1,2,3,4-tetrahydrobenzo[4,5]imidazo[1,2-a]pyrazin-8-yl)methanol.