Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/loopopts.cpp @ 23818:5c3f2bcc3b94
8149543: range check CastII nodes should not be split through Phi
Summary: splitting range check CastIIs through loop induction Phi prevents further optimizations
Reviewed-by: kvn, mcberg
author | roland |
---|---|
date | Thu, 11 Feb 2016 12:42:12 +0100 |
parents | 535618ab1c04 |
children | f13e777eb255 |
comparison
equal
deleted
inserted
replaced
23817:c9035b8e388b | 23818:5c3f2bcc3b94 |
---|---|
38 // Split Node 'n' through merge point if there is enough win. | 38 // Split Node 'n' through merge point if there is enough win. |
39 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) { | 39 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) { |
40 if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) { | 40 if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) { |
41 // ConvI2L may have type information on it which is unsafe to push up | 41 // ConvI2L may have type information on it which is unsafe to push up |
42 // so disable this for now | 42 // so disable this for now |
43 return NULL; | |
44 } | |
45 | |
46 // Splitting range check CastIIs through a loop induction Phi can | |
47 // cause new Phis to be created that are left unrelated to the loop | |
48 // induction Phi and prevent optimizations (vectorization) | |
49 if (n->Opcode() == Op_CastII && n->as_CastII()->has_range_check() && | |
50 region->is_CountedLoop() && n->in(1) == region->as_CountedLoop()->phi()) { | |
43 return NULL; | 51 return NULL; |
44 } | 52 } |
45 | 53 |
46 int wins = 0; | 54 int wins = 0; |
47 assert(!n->is_CFG(), ""); | 55 assert(!n->is_CFG(), ""); |