I had a similar problem in my '88 Bonneville a couple of years ago. Whenever I took my foot off the gas, the engine would stutter and sometimes die. It would start right back up again, and would run fine as long as I kept the gas pedal at least somewhat depressed. If I let my foot off, it would stutter again.
The problem was a dirty IAC valve (Idle Air Control). I took the IAC valve out, it was really dirty, cleaned it with carburetor cleaner, reinstalled it, and the problem was fixed. Maybe you're having the same problem. The IAC valve was located on the throttle body, underneath the throttle. Since your engine is a newer version than mine, it may be in a slightly different location, but probably somewhere close to that. Other possibilities might include an ignition problem, or dirty fuel injectors, or something. Hopefully someone else with more expertise will chime in for you.
It might help if you tell us what code it gives you, too.