[llvm] Fix to generalize the canSkipClobberingStore (PR #174137)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 30 03:59:08 PDT 2026
Bhuvan1527 wrote:
> This is very obviously incorrect. Please read the comment above the function and try to understand what this code is actually doing. Then look at the code in the issue and try to understand why it's valid to optimize that code.
>
> (Hint: Everything here hinges on "writes the same value that MemLoc contains now". The value being an argument tells you absolutely nothing about the current value of the location.)
Hi @nikic
Sorry for leaving this pr untouched. I got occupied with my semester works.
Considering your comment. I've approached this issue as follows : **skipping the store if it is storing same value loaded via loaded instruction.**
I've updated the pr. Also had to re-written the existing code to fit the new code changes.
looking forward for your comments.
Thanks.
https://github.com/llvm/llvm-project/pull/174137
More information about the llvm-commits
mailing list