search for: addinstruct

Displaying 3 results from an estimated 3 matches for "addinstruct".

2009 Feb 08
0
[LLVMdev] overflow + saturation stuff
Hi Chris, Would it be better 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:...
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
...d. This also interacts with FP rounding mode stuff, which I expect to handle 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 (is...