Spanx while riding are enough to give you stomach issues! It's akin to wearing compression garments. Wearing regular spandex shorts would be much less compressive! Especially, cycling shorts with a wide, flat waistband.
I have GI issues while riding at times and I know that if I were wearing Spanx, it would definitely make it worse.