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

Side by Side Diff: test/cctest/compiler/test-run-machops.cc

Issue 2669203005: [arm64][turbofan] Fix add+shr for big shift values. (Closed)
Patch Set: Only consider the last 6 bits of the shift immediate Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. Use of this 1 // Copyright 2014 the V8 project authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include <cmath> 5 #include <cmath>
6 #include <functional> 6 #include <functional>
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/ieee754.h" 10 #include "src/base/ieee754.h"
(...skipping 6691 matching lines...) Expand 10 before | Expand all | Expand 10 after
6702 r.Goto(&merge); 6702 r.Goto(&merge);
6703 r.Bind(&flabel); 6703 r.Bind(&flabel);
6704 Node* fb = r.Int32Constant(0); 6704 Node* fb = r.Int32Constant(0);
6705 r.Goto(&merge); 6705 r.Goto(&merge);
6706 r.Bind(&merge); 6706 r.Bind(&merge);
6707 Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb); 6707 Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb);
6708 r.Return(phi); 6708 r.Return(phi);
6709 CHECK_EQ(1, r.Call(1)); 6709 CHECK_EQ(1, r.Call(1));
6710 } 6710 }
6711 6711
6712 #if V8_TARGET_ARCH_64_BIT
6713
6714 TEST(Regression5923) {
6715 {
6716 BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64());
6717 m.Return(m.Int64Add(
6718 m.Word64Shr(m.Parameter(0), m.Int64Constant(4611686018427387888)),
6719 m.Parameter(0)));
6720 int64_t input = 16;
6721 m.Call(input);
6722 }
6723 {
6724 BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64());
6725 m.Return(m.Int64Add(
6726 m.Parameter(0),
6727 m.Word64Shr(m.Parameter(0), m.Int64Constant(4611686018427387888))));
6728 int64_t input = 16;
6729 m.Call(input);
6730 }
6731 }
6732
6733 #endif // V8_TARGET_ARCH_64_BIT
6734
6712 } // namespace compiler 6735 } // namespace compiler
6713 } // namespace internal 6736 } // namespace internal
6714 } // namespace v8 6737 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698