equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
86 Node *mul1 = in(1); |
86 Node *mul1 = in(1); |
87 #ifdef ASSERT |
87 #ifdef ASSERT |
88 // Check for dead loop |
88 // Check for dead loop |
89 int op1 = mul1->Opcode(); |
89 int op1 = mul1->Opcode(); |
90 if( phase->eqv( mul1, this ) || phase->eqv( in(2), this ) || |
90 if( phase->eqv( mul1, this ) || phase->eqv( in(2), this ) || |
91 ( op1 == mul_opcode() || op1 == add_opcode() ) && |
91 ( ( op1 == mul_opcode() || op1 == add_opcode() ) && |
92 ( phase->eqv( mul1->in(1), this ) || phase->eqv( mul1->in(2), this ) || |
92 ( phase->eqv( mul1->in(1), this ) || phase->eqv( mul1->in(2), this ) || |
93 phase->eqv( mul1->in(1), mul1 ) || phase->eqv( mul1->in(2), mul1 ) ) ) |
93 phase->eqv( mul1->in(1), mul1 ) || phase->eqv( mul1->in(2), mul1 ) ) ) ) |
94 assert(false, "dead loop in MulNode::Ideal"); |
94 assert(false, "dead loop in MulNode::Ideal"); |
95 #endif |
95 #endif |
96 |
96 |
97 if( mul1->Opcode() == mul_opcode() ) { // Left input is a multiply? |
97 if( mul1->Opcode() == mul_opcode() ) { // Left input is a multiply? |
98 // Mul of a constant? |
98 // Mul of a constant? |