| OLD | NEW |
| 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 "src/compiler/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
| 6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
| 7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1870 switch (value->opcode()) { | 1870 switch (value->opcode()) { |
| 1871 case IrOpcode::kInt32Add: | 1871 case IrOpcode::kInt32Add: |
| 1872 return VisitWordCompare(this, value, kArm64Cmn32, &cont, true, | 1872 return VisitWordCompare(this, value, kArm64Cmn32, &cont, true, |
| 1873 kArithmeticImm); | 1873 kArithmeticImm); |
| 1874 case IrOpcode::kInt32Sub: | 1874 case IrOpcode::kInt32Sub: |
| 1875 return VisitWordCompare(this, value, kArm64Cmp32, &cont, false, | 1875 return VisitWordCompare(this, value, kArm64Cmp32, &cont, false, |
| 1876 kArithmeticImm); | 1876 kArithmeticImm); |
| 1877 case IrOpcode::kWord32And: | 1877 case IrOpcode::kWord32And: |
| 1878 return VisitWordCompare(this, value, kArm64Tst32, &cont, true, | 1878 return VisitWordCompare(this, value, kArm64Tst32, &cont, true, |
| 1879 kLogical32Imm); | 1879 kLogical32Imm); |
| 1880 case IrOpcode::kWord32Equal: { |
| 1881 // Word32Equal(Word32Equal(x, y), 0) => Word32Compare(x, y, ne). |
| 1882 Int32BinopMatcher mequal(value); |
| 1883 node->ReplaceInput(0, mequal.left().node()); |
| 1884 node->ReplaceInput(1, mequal.right().node()); |
| 1885 cont.Negate(); |
| 1886 return VisitWord32Compare(this, node, &cont); |
| 1887 } |
| 1880 default: | 1888 default: |
| 1881 break; | 1889 break; |
| 1882 } | 1890 } |
| 1883 return VisitWord32Test(this, value, &cont); | 1891 return VisitWord32Test(this, value, &cont); |
| 1884 } | 1892 } |
| 1885 } | 1893 } |
| 1886 VisitWord32Compare(this, node, &cont); | 1894 VisitWord32Compare(this, node, &cont); |
| 1887 } | 1895 } |
| 1888 | 1896 |
| 1889 | 1897 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2070 MachineOperatorBuilder::kFloat64RoundTruncate | | 2078 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 2071 MachineOperatorBuilder::kFloat64RoundTiesAway | | 2079 MachineOperatorBuilder::kFloat64RoundTiesAway | |
| 2072 MachineOperatorBuilder::kWord32ShiftIsSafe | | 2080 MachineOperatorBuilder::kWord32ShiftIsSafe | |
| 2073 MachineOperatorBuilder::kInt32DivIsSafe | | 2081 MachineOperatorBuilder::kInt32DivIsSafe | |
| 2074 MachineOperatorBuilder::kUint32DivIsSafe; | 2082 MachineOperatorBuilder::kUint32DivIsSafe; |
| 2075 } | 2083 } |
| 2076 | 2084 |
| 2077 } // namespace compiler | 2085 } // namespace compiler |
| 2078 } // namespace internal | 2086 } // namespace internal |
| 2079 } // namespace v8 | 2087 } // namespace v8 |
| OLD | NEW |