Integrated: 8327172: C2 SuperWord: data node in loop has no input in loop: replace assert with bailout

Emanuel Peter epeter at openjdk.org
Thu Mar 7 07:51:59 UTC 2024


On Tue, 5 Mar 2024 14:53:33 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> This is a regression fix from https://github.com/openjdk/jdk/pull/17657.
> 
> I had never encountered an example where a data node in the loop body did not have any input node in the loop.
> My assumption was that this should never happen, such a node should move out of the loop itself.
> 
> I now encountered such an example. But I think it shows that there are cases where we compute the ctrl wrong.
> 
> https://github.com/openjdk/jdk/blob/8835f786b8dc7db1ebff07bbb3dbb61a6c42f6c8/test/hotspot/jtreg/compiler/loopopts/superword/TestNoInputInLoop.java#L65-L73
> 
> I now had a few options:
> 1. Revert to the code before https://github.com/openjdk/jdk/pull/17657: handle such cases with the extra `data_entry` logic. But this would just be extra complexity for patterns that shoud not exist in the first place.
> 2. Fix the computation of ctrl. But we know that there are many edge cases that are currently wrong, and I am working on verification and fixing these issues in https://github.com/openjdk/jdk/pull/16558. So I would rather fix those pre-existing issues separately.
> 3. Just create a silent bailout from vectorization, with `VStatus::make_failure`.
> 
> I chose option 3, since it allows simple logic, and only prevents vectorization in cases that are already otherwise broken.

This pull request has now been integrated.

Changeset: f54e5983
Author:    Emanuel Peter <epeter at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/f54e59835492e86b9178b2050901579707f41100
Stats:     103 lines in 3 files changed: 100 ins; 1 del; 2 mod

8327172: C2 SuperWord: data node in loop has no input in loop: replace assert with bailout

Reviewed-by: chagedorn, kvn

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

PR: https://git.openjdk.org/jdk/pull/18123


More information about the hotspot-compiler-dev mailing list