Displaying 3 results from an estimated 3 matches for "undefinedsigned".
Did you mean:
  undefinedunsigned
  
2009 Feb 08
0
[LLVMdev] overflow + saturation stuff
...tter to split add into multiple opcodes instead of using
SubclassData bits?  Compare this:
    switch (I->getOpcode()) {
    case Instruction::Add: {
       switch (cast<Add>(I)->getOverflowBehavior()) {
       case AddInstruction::Wrapping:
          // ...
       case AddInstruction::UndefinedSigned:
          // ...
       case AddInstruction::UndefinedUnsigned:
          // ...
       }
    }
    }
with this:
    switch (I->getOpcode()) {
    case Instruction::Add:
      // ...
    case Instruction::SAdd_Open:
       // ...
    case Instruction::UAdd_Open:
       // ...
       break;...
2009 Feb 07
6
[LLVMdev] overflow + saturation stuff
Edwin was asking about how we should handle PR3328, how we should make  
GEP respect -fwrapv etc.  I wrote up some thoughts here if anyone is  
interested:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt
-Chris
2009 Feb 08
2
[LLVMdev] overflow + saturation stuff
...the same way with FP operations some day.
> Compare this:
>
>    switch (I->getOpcode()) {
>    case Instruction::Add: {
>       switch (cast<Add>(I)->getOverflowBehavior()) {
>       case AddInstruction::Wrapping:
>          // ...
>       case AddInstruction::UndefinedSigned:
>          // ...
>       case AddInstruction::UndefinedUnsigned:
Sure, that is ugly.  However, I think it would be much more common to  
look at these in "isa" flavored tests than switches:
if (isa<SAdd_OpenInst>(X))
is much nicer than:
if (BinaryOperator *BO = dyn_cast&...