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

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: 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 m.Call(16l);
6721 }
6722 {
6723 BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64());
6724 m.Return(m.Int64Add(
6725 m.Parameter(0),
6726 m.Word64Shr(m.Parameter(0), m.Int64Constant(4611686018427387888))));
6727 m.Call(16l);
6728 }
6729 }
6730
6731 #endif // V8_TARGET_ARCH_64_BIT
6732
6712 } // namespace compiler 6733 } // namespace compiler
6713 } // namespace internal 6734 } // namespace internal
6714 } // namespace v8 6735 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698