src/share/vm/opto/memnode.cpp

changeset 503
daf38130e60d
parent 499
b8f5ba577b02
child 509
2a9af0b9cb1c
     1.1 --- a/src/share/vm/opto/memnode.cpp	Tue Mar 18 11:17:37 2008 -0700
     1.2 +++ b/src/share/vm/opto/memnode.cpp	Tue Mar 18 23:44:46 2008 -0700
     1.3 @@ -1881,7 +1881,7 @@
     1.4  //------------------------------Identity---------------------------------------
     1.5  // Clearing a zero length array does nothing
     1.6  Node *ClearArrayNode::Identity( PhaseTransform *phase ) {
     1.7 -  return phase->type(in(2))->higher_equal(TypeInt::ZERO)  ? in(1) : this;
     1.8 +  return phase->type(in(2))->higher_equal(TypeX::ZERO)  ? in(1) : this;
     1.9  }
    1.10  
    1.11  //------------------------------Idealize---------------------------------------
    1.12 @@ -1954,6 +1954,11 @@
    1.13                                     Node* start_offset,
    1.14                                     Node* end_offset,
    1.15                                     PhaseGVN* phase) {
    1.16 +  if (start_offset == end_offset) {
    1.17 +    // nothing to do
    1.18 +    return mem;
    1.19 +  }
    1.20 +
    1.21    Compile* C = phase->C;
    1.22    int unit = BytesPerLong;
    1.23    Node* zbase = start_offset;
    1.24 @@ -1979,6 +1984,11 @@
    1.25                                     intptr_t start_offset,
    1.26                                     intptr_t end_offset,
    1.27                                     PhaseGVN* phase) {
    1.28 +  if (start_offset == end_offset) {
    1.29 +    // nothing to do
    1.30 +    return mem;
    1.31 +  }
    1.32 +
    1.33    Compile* C = phase->C;
    1.34    assert((end_offset % BytesPerInt) == 0, "odd end offset");
    1.35    intptr_t done_offset = end_offset;

mercurial