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

Unified Diff: src/IceConverter.cpp

Issue 737513008: Subzero: Simplify the constant pools. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Better fix for the int8/uint8 tests Created 6 years, 1 month 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/IceGlobalContext.h » ('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 3c46496b70e656f0bdd61c6bb9691b3565575791..4eb03431b5705bbcd6a52d4aea15e4107d52de5b 100644
--- a/src/IceConverter.cpp
+++ b/src/IceConverter.cpp
@@ -116,16 +116,11 @@ public:
if (const auto GV = dyn_cast<GlobalValue>(Const)) {
Ice::GlobalDeclaration *Decl = getConverter().getGlobalDeclaration(GV);
const Ice::RelocOffsetT Offset = 0;
- return Ctx->getConstantSym(TypeConverter.getIcePointerType(),
- Offset, Decl->getName(),
+ return Ctx->getConstantSym(Offset, Decl->getName(),
Decl->getSuppressMangling());
} else if (const auto CI = dyn_cast<ConstantInt>(Const)) {
Ice::Type Ty = convertToIceType(CI->getType());
- if (Ty == Ice::IceType_i64) {
- return Ctx->getConstantInt64(Ty, CI->getSExtValue());
- } else {
- return Ctx->getConstantInt32(Ty, CI->getSExtValue());
- }
+ return Ctx->getConstantInt(Ty, CI->getSExtValue());
} else if (const auto CFP = dyn_cast<ConstantFP>(Const)) {
Ice::Type Type = convertToIceType(CFP->getType());
if (Type == Ice::IceType_f32)
« no previous file with comments | « no previous file | src/IceGlobalContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698