<div dir="ltr">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).<br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 13, 2019 at 1:05 AM Zhang via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>```</div><div><div> %218 = call %struct._object* @PyObject_GetAttr(%struct._object* %216, %struct._object* %217)</div><div> store %struct._object* %218, %struct._object** %26, align 8</div><div> %219 = load %struct._object*, %struct._object** %26, align 8</div></div><div>```</div><div>It seems to me that %219 should't exist at all. </div><div>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. </div><div><br></div><div>What did I misunderstand here?</div><div><u></u><u></u></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>