I've owned the 9mm versions of the two guns - the Glock 26 and the S&W M&P 9mm compact...
The 26 is a Glock - nothing more, nothing less. You either like the grip, or you don't. You don't get a vote. The trigger is a Glock trigger - somewhat spongy to my taste. Easy to buy, sell and get serviced - commonly found everywhere.
My personal experience was that it's a reliable accurate pistol.
The M&P is a S&W and in many ways is an evolutionary development of the Glock design. It also has replaceable grip panels allowing you to fit the grip to your hand. A newer product, but S&W is a widely available brand with a quality track record and good service.
My personal experience is that it's a reliable accurate pistol.
I traded the Glock for an HK. I happen to be carrying the M&P right now. It's not the only pistol in my carry rotation - but it gets carried regularly.