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

Side by Side Diff: test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc

Issue 1013743006: [turbofan][arm64] Match fneg for -0.0 - x pattern. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « src/compiler/instruction-codes.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "test/unittests/compiler/instruction-selector-unittest.h" 5 #include "test/unittests/compiler/instruction-selector-unittest.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 2239 matching lines...) Expand 10 before | Expand all | Expand 10 after
2250 m.Return(n); 2250 m.Return(n);
2251 Stream s = m.Build(); 2251 Stream s = m.Build();
2252 ASSERT_EQ(1U, s.size()); 2252 ASSERT_EQ(1U, s.size());
2253 EXPECT_EQ(kArm64Clz32, s[0]->arch_opcode()); 2253 EXPECT_EQ(kArm64Clz32, s[0]->arch_opcode());
2254 ASSERT_EQ(1U, s[0]->InputCount()); 2254 ASSERT_EQ(1U, s[0]->InputCount());
2255 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0))); 2255 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0)));
2256 ASSERT_EQ(1U, s[0]->OutputCount()); 2256 ASSERT_EQ(1U, s[0]->OutputCount());
2257 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); 2257 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
2258 } 2258 }
2259 2259
2260
2261 TEST_F(InstructionSelectorTest, Float64SubWithMinusZero) {
2262 StreamBuilder m(this, kMachFloat64, kMachFloat64);
2263 Node* const p0 = m.Parameter(0);
2264 Node* const n = m.Float64Sub(m.Float64Constant(-0.0), p0);
2265 m.Return(n);
2266 Stream s = m.Build();
2267 ASSERT_EQ(1U, s.size());
2268 EXPECT_EQ(kArm64Float64Neg, s[0]->arch_opcode());
2269 ASSERT_EQ(1U, s[0]->InputCount());
2270 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0)));
2271 ASSERT_EQ(1U, s[0]->OutputCount());
2272 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
2273 }
2274
2260 } // namespace compiler 2275 } // namespace compiler
2261 } // namespace internal 2276 } // namespace internal
2262 } // namespace v8 2277 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-codes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698