Why this piece of LLVM IR isn't optimized out at O3

%218 = call %struct._object* @PyObject_GetAttr(%struct._object* %216, %struct._object* %217)
store %struct._object* %218, %struct._object** %26, align 8
%219 = load %struct._object*, %struct._object** %26, align 8

It seems to me that %219 should’t exist at all.
For that %store, there is only one instruction loading from it later on (although in a different succeeding block) so I’d assume it should get optimized too, leaving an empty unreferenced alloca at the beginning of the Entry Block. But running opt src.bc -S -o opt.ll -O3 didn’t change them.

What did I misunderstand here?

Hard to say without the complete IR (though minimizing it first before sharing would be helpful - and might show you what’s important along the way).