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

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: Addressed review comments 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') | tests_lit/llvm2ice_tests/fp_const_pool.ll » ('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..3fed11c4c116daea727698b5c39ab57b4b8e4488 100644
--- a/src/IceTargetLoweringMIPS32.h
+++ b/src/IceTargetLoweringMIPS32.h
@@ -38,8 +38,9 @@ public:
if (auto *ConstDouble = llvm::dyn_cast<ConstantDouble>(C)) {
return !Utils::isPositiveZero(ConstDouble->getValue());
}
- if (llvm::isa<ConstantFloat>(C))
- return true;
+ if (auto *ConstFloat = llvm::dyn_cast<ConstantFloat>(C)) {
+ return !Utils::isPositiveZero(ConstFloat->getValue());
+ }
return false;
}
static std::unique_ptr<::Ice::TargetLowering> create(Cfg *Func) {
@@ -824,7 +825,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') | tests_lit/llvm2ice_tests/fp_const_pool.ll » ('J')

Powered by Google App Engine
This is Rietveld 408576698