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

Unified Diff: src/IceTargetLoweringMIPS32.h

Issue 2351583002: [SubZero] lower float and double constants for MIPS (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 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/IceTargetLoweringMIPS32.cpp » ('j') | src/IceTargetLoweringMIPS32.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringMIPS32.h
diff --git a/src/IceTargetLoweringMIPS32.h b/src/IceTargetLoweringMIPS32.h
index 5cc412f2ad290bb27adcff09cc36b0c1945bf127..a027afdfbca89129dc0e8d5f77a6d233e63f3329 100644
--- a/src/IceTargetLoweringMIPS32.h
+++ b/src/IceTargetLoweringMIPS32.h
@@ -35,9 +35,8 @@ public:
static void staticInit(GlobalContext *Ctx);
static bool shouldBePooled(const Constant *C) {
- if (auto *ConstDouble = llvm::dyn_cast<ConstantDouble>(C)) {
- return !Utils::isPositiveZero(ConstDouble->getValue());
Jim Stichnoth 2016/09/19 20:50:14 Question about this change. Both ARM and x86 have
jaydeep.patil 2016/09/20 07:28:27 Yes, for float/double constant 0 we can use mtc1 $
- }
+ if (llvm::isa<ConstantDouble>(C))
+ return true;
if (llvm::isa<ConstantFloat>(C))
return true;
return false;
@@ -824,7 +823,6 @@ protected:
private:
~TargetDataMIPS32() override = default;
- template <typename T> static void emitConstantPool(GlobalContext *Ctx);
};
class TargetHeaderMIPS32 final : public TargetHeaderLowering {
« no previous file with comments | « no previous file | src/IceTargetLoweringMIPS32.cpp » ('j') | src/IceTargetLoweringMIPS32.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698