Mercurial > hg > graal-compiler
comparison src/share/vm/opto/macro.cpp @ 3345:bad7ecd0b6ed
5091921: Sign flip issues in loop optimizer
Summary: Fix integer overflow problem in the code generated by loop optimizer.
Reviewed-by: never
author | kvn |
---|---|
date | Wed, 04 May 2011 13:12:42 -0700 |
parents | 149bb459be66 |
children | 293f68bda347 |
comparison
equal
deleted
inserted
replaced
3344:0139aac70fb5 | 3345:bad7ecd0b6ed |
---|---|
2152 Node * n = C->macro_node(i-1); | 2152 Node * n = C->macro_node(i-1); |
2153 bool success = false; | 2153 bool success = false; |
2154 debug_only(int old_macro_count = C->macro_count();); | 2154 debug_only(int old_macro_count = C->macro_count();); |
2155 if (n->is_AbstractLock()) { | 2155 if (n->is_AbstractLock()) { |
2156 success = eliminate_locking_node(n->as_AbstractLock()); | 2156 success = eliminate_locking_node(n->as_AbstractLock()); |
2157 } else if (n->Opcode() == Op_LoopLimit) { | |
2158 // Remove it from macro list and put on IGVN worklist to optimize. | |
2159 C->remove_macro_node(n); | |
2160 _igvn._worklist.push(n); | |
2161 success = true; | |
2157 } else if (n->Opcode() == Op_Opaque1 || n->Opcode() == Op_Opaque2) { | 2162 } else if (n->Opcode() == Op_Opaque1 || n->Opcode() == Op_Opaque2) { |
2158 _igvn.replace_node(n, n->in(1)); | 2163 _igvn.replace_node(n, n->in(1)); |
2159 success = true; | 2164 success = true; |
2160 } | 2165 } |
2161 assert(success == (C->macro_count() < old_macro_count), "elimination reduces macro count"); | 2166 assert(success == (C->macro_count() < old_macro_count), "elimination reduces macro count"); |