Sato—Tate conjecture for non-CM elliptic curves and modularity