mulnode.cpp (196:d1605aabd0a1) | mulnode.cpp (404:78c058bc5cdc) |
---|---|
1/* 2 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 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 7 * published by the Free Software Foundation. 8 * --- 138 unchanged lines hidden (view full) --- 147 if( t1->higher_equal( zero ) ) return zero; 148 if( t2->higher_equal( zero ) ) return zero; 149 } 150 151 // Either input is BOTTOM ==> the result is the local BOTTOM 152 if( t1 == Type::BOTTOM || t2 == Type::BOTTOM ) 153 return bottom_type(); 154 | 1/* 2 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 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 7 * published by the Free Software Foundation. 8 * --- 138 unchanged lines hidden (view full) --- 147 if( t1->higher_equal( zero ) ) return zero; 148 if( t2->higher_equal( zero ) ) return zero; 149 } 150 151 // Either input is BOTTOM ==> the result is the local BOTTOM 152 if( t1 == Type::BOTTOM || t2 == Type::BOTTOM ) 153 return bottom_type(); 154 |
155#if defined(IA32) 156 // Can't trust native compilers to properly fold strict double 157 // multiplication with round-to-zero on this platform. 158 if (op == Op_MulD && phase->C->method()->is_strict()) { 159 return TypeD::DOUBLE; 160 } 161#endif 162 |
|
155 return mul_ring(t1,t2); // Local flavor of type multiplication 156} 157 158 159//============================================================================= 160//------------------------------Ideal------------------------------------------ 161// Check for power-of-2 multiply, then try the regular MulNode::Ideal 162Node *MulINode::Ideal(PhaseGVN *phase, bool can_reshape) { --- 192 unchanged lines hidden (view full) --- 355 return TypeF::make( t0->getf() * t1->getf() ); 356} 357 358//============================================================================= 359//------------------------------mul_ring--------------------------------------- 360// Compute the product type of two double ranges into this node. 361const Type *MulDNode::mul_ring(const Type *t0, const Type *t1) const { 362 if( t0 == Type::DOUBLE || t1 == Type::DOUBLE ) return Type::DOUBLE; | 163 return mul_ring(t1,t2); // Local flavor of type multiplication 164} 165 166 167//============================================================================= 168//------------------------------Ideal------------------------------------------ 169// Check for power-of-2 multiply, then try the regular MulNode::Ideal 170Node *MulINode::Ideal(PhaseGVN *phase, bool can_reshape) { --- 192 unchanged lines hidden (view full) --- 363 return TypeF::make( t0->getf() * t1->getf() ); 364} 365 366//============================================================================= 367//------------------------------mul_ring--------------------------------------- 368// Compute the product type of two double ranges into this node. 369const Type *MulDNode::mul_ring(const Type *t0, const Type *t1) const { 370 if( t0 == Type::DOUBLE || t1 == Type::DOUBLE ) return Type::DOUBLE; |
363 // We must be adding 2 double constants. | 371 // We must be multiplying 2 double constants. |
364 return TypeD::make( t0->getd() * t1->getd() ); 365} 366 367//============================================================================= 368//------------------------------Value------------------------------------------ 369const Type *MulHiLNode::Value( PhaseTransform *phase ) const { 370 // Either input is TOP ==> the result is TOP 371 const Type *t1 = phase->type( in(1) ); --- 958 unchanged lines hidden --- | 372 return TypeD::make( t0->getd() * t1->getd() ); 373} 374 375//============================================================================= 376//------------------------------Value------------------------------------------ 377const Type *MulHiLNode::Value( PhaseTransform *phase ) const { 378 // Either input is TOP ==> the result is TOP 379 const Type *t1 = phase->type( in(1) ); --- 958 unchanged lines hidden --- |