The instructions in the reply by DenverDave (above) did help in my case, but only temporarily.
I had occasional rough shifting (both upshift and downshift) around town. But my worst issue was when climbing hills, at low speed on my neighborhood hill, and at high speeds on interstate when climbing a long grade. The transmission would downshift to increase power under load, but would STICK in low gear. The engine would rev way too high for my liking, and would not want to upshift, even after I released the accelerator. Each time I'd have this "bad shifting incident", the engine light would come on. But after a few drive cycles, it would go out. I found that a Diagnostic Trouble Code was STORED each time (P000D and P000B) and it had to do with the engine's VVT (Variable Valve Timing) system which is controlled by the ECM (Engine Control Module).
Yes, strangely enough, the engine performance is causing the transmission to act up (get confused) and shift erratically. I'm hopeful the TCM software update I got contains changes in the algorithms that ALLOW the transmission to better handle the engine's occasional VVT anomalies. I was told that I already had the latest software in my ECM.
So, I definitely suggest updating ALL software that's out-of-date. I'd also strongly suggest asking the mechanic if there are any trouble codes stored in the computer(s). I've found several YouTube videos and forum posts stating the same thing, "UPDATE ALL SOFTWARE, and then attempt to resolve all reported trouble codes, ACTIVE and/or STORED that pertain to the transmission and/or engine performance."
"MotorCity Mechanic" and "Online Mechanic Tips", both on YouTube, have some good videos on performing work on the VVT system and on replacing the transmission valve-body and shift-solenoids, if you're a DIYer like me.
Oh, and something I did that also helped a lot with rough shifting; when I drained and refilled the transmission I added a can of Valvoline Conditioner (not a sponsor)...