src/share/vm/opto/addnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/opto/addnode.cpp
src/share/vm/opto/addnode.cpp
Print this page
rev 9125 : 8003585: strength reduce or eliminate range checks for power-of-two sized arrays
Summary: change ((x & m) u<= m) to always true and ((x & (m - 1)) u< m) into (m > 0)
Reviewed-by:
*** 59,69 ****
return this;
}
//------------------------------commute----------------------------------------
// Commute operands to move loads and constants to the right.
! static bool commute( Node *add, int con_left, int con_right ) {
Node *in1 = add->in(1);
Node *in2 = add->in(2);
// Convert "1+x" into "x+1".
// Right is a constant; leave it
--- 59,69 ----
return this;
}
//------------------------------commute----------------------------------------
// Commute operands to move loads and constants to the right.
! static bool commute(Node *add, bool con_left, bool con_right) {
Node *in1 = add->in(1);
Node *in2 = add->in(2);
// Convert "1+x" into "x+1".
// Right is a constant; leave it
*** 108,119 ****
//------------------------------Idealize---------------------------------------
// If we get here, we assume we are associative!
Node *AddNode::Ideal(PhaseGVN *phase, bool can_reshape) {
const Type *t1 = phase->type( in(1) );
const Type *t2 = phase->type( in(2) );
! int con_left = t1->singleton();
! int con_right = t2->singleton();
// Check for commutative operation desired
if( commute(this,con_left,con_right) ) return this;
AddNode *progress = NULL; // Progress flag
--- 108,119 ----
//------------------------------Idealize---------------------------------------
// If we get here, we assume we are associative!
Node *AddNode::Ideal(PhaseGVN *phase, bool can_reshape) {
const Type *t1 = phase->type( in(1) );
const Type *t2 = phase->type( in(2) );
! bool con_left = t1->singleton();
! bool con_right = t2->singleton();
// Check for commutative operation desired
if( commute(this,con_left,con_right) ) return this;
AddNode *progress = NULL; // Progress flag
src/share/vm/opto/addnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File