Neither. Both are fine rifles and both will perform well but there are better rifles on the market for roughly that same price.
If you have your heart set on one or the other I would go with the Ruger AR 556. Here is why. The S&W M&P Sport has a 1:9 6 groove barrel while the Ruger has a 1:8 6 groove barrel. The 1:9 or 1:8 refers to the twist in the rifling inside the barrel. This determines how fast the bullet " Spins " as it comes out of the muzzle. Rotation of the bullet stabilizes the bullet in flight. The faster the bullet spins the more stable it will be in flight. The more stable it is in flight the more accurate the rifle is. 1 in 9 means the bullet makes 1 revolution every 9 inches. 1 in 8 means the bullet makes 1 revolution every 8 inches. While there are other factors to a rifles accuracy since both these rifles are mil-spec those other factors are minimized.
I own a S&W M&P sport AR-15. I also own a Sig M400 AR-15. The Sig has a 1:7 fast twist barrel the M&P is a 1:9. At 200 yards I make groups that are less than 2 inches when shooting off a bench using a bi pod and a 3-9 AR scope with a BDC on the M400. Same scope same bi-pod on the M&P, same ammunition ( XM193) same magazines and my groups are 3 to 4 inches.
With the Sig M400 I can consistently make sub MOA groups out to 350 yards. ( I use low profile scope rings and this lets me co-witness the front sight. ) With the M&P I stay sub MOA out to 100 yards. After that not so much. This is using a 55gr JHP round. If I use a heavier round the M&P performance degrades even faster while the M400 has no real accuracy loss with 62gr green tips. I believe this is due to the fast twist barrel on the M400.
Compare the Prices of the S&W and the Ruger to the Sig.