Grand Am cutting off

1992 Pontiac Grand Am 3300 liter engine. The car just shuts off randomly while driving or ideling. The latest spell, I was driving approximately 50mph the speedometer jumped to 80 and I noticed the engine was not running. While coasting the speedometer pegged out to the fastest speed then jumped back to 0 then it registered the speed I was coasting at ( 40mph by that time). I was able to put car in neutral and start the car and was able to complete my trip. What can be causing this issue?

The vehicle speed sensor (VSS) is probably malfunctioning, and is sending bogus signals to the ECM. My best guess is to replace the VSS and see if the problem goes away. If not, post back.

pull codes,jump the ALDL pins and watch the cool flashes on the dash ,then post back.

If it was the VSS wouldnt there be some transmission shifting concerns.I have seen a bad VSS put a Caravan in limp mode (only had first to gears)

Sorry it took so long to get an answer. I checked the codes and there are none. I dont’ know if the Speedometer jumping is the main reason the car stalled. The first time it started stalling there were no Speedo issues but but when I stopped at a stoplight and the car idled it would stall. I was able to crank the car up with no effort though. And before nothing to do with the car stalling but i feel I had some electrical issues. My wipers and radio would just stop working, when I would turn the key off and restart the car the problems would go away.

Is it possible your ignition switch located under the steering column is going south or a short in the wiring?

You are absolutely right on with this question. The car cut off on me so i checked to see if the wipers worked after restarting. I was able to wiggle the ignition switch and I got intermittent wipers working and the car cutting off. I am in the process of checking out the switch and wireing to it.
Thank you,