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

Unified Diff: src/code-stub-assembler.cc

Issue 2322283002: [stubs] Fix performance regression on x64 caused by modified double hole check. (Closed)
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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index 93e98713fb7509165afef9be23af0f07808f3c9d..09113048f422b439260004499125a9719c165151 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -1151,10 +1151,19 @@ Node* CodeStubAssembler::LoadDoubleWithHoleCheck(Node* base, Node* offset,
Label* if_hole,
MachineType machine_type) {
if (if_hole) {
- Node* element_upper =
- Load(MachineType::Uint32(), base,
- IntPtrAdd(offset, IntPtrConstant(kIeeeDoubleExponentWordOffset)));
- GotoIf(Word32Equal(element_upper, Int32Constant(kHoleNanUpper32)), if_hole);
+ // TODO(ishell): Compare only the upper part for the hole once the
+ // compiler is able to fold addition of already complex |offset| with
+ // |kIeeeDoubleExponentWordOffset| into one addressing mode.
+ if (Is64()) {
+ Node* element = Load(MachineType::Uint64(), base, offset);
+ GotoIf(Word64Equal(element, Int64Constant(kHoleNanInt64)), if_hole);
+ } else {
+ Node* element_upper = Load(
+ MachineType::Uint32(), base,
+ IntPtrAdd(offset, IntPtrConstant(kIeeeDoubleExponentWordOffset)));
+ GotoIf(Word32Equal(element_upper, Int32Constant(kHoleNanUpper32)),
+ if_hole);
+ }
}
if (machine_type.IsNone()) {
// This means the actual value is not needed.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698