This patch is the follow-up of https://github.com/llvm/llvm-project/pull/127979. It introduces a helper `simplifyNonNullOperand` to avoid duplicate logic. It also addresses the one-use issue in `visitLoadInst`, as discussed in https://github.com/llvm/llvm-project/pull/127979#issuecomment-2671013972. The `nonnull` attribute is also supported. Proof: https://alive2.llvm.org/ce/z/MCKgT9
1.3 KiB
1.3 KiB