Displaying 6 results from an estimated 6 matches for "addrecloop".
2013 Nov 13
2
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
...re guaranteed to have no overflow.
//
// No self-wrap cannot be guaranteed after changing the step size, but
// will be inferred if either NUW or NSW is true.
Flags = AddRec->getNoWrapFlags(clearFlags(Flags, SCEV::FlagNW));
const SCEV *NewRec = getAddRecExpr(NewOps, AddRecLoop, Flags);
// If all of the other operands were loop invariant, we are done.
if (Ops.size() == 1) return NewRec;
I understand that you can't assume it won't wrap around with the new
stride, but I couldn't find anything else later that would re-assign
NSW/NUW. Maybe I need to...
2013 Nov 16
0
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
...overflow.
> //
> // No self-wrap cannot be guaranteed after changing the step size, but
> // will be inferred if either NUW or NSW is true.
> Flags = AddRec->getNoWrapFlags(clearFlags(Flags, SCEV::FlagNW));
> const SCEV *NewRec = getAddRecExpr(NewOps, AddRecLoop, Flags);
>
> // If all of the other operands were loop invariant, we are done.
> if (Ops.size() == 1) return NewRec;
>
> I understand that you can't assume it won't wrap around with the new stride, but I couldn't find anything else later that would re-assign...
2013 Nov 16
2
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
On 16 November 2013 06:56, Andrew Trick <atrick at apple.com> wrote:
> - getMulExpr constructs a new AddRec with NSW:
>
> Flags = AddRec->getNoWrapFlags(clearFlags(Flags, SCEV::FlagNW));
> const SCEV *NewRec = getAddRecExpr(NewOps, AddRecLoop, Flags);
>
Hi Andrew,
Thanks for looking at this.
Clearing the flags here makes sense, but it's being too conservative. I'm
thinking I'll need something like propagateSafeFlags(...) with knowledge of
the loop induction ranges or something else instead of simply relying on
later pr...
2016 Apr 23
2
[IndVarSimplify] Narrow IV's are not eliminated resulting in inefficient code
...pagate the NUW and NSW flags if both the
> // outer add and the inner addrec are guaranteed to have no
> overflow.
> // Always propagate NW.
> Flags = AddRec->getNoWrapFlags(setFlags(Flags, SCEV::FlagNW));
> const SCEV *NewRec = getAddRecExpr(AddRecOps, AddRecLoop, Flags);
>
> // If all of the other operands were loop invariant, we are done.
> if (Ops.size() == 1) return NewRec;
>
> Thanks!
> -- Sanjoy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-...
2016 Apr 20
2
[IndVarSimplify] Narrow IV's are not eliminated resulting in inefficient code
Hi,
Would you be able to kindly check and assist with the IndVarSimplify / SCEV
problem I got in the latest LLVM, please?
Sometimes IndVarSimplify may not eliminate narrow IV's when there actually
exists such a possibility. This may affect other LLVM passes and result in
inefficient code. The reproducing test 'indvar_test.cpp' is attached.
The problem is with the second
2013 Nov 16
0
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
...e:
>
>> On 16 November 2013 06:56, Andrew Trick <atrick at apple.com> wrote:
>> - getMulExpr constructs a new AddRec with NSW:
>>
>> Flags = AddRec->getNoWrapFlags(clearFlags(Flags, SCEV::FlagNW));
>> const SCEV *NewRec = getAddRecExpr(NewOps, AddRecLoop, Flags);
>
> Hi Andrew,
>
> Thanks for looking at this.
>
> Clearing the flags here makes sense, but it's being too conservative. I'm thinking I'll need something like propagateSafeFlags(...) with knowledge of the loop induction ranges or something else instead of s...