Displaying 10 results from an estimated 10 matches for "hasnounsignedwrap".
Did you mean:
hasnosignedwrap
2011 Aug 04
3
[LLVMdev] Multiple one-line bugs in LLVM
...'clearTopDownPointers' function is fully equivalent to
the body of 'clearBottomUpPointers' function. The advised solution is to change
this code into
void clearBottomUpPointers() {
PerPtrBottomUp.clear();
}
----
lib/Analysis/InstructionSimplify.cpp:1891
bool NUW = LBO->hasNoUnsignedWrap() && LBO->hasNoUnsignedWrap();
There are identical sub-expressions 'LBO->hasNoUnsignedWrap()' to the left and
to the right of the '&&' operator. Looks like the correct code is
bool NUW = LBO->hasNoUnsignedWrap() && RBO->hasNoUnsignedWrap();...
2011 Aug 04
0
[LLVMdev] Multiple one-line bugs in LLVM
...function. The advised solution is to change
> this code into
>
> void clearBottomUpPointers() {
> PerPtrBottomUp.clear();
> }
This is probably correct. Hopefully John can comment.
>
> ----
>
> lib/Analysis/InstructionSimplify.cpp:1891
> bool NUW = LBO->hasNoUnsignedWrap()&& LBO->hasNoUnsignedWrap();
>
> There are identical sub-expressions 'LBO->hasNoUnsignedWrap()' to the left and
> to the right of the '&&' operator. Looks like the correct code is
>
> bool NUW = LBO->hasNoUnsignedWrap()&& RBO-&...
2013 Oct 01
3
[LLVMdev] ScalarEvolution::createNodeForPHI
...the flags
NSW/NUW are set according to the Operator BEValueV
(ScalarEvoluton.cpp:3099-3113), but only Add and GEP operators are checked.
//-------------------------------------------------------------------------//
if (const AddOperator *OBO = dyn_cast<AddOperator>(BEValueV)) {
if (OBO->hasNoUnsignedWrap())
Flags = setFlags(Flags, SCEV::FlagNUW);
if (OBO->hasNoSignedWrap())
Flags = setFlags(Flags, SCEV::FlagNSW);
} else if (const GEPOperator *GEP =
dyn_cast<GEPOperator>(BEValueV)) {
// If the increment is an inbounds GEP, then we know the address
// space cannot...
2014 Jun 25
2
[LLVMdev] Question Regarding Sign-Overflow
...R/Instructions.cpp&ct=xref_jump_to_def&cl=GROK&l=2025&gsn=hasNoSignedWrap>()); Res <https://cs.corp.google.com/#piper///depot/google3/third_party/llvm/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp&ct=xref_jump_to_def&cl=GROK&l=1471&gsn=Res>->setHasNoUnsignedWrap <https://cs.corp.google.com/#piper///depot/google3/third_party/llvm/llvm/lib/IR/Instructions.cpp&ct=xref_jump_to_def&cl=GROK&l=2009&gsn=setHasNoUnsignedWrap>(I <https://cs.corp.google.com/#piper///depot/google3/third_party/llvm/llvm/lib/Transforms/InstCombine/InstCombineAdd...
2013 Oct 02
0
[LLVMdev] ScalarEvolution::createNodeForPHI
...t according to the Operator BEValueV
> (ScalarEvoluton.cpp:3099-3113), but only Add and GEP operators are checked.
>
> //-------------------------------------------------------------------------//
> if (const AddOperator *OBO = dyn_cast<AddOperator>(BEValueV)) {
> if (OBO->hasNoUnsignedWrap())
> Flags = setFlags(Flags, SCEV::FlagNUW);
> if (OBO->hasNoSignedWrap())
> Flags = setFlags(Flags, SCEV::FlagNSW);
> } else if (const GEPOperator *GEP =
> dyn_cast<GEPOperator>(BEValueV)) {
> // If the increment is an inbounds GEP, then we know the a...
2015 Apr 06
2
[LLVMdev] inconsistent wording in the LangRef regarding "shl nsw"
...it shifts out only
zeros, but the result has the sign bit set) but "mul i8 1, i8 -128"
does not sign overflow (by the usual definition of sign-overflow), so
this violates (2).
InstCombine already has a check for this edge-case when folding
multiplies into left shifts:
...
if (I.hasNoUnsignedWrap())
Shl->setHasNoUnsignedWrap();
if (I.hasNoSignedWrap() && *** NewCst->isNotMinSignedValue() ***)
Shl->setHasNoSignedWrap();
...
(though the check is a bit weird -- NewCst is Log2(IVal) so I think it
cannot ever be INT_MIN, and I suspect that the check...
2011 Aug 11
0
[LLVMdev] RE : IR code modification/transformation
...gt; var = var + y
>
> So I want to read all parameters of the instruction, like the var name, the number, the type,...
Parameters (operands): Add->getOperand(n) (for n = 0, 1, ... ,
Add->getNumOperands()).
A few other "parameters" like nuw/nsw/exact can be accessed as
Add->hasNoUnsignedWrap()/setHasNoUnsignedWrap() and friends.
Var name: Add->getName() / Add->setName().
Can efficiently be transfered to the new instruction with Sub->takeName(Add).
The number is automatically assigned if it doesn't have a name. I'm
not sure if there's an easy way to determine it ot...
2013 Oct 02
1
[LLVMdev] ScalarEvolution::createNodeForPHI
...V
> > (ScalarEvoluton.cpp:3099-3113), but only Add and GEP operators are
> > checked.
> >
> > //-------------------------------------------------------------------------//
> > if (const AddOperator *OBO = dyn_cast<AddOperator>(BEValueV)) {
> > if (OBO->hasNoUnsignedWrap())
> > Flags = setFlags(Flags, SCEV::FlagNUW);
> > if (OBO->hasNoSignedWrap())
> > Flags = setFlags(Flags, SCEV::FlagNSW);
> > } else if (const GEPOperator *GEP =
> > dyn_cast<GEPOperator>(BEValueV)) {
> > // If the increment is an in...
2011 Aug 11
5
[LLVMdev] IR code modification/transformation
Hi,
I have a question about the llvm passes.
I'm iterating over a basicblock and I can get an instruction and print it.
Now, I want to iterate over the instruction and be able to modify the values of the instruction.
For example, if my instruction is an add "<result> = add i32 4, %var" I want to transform it in a sub "<result> = sub i32 4, %var".
I looked up
2015 Jan 15
4
[LLVMdev] confusion w.r.t. scalar evolution and nuw
I've been doing some digging in this area (scev, wrapping arithmetic),
learning as much as I can, and have reached a point where I'm fairly
confused about the semantics of nuw in scalar evolution expressions.
Consider the following program:
define void @foo(i32 %begin) {
entry:
br label %loop
loop:
%idx = phi i32 [ %begin, %entry ], [ %idx.dec, %loop ]
%idx.dec = sub nuw i32