hotspot/src/share/vm/opto/mulnode.cpp
changeset 10255 bab46e6f7661
parent 7397 5b173b4ca846
child 13895 f6dfe4123709
equal deleted inserted replaced
10254:406448a00c51 10255:bab46e6f7661
    96     if( mul1->Opcode() == mul_opcode() ) {  // Left input is a multiply?
    96     if( mul1->Opcode() == mul_opcode() ) {  // Left input is a multiply?
    97       // Mul of a constant?
    97       // Mul of a constant?
    98       const Type *t12 = phase->type( mul1->in(2) );
    98       const Type *t12 = phase->type( mul1->in(2) );
    99       if( t12->singleton() && t12 != Type::TOP) { // Left input is an add of a constant?
    99       if( t12->singleton() && t12 != Type::TOP) { // Left input is an add of a constant?
   100         // Compute new constant; check for overflow
   100         // Compute new constant; check for overflow
   101         const Type *tcon01 = mul1->as_Mul()->mul_ring(t2,t12);
   101         const Type *tcon01 = ((MulNode*)mul1)->mul_ring(t2,t12);
   102         if( tcon01->singleton() ) {
   102         if( tcon01->singleton() ) {
   103           // The Mul of the flattened expression
   103           // The Mul of the flattened expression
   104           set_req(1, mul1->in(1));
   104           set_req(1, mul1->in(1));
   105           set_req(2, phase->makecon( tcon01 ));
   105           set_req(2, phase->makecon( tcon01 ));
   106           t2 = tcon01;
   106           t2 = tcon01;