The present invention relates to compounds of Formula (I) or pharmaceutically acceptable salts thereof, which are PI3K-¿inhibitors which are useful for the treatment of disorders such as autoimmune diseases, cancer, cardiovascular diseases, and neurodegenerative diseases. .