search for: flagnsw

Displaying 6 results from an estimated 6 matches for "flagnsw".

Did you mean: flag's
2013 Oct 01
3
[LLVMdev] ScalarEvolution::createNodeForPHI
...ked. //-------------------------------------------------------------------------// 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 be wrapped around. We cannot make any guarantee // about signed or unsigned overflow because pointers are // unsigned...
2013 Oct 02
0
[LLVMdev] ScalarEvolution::createNodeForPHI
...------------------------------------------------------------// > 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 be wrapped around. We cannot make any guarantee > // about signed or unsigned overflow because pointe...
2013 Nov 13
2
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
...sw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 512 br i1 %exitcond, label %for.end, label %for.body And, when going through the GEP: %0 = shl nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds i32* %b, i64 %0 ScalarEvolution::createNodeForGEP() is losing the SCEV::FlagNSW, and I believe it's because of this piece of code in getMulExpr(): // Build the new addrec. Propagate the NUW and NSW flags if both the // outer mul and the inner addrec are guaranteed to have no overflow. // // No self-wrap cannot be guaranteed after changing the step...
2013 Oct 02
1
[LLVMdev] ScalarEvolution::createNodeForPHI
...-----------------------------------// > > 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 be wrapped around. We cannot make any guarantee > > // about signed or unsigne...
2013 Nov 16
0
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
...eq i64 %indvars.iv.next, 512 > br i1 %exitcond, label %for.end, label %for.body > > And, when going through the GEP: > > %0 = shl nsw i64 %indvars.iv, 1 > %arrayidx = getelementptr inbounds i32* %b, i64 %0 > > ScalarEvolution::createNodeForGEP() is losing the SCEV::FlagNSW, and I believe it's because of this piece of code in getMulExpr(): > > // Build the new addrec. Propagate the NUW and NSW flags if both the > // outer mul and the inner addrec are guaranteed to have no overflow. > // > // No self-wrap cannot be guaranteed...
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