[llvm] [InstSimplify] Infer icmp from with.overflow intrinsics (PR #75511)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 14 22:35:50 PST 2023


dtcxzyw wrote:

> I'm not sure this is the right approach to the problem. The way I would view it is that the icmp here is of the form `(x +nsw c) spred c2`, where the `nsw` is implied by the `or` condition. This means we can transform the icmp into `x spred (c2 - c)`. From there, it will enjoy all the usual icmp optimizations.

Alive2: https://alive2.llvm.org/ce/z/PA3SAK

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


More information about the llvm-commits mailing list