[llvm] [DA] Add tests for nsw doesn't hold on entire iteration space (NFC) (PR #162281)

Ehsan Amiri via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 06:53:31 PST 2025


================

----------------
amehsan wrote:

> You are using the condition of "not overflowing" too loosely. You need to be explicit about which operations are guaranteed not to overflow. It's easy to create examples where `nsw` is present but `a * x` still overflows.
> 
> Just to confirm, is your objections based on the fact that you were able to prove its correctness?

Let me make some changes in the proof. Then you give me a counter example if you think the proof is incorrect. I will make some changes and then send a comment here when the proof is ready for review.

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


More information about the llvm-commits mailing list