RFR: 8252188: Crash in OrINode::Ideal(PhaseGVN*, bool)+0x8b9

Vladimir Kozlov kvn at openjdk.java.net
Sat Sep 19 01:57:14 UTC 2020


Code added by [8248830](https://bugs.openjdk.java.net/browse/JDK-8248830) uses Node::is_Con() check when looking for
constant shift values.

Unfortunately it does not guarantee that it will be Integer constant because TOP node is also ConNode. I used C2 types
to check and get shift values. I also refactor code to consolidate checks.

Method degenerate_vector_rotate() in vectornode.cpp has is_Con() check and, in general, it could be TOP because we do
loop optimizations after vectorization. I added isa_int() check and treat 'cnt' in other case as variable to do
transformation on 'else' branch and let sub-graph collapse there. I also refactor degenerate_vector_rotate() to make it
compact.

I removed OrVNode::Ideal() method added by 8248830 because it is currently not used (it is for Vector API). And its
code is convoluted and does not match code in OrINode::Ideal().

I moved Rotate vectorization tests into new test files TestIntVectRotate.java and TestLongVectRotate.java and added
more tests methods for which vectors are created.

Tested: tier1, hs-tier2, hs-tier3.
Verified fix with replay file from bug report.
I also checked that RotateBenchmark.java added by 8248830 still creates Rotate vectors after this fix.

I created subtask to add new regerssion test later because this fix is urgent and I did not have time to prepare it.

The fix was already reviewed on mailing list
https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2020-September/039886.html

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

Commit messages:
 - 8252188: Crash in OrINode::Ideal(PhaseGVN*, bool)+0x8b9

Changes: https://git.openjdk.java.net/jdk/pull/262/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=262&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8252188
  Stats: 1342 lines in 7 files changed: 964 ins; 346 del; 32 mod
  Patch: https://git.openjdk.java.net/jdk/pull/262.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/262/head:pull/262

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


More information about the hotspot-compiler-dev mailing list