changeset 58895:1bdca2cf660e vectorIntrinsics

8221634: CheckCastPP hinders vector box elimination
author vlivanov
date Tue, 02 Apr 2019 11:13:06 -0700
parents 267a0adf5479
children 7869415891c8
files src/hotspot/share/opto/castnode.cpp
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/opto/castnode.cpp	Thu Mar 28 14:22:02 2019 -0700
+++ b/src/hotspot/share/opto/castnode.cpp	Tue Apr 02 11:13:06 2019 -0700
@@ -290,9 +290,14 @@
   if (_carry_dependency) {
     return this;
   }
-  // Toned down to rescue meeting at a Phi 3 different oops all implementing
-  // the same interface.
-  return (phase->type(in(1)) == phase->type(this)) ? in(1) : this;
+  const Type* t = phase->type(in(1));
+  if (in(1)->Opcode() == Op_VectorBox) {
+    return t->higher_equal_speculative(phase->type(this)) ? in(1) : this;
+  } else {
+    // Toned down to rescue meeting at a Phi 3 different oops all implementing
+    // the same interface.
+    return (t == phase->type(this)) ? in(1) : this;
+  }
 }
 
 //------------------------------Value------------------------------------------