The present disclosure provides phosphatidylinositol 3-kinase (PI3K) inhibitors of formula (I), or pharmaceutically acceptable salts thereof, in which n, m, R1, R2, and R3 are as defined herein. These compounds are useful for treatment of conditions mediated by one or more PI3K isoforms, such as PI3Kδ. The present disclosure further provides pharmaceutical compositions that include a compound of formula (I), or pharmaceutically acceptable salts thereof, and methods of using these compounds and compositions to treat conditions mediated by one or more PI3K isoforms, such as PI3Kδ.