It’s not an airliner, but the space shuttle could do it. My brother is a former USAF test pilot. After getting out he worked for Boeing at the NASA JSC, on the space shuttle reentry scenarios. Over in the thread about the Columbia shuttle disaster, in the OP I wrote this:
That is in one shuttle reentry. I was in the sim when he did it. He had done it many times before. Of course nobody ever did it in the real space shuttle, but this is the real simulator for it so I’m confident the shuttle can do it.
About the jetliners, I’m a fan of watching those air disaster TV shows. I’ve watched nearly every episode of Air Disasters on the Smithsonian Channel. Jetliners have been in some terrible orientations due to mechanical failures or extreme weather. That must be frightful for passengers and crew. From what I’ve seen, given enough altitude I’m confident that jetliners can do a loop and a barrel roll. Keep in mind, IANAP.