The needle on the MPH erratically jumps up and down and then the car dies out.
Likely a bad vehicle speed sensor based on what little you told us.
Is the car now dead? Or can you restart and drive away until it happens again?
It the check engine light on?
From what I can tell, for the '10 Impala w/ 3.5L engine , the computer is what determines the speed . Not sure which sensor it uses, wheel rpm sensor or something involving the transmission. The speedometer decides what to display by communicating w/the computer via a data bus involving the body control module. My guess, either the speedometer itself is out of whack (if the mechanical type with needle that rotates to indicate speed, probably a gauge actuator fault), or the speedometer is intermittently losing communication with the computer, possibly a problem with body control module.
The fact that the engine stalls seems more consistent w/the computer not getting the correct speed info from the sensor, rather than the gauge actuator faulty theory.
Of course first thing with weird electrical issues is to check to make sure you have 12.5 volts in the battery. Computers and engines these days don’t operate very well on run down batteries.