search for: getnowrapflagsfromub

Displaying 2 results from an estimated 2 matches for "getnowrapflagsfromub".

2016 Apr 10
2
ScalarEvolution "add nsw" question
...calarEvolution does not propagate this information. The -analyze output looks like this: Classifying expressions for: @add %add = add nsw i32 %x, %y --> (%x + %y) U: full-set S: full-set The piece of code that causes this (for me) unexpected result is located in the ScalarEvolution::getNoWrapFlagsFromUB(...) function and looks like this: if (InnermostContainingLoop == nullptr || InnermostContainingLoop->getHeader() != BinOp->getParent()) return SCEV::FlagAnyWrap; If the "InnermostContainingLoop" is a nullptr, thus if the binary operator is not contained in a loop, all...
2016 Apr 10
2
ScalarEvolution "add nsw" question
Hey Sanjoy, Thanks for the quick repsonse. On 04/10, Sanjoy Das wrote: > [+CC Bjarke who wrote getNoWrapFlagsFromUB + related bits] Also thanks. > One fundamental reason why we cannot reason about NoWrap flags in SCEV > for arithmetic outside of loops is to avoid issues like this: > > if (cond) { > val[x +nsw y] = 42; > } else { > val[x + y] = 42; > } > > Now *both* the &quot...