src/share/vm/opto/addnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/addnode.cpp Fri Sep 5 09:27:16 2008
--- new/src/share/vm/opto/addnode.cpp Fri Sep 5 09:27:16 2008
*** 155,164 ****
--- 155,166 ----
// Convert "(x+1)+y" into "(x+y)+1". Push constants down the expression tree.
if( add1_op == this_op && !con_right ) {
Node *a12 = add1->in(2);
const Type *t12 = phase->type( a12 );
if( t12->singleton() && t12 != Type::TOP && (add1 != add1->in(1)) ) {
+ if (add1->in(1) == this)
+ return phase->C->top(); // Dead loop
add2 = add1->clone();
add2->set_req(2, in(2));
add2 = phase->transform(add2);
set_req(1, add2);
set_req(2, a12);
*** 171,180 ****
--- 173,184 ----
int add2_op = add2->Opcode();
if( add2_op == this_op && !con_left ) {
Node *a22 = add2->in(2);
const Type *t22 = phase->type( a22 );
if( t22->singleton() && t22 != Type::TOP && (add2 != add2->in(1)) ) {
+ if (add2->in(1) == this)
+ return phase->C->top(); // Dead loop
Node *addx = add2->clone();
addx->set_req(1, in(1));
addx->set_req(2, add2->in(1));
addx = phase->transform(addx);
set_req(1, addx);
src/share/vm/opto/addnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File