search for: getvaluefromicmpcondit

Displaying 3 results from an estimated 3 matches for "getvaluefromicmpcondit".

2016 Sep 27
4
Inferring nsw/nuw flags for increment/decrement based on relational comparisons
...; 1. If (X s< Y), then both X + 1 and Y - 1 are nsw. >> > 2. If (X u< Y), then both X + 1 and Y - 1 are nuw. > If this is the only case you want to support, this sounds like a fairly > straight forward extension to the LazyValueInfo analysis. In > particular, take a look at getValueFromICmpCondition. I'd be happy to > help review a patch here once you've got something working. > > The basic idea would be that (X s<Y ) implies X s< INT_MAX since Y must > be INT_MAX or smaller and X is less than that. We can tell this without > needing to know anything about Y....
2016 Sep 20
2
Inferring nsw/nuw flags for increment/decrement based on relational comparisons
Hi everyone, I posted some questions related to implementing inference of nsw/nuw flags based on known icmp results to Bug 30428 ( https://llvm.org/bugs/show_bug.cgi?id=30428 ) and it was recommended that I engage a wider audience by coming here. The minimal context is the following, please see the bug report for more detail: > 1. If (X s< Y), then both X + 1 and Y - 1 are nsw. > 2.
2020 Apr 06
2
Branch is not optimized because of right shift
On Sun, Apr 5, 2020 at 6:34 PM Stefanos Baziotis < stefanos.baziotis at gmail.com> wrote: > Hi Craig, > > > Adding a nuw to the add -8 is incorrect. > Yeah, I didn't mean to say it was correct. It was just an observation that > with nuw the optimization was happened and I asked if someone thought it > was somehow connected. > > > From the perspective of the