| Index: src/IceConverter.cpp
|
| diff --git a/src/IceConverter.cpp b/src/IceConverter.cpp
|
| index 8dcfce4b38228310cb08e8137aa16b984c1c9619..ca73a8b983098e7625db24ea30535e0dfaba91cc 100644
|
| --- a/src/IceConverter.cpp
|
| +++ b/src/IceConverter.cpp
|
| @@ -103,7 +103,7 @@ public:
|
| GV->getName());
|
| } else if (const ConstantInt *CI = dyn_cast<ConstantInt>(Const)) {
|
| return Ctx->getConstantInt(convertToIceType(CI->getType()),
|
| - CI->getZExtValue());
|
| + CI->getSExtValue());
|
| } else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(Const)) {
|
| Ice::Type Type = convertToIceType(CFP->getType());
|
| if (Type == Ice::IceType_f32)
|
| @@ -497,7 +497,7 @@ private:
|
| unsigned CurrentCase = 0;
|
| for (SwitchInst::ConstCaseIt I = Inst->case_begin(), E = Inst->case_end();
|
| I != E; ++I, ++CurrentCase) {
|
| - uint64_t CaseValue = I.getCaseValue()->getZExtValue();
|
| + uint64_t CaseValue = I.getCaseValue()->getSExtValue();
|
| Ice::CfgNode *CaseSuccessor = mapBasicBlockToNode(I.getCaseSuccessor());
|
| Switch->addBranch(CurrentCase, CaseValue, CaseSuccessor);
|
| }
|
|
|