RFR: 8323582: C2 SuperWord AlignVector: misaligned vector memory access with unaligned native memory

Roland Westrelin roland at openjdk.org
Tue Feb 18 10:11:17 UTC 2025


On Tue, 18 Feb 2025 10:04:59 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Seems like it's a bug that `PhaseIdealLoop::add_parse_predicate` doesn't check the `bci` too. Could you fix it?
>
> @rwestrel So we would check both, right? But is that what we want for all predicates?
> 
> `C->too_many_traps(reason)` checks against `PerMethodTrapLimit`:
> 
> if (trap_count(reason) >= Deoptimization::per_method_trap_limit(reason)) {
> 
> 
> But the `bci` check works with `PerBytecodeTrapLimit`, and it actually has a comment like this:
> 
> if (md->has_trap_at(bci, m, reason) != 0) {
>   // Assume PerBytecodeTrapLimit==0, for a more conservative heuristic.
>   // Also, if there are multiple reasons, or if there is no per-BCI record,
>   // assume the worst.
> 
> So the `bci` check fails if there has been even a single trapping recorded.
> 
> So it seems that such a change would affect the behavior in ways I cannot yet predict.
> 
> What do you think?

That code is supposed to mirror the `GraphKit::add_parse_predicate()`. It doesn't. Would you like me to fix this separately?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22016#discussion_r1959437628


More information about the hotspot-dev mailing list