search for: flaganywrap

Displaying 5 results from an estimated 5 matches for "flaganywrap".

2016 Apr 10
2
ScalarEvolution "add nsw" question
...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 overflow annotations are simply discarded. I do not know if I am missing something or if simply nobody cared so far. In any case, I would appreciate any documentation on the curre...
2013 Nov 16
0
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
...you figure this out? The code you’re pointing to should preserve NSW and NUW. It is only clearing NW. Here’s what I think should happen, without actually trying it myself: - createNodeForGEP notices that inbounds implies NSW SCEV::NoWrapFlags Wrap = GEP->isInBounds() ? SCEV::FlagNSW : SCEV::FlagAnyWrap - The array index should already be an AddRecExpr with NSW const SCEV *IndexS = getSCEV(Index); - createNodeForGEP attempts to scale the index using the NSW flag we picked up earlier const SCEV *LocalOffset = getMulExpr(IndexS, ElementSize, Wrap); - getMulExpr constructs a new Add...
2013 Nov 13
2
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
Hi folks, I'm trying to analyse this piece of IR: for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %0 = shl nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds i32* %b, i64 %0 %1 = load i32* %arrayidx, align 4, !tbaa !1 %add = add nsw i32 %1, %I %arrayidx3 = getelementptr
2016 Apr 10
2
ScalarEvolution "add nsw" question
...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 overflow annotations are simply > >discarded. > > > >I do not know if I am missing something or if simply nobody cared so > >far....
2012 Dec 10
3
[LLVMdev] [PATCH] Teaching ScalarEvolution to handle IV=add(zext(trunc(IV)), Step)
...arEvolution.h index 235adca..79e545d 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -654,6 +654,10 @@ namespace llvm { const SCEV *getMinusSCEV(const SCEV *LHS, const SCEV *RHS, SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap); + /// Return a SCEV that truncates 'V' to 'Ty' *and* then zero extends that + /// value back to 'V's original type. + const SCEV *getTruncateAndZeroExtend(const SCEV *V, Type *Ty); + /// getTruncateOrZeroExtend - Return a SCEV corresponding to a conversion...