Mercurial > hg > truffle
comparison src/share/vm/opto/callnode.cpp @ 20452:f8afcfbdbf1c
8046698: assert(false) failed: only Initialize or AddP expected macro.cpp:943
Summary: PhiNode inserted between AllocateNode and Initialization node confuses allocation elimination
Reviewed-by: kvn
author | roland |
---|---|
date | Sat, 02 Aug 2014 07:06:08 +0200 |
parents | 411e30e5fbb8 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
20450:fa6c442c59ee | 20452:f8afcfbdbf1c |
---|---|
775 } | 775 } |
776 return false; | 776 return false; |
777 } | 777 } |
778 | 778 |
779 // Returns the unique CheckCastPP of a call | 779 // Returns the unique CheckCastPP of a call |
780 // or 'this' if there are several CheckCastPP | 780 // or 'this' if there are several CheckCastPP or unexpected uses |
781 // or returns NULL if there is no one. | 781 // or returns NULL if there is no one. |
782 Node *CallNode::result_cast() { | 782 Node *CallNode::result_cast() { |
783 Node *cast = NULL; | 783 Node *cast = NULL; |
784 | 784 |
785 Node *p = proj_out(TypeFunc::Parms); | 785 Node *p = proj_out(TypeFunc::Parms); |
791 if (use->is_CheckCastPP()) { | 791 if (use->is_CheckCastPP()) { |
792 if (cast != NULL) { | 792 if (cast != NULL) { |
793 return this; // more than 1 CheckCastPP | 793 return this; // more than 1 CheckCastPP |
794 } | 794 } |
795 cast = use; | 795 cast = use; |
796 } else if (!use->is_Initialize() && | |
797 !use->is_AddP()) { | |
798 // Expected uses are restricted to a CheckCastPP, an Initialize | |
799 // node, and AddP nodes. If we encounter any other use (a Phi | |
800 // node can be seen in rare cases) return this to prevent | |
801 // incorrect optimizations. | |
802 return this; | |
796 } | 803 } |
797 } | 804 } |
798 return cast; | 805 return cast; |
799 } | 806 } |
800 | 807 |