RFR: 8252696: Loop unswitching may cause out of bound array load to be executed

Roland Westrelin roland at openjdk.java.net
Mon Sep 21 15:26:16 UTC 2020


On Mon, 21 Sep 2020 09:47:19 GMT, Nils Eliasson <neliasso at openjdk.org> wrote:

>> Review thread so far: https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2020-September/039853.html
>
> src/hotspot/share/opto/loopPredicate.cpp line 254:
> 
>> 252:       break;
>> 253:     if (iff->in(1)->Opcode() == Op_Opaque4 && skeleton_predicate_has_opaque(iff)) {
>> 254:       // Only need to clone range check predicates as those can be changed and duplicated by inserting
>> pre/main/post loops
> 
> Is the comment still correct? It is still always a range check predicate?

Hi Nils,
Yes, the comment is still correct. Skeleton predicates are always range checks. But in some cases to protect against
overflow, predicates perform range checks with long computations in which case they use an IfNode and not a
RangeCheckNode.

-------------

PR: https://git.openjdk.java.net/jdk/pull/176


More information about the hotspot-compiler-dev mailing list