RFR: 8309268: C2: "assert(in_bb(n)) failed: must be" after JDK-8306302 [v2]
Emanuel Peter
epeter at openjdk.org
Fri Jun 2 13:23:34 UTC 2023
> This is the fix to a regression caused in the CMoveV fix JDK-8306302.
>
> I had implicitly assumed that all `Cmp` in the loop also have their `in(1)` inside the loop (`in_bb`). This is not always true, and hence we hit the assert.
>
> **Solution**
>
> However, we know that at least one of the two inputs of a `Cmp` must also be in the loop, else the `Cmp` would float outside the loop. So if `in(1)` is not in the loop then we can just pick `in(2)` for the `velt_type`.
>
> **Testing**
> I added 2 regression tests that were provided in the bug, and also extended `TestVectorConditionalMove.java` (though it is currently problemlisted because of an IR framework bug). This extension also triggered the assert, and now properly vectorizes.
>
> I tested up to tier6 and stress testing. I ran the tests both with `TestVectorConditionalMove` problemlisted and without the problemlisting.
> **Running... but so far all good**
Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
Roberto's suggestions
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/14268/files
- new: https://git.openjdk.org/jdk/pull/14268/files/61eae9c1..775d7ca1
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=14268&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=14268&range=00-01
Stats: 4 lines in 2 files changed: 1 ins; 1 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/14268.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14268/head:pull/14268
PR: https://git.openjdk.org/jdk/pull/14268
More information about the hotspot-compiler-dev
mailing list