[llvm] [EarlyCSE] Fix improper icmp simplification (PR #122043)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 8 00:05:19 PST 2025
dtcxzyw wrote:
> https://godbolt.org/z/1MfndEMMs
In this case, `%4` is passed into `_ZN1A5valueEv` which has `noundef` and `nonnull/dereferenceable` parameter attributes. The optimizer will assume `%4` is nonnull in the subsequent execution path.
Without `noundef` and `nonnull/dereferenceable`, the icmp will not be optimized out: https://godbolt.org/z/chhxE3Txr
https://github.com/llvm/llvm-project/pull/122043
More information about the llvm-commits
mailing list