Displaying 11 results from an estimated 11 matches for "hasnosignedwrap".
2013 Oct 01
3
[LLVMdev] ScalarEvolution::createNodeForPHI
...p: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 be wrapped around. We cannot make any guarantee
// about signed or unsigned...
2015 Apr 06
2
[LLVMdev] inconsistent wording in the LangRef regarding "shl nsw"
...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 is supposed to be
"IVal->isNotMinSignedValue()" or equivalent....
2014 Jun 25
2
[LLVMdev] Question Regarding Sign-Overflow
.../InstCombine/InstCombineAddSub.cpp&ct=xref_jump_to_def&cl=GROK&l=1470&gsn=V>); 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>->setHasNoSignedWrap <https://cs.corp.google.com/#piper///depot/google3/third_party/llvm/llvm/lib/IR/Instructions.cpp&ct=xref_jump_to_def&cl=GROK&l=2013&gsn=setHasNoSignedWrap>(I <https://cs.corp.google.com/#piper///depot/google3/third_party/llvm/llvm/lib/Transforms/InstCombine/InstCombineAddSu...
2013 Oct 02
0
[LLVMdev] ScalarEvolution::createNodeForPHI
...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 be wrapped around. We cannot make any guarantee
> //...
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 ma...
2017 Feb 15
2
Unsigned int displaying as negative
Thanks for your reply.
We are propagating sign info to tablegen currently using
BinaryWithFlagsSDNode.Flags.hasNoSignedWrap atm.
I imagine (I have not looked) they are printed according to instruction in
AsmPrinter.cpp (pure speculation).
I'm still confused as to why 0x7FFF is ok to match 16 bit int but not
0x8000?
Thanks.
On Wed, Feb 15, 2017 at 1:44 PM, Manuel Jacob <me at manueljacob.de> wrote:
> Hi...
2017 Feb 15
5
Unsigned int displaying as negative
...<me at manueljacob.de>
>> wrote:
>>
>>> On 2017-02-15 19:54, Ryan Taylor wrote:
>>>
>>>> Thanks for your reply.
>>>>
>>>> We are propagating sign info to tablegen currently using
>>>> BinaryWithFlagsSDNode.Flags.hasNoSignedWrap atm.
>>>>
>>>
>>> Note that this flag doesn't indicate signedness of the operation. It
>>> just means that the optimizer or code generator can assume that no
>>> signed
>>> overflow will happen during the operation. To get a better...
2017 Feb 15
4
Unsigned int displaying as negative
...let mayLoad = 1;
}
On Wed, Feb 15, 2017 at 2:24 PM, Manuel Jacob <me at manueljacob.de> wrote:
> On 2017-02-15 19:54, Ryan Taylor wrote:
>
>> Thanks for your reply.
>>
>> We are propagating sign info to tablegen currently using
>> BinaryWithFlagsSDNode.Flags.hasNoSignedWrap atm.
>>
>
> Note that this flag doesn't indicate signedness of the operation. It just
> means that the optimizer or code generator can assume that no signed
> overflow will happen during the operation. To get a better understanding
> of why this flag is not suitable for r...
2017 Feb 15
6
Unsigned int displaying as negative
I'm curious why 'unsigned short w = 0x8000' is displayed as -32768 in the
IR?
This propagates to the DAG and hence tablegen, where I am missing matching
on some immediates because the immediate is not being looked at as
unsigned? For example, we have no issue if instead of 0x8000 we use 0x7FFF,
then everything is fine, the match is fine.
I can understand that it's just being
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
2019 Feb 27
3
funnel shift, select, and poison
You are right: select in SDAG has to be poison-blocking as well,
otherwise the current lowering from IR's select to SDAG's select would
be wrong. Which makes the select->or transformation incorrect at SDAG
level as well.
I guess until recently people believed that poison in SDAG wasn't much
of a problem (myself included). I was convinced otherwise with the
test cases that