[llvm] [DeadStoreElimination] Optimize tautological assignments (PR #75744)

Shreyansh Chouhan via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 22:52:16 PST 2024


BK1603 wrote:

I have updated the commit with a fix and a new test case for checking 2
> As per my expectations, the match should fail in this case and we should exit the optimization function immediately.

This isn't correct, I was confused by `ptr` types here but essentially the match would pass (we are comparing a ptr (%35) loaded from another ptr (%33)  against null, and the storing null in the originial ptr (%33), which does satisfy at least conditional constraint.)

The latest commit should solve stage 2 bin crashes. (I tried building stage 3 locally, and was able to get to the link step, without any crashes during compilation. But I cannot link the generated binaries due to memory constraints on my laptop.)

https://github.com/llvm/llvm-project/pull/75744


More information about the llvm-commits mailing list