Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: src/IceConverter.cpp

Issue 539743002: Subzero: Render constants in dump() to be more like LLVM. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceInst.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | src/IceInst.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698