8238190: [JVMCI] Fix single implementor speculation for diamond shapes

Reviewed-by: kvn
This commit is contained in:
David Leopoldseder 2020-02-04 09:33:09 +01:00 committed by Doug Simon
parent f2b7509d5a
commit 135f209852
2 changed files with 103 additions and 1 deletions

View file

@ -1172,7 +1172,7 @@ void InstanceKlass::add_implementor(Klass* k) {
Klass* ik = implementor();
if (ik == NULL) {
set_implementor(k);
} else if (ik != this) {
} else if (ik != this && ik != k) {
// There is already an implementor. Use itself as an indicator of
// more than one implementors.
set_implementor(this);