President Trump says TSMC is "one of the great companies of the world" as he praises the chipmaker for investing in the US.