[vectorIntrinsics+mask] RFR: 8273205: [vector] Crash in C2_MacroAssembler::vprotate_var after JDK-8271366
Jie Fu
jiefu at openjdk.java.net
Sun Sep 5 14:10:28 UTC 2021
On Fri, 3 Sep 2021 14:01:25 GMT, Jie Fu <jiefu at openjdk.org> wrote:
> Hi all,
>
> After JDK-8271366, `arch_supports_vector()` fails to check whether the rotate operation is directly supported by the target ISA.
>
> So `Matcher::match_rule_supported_vector` should be added in `inline_vector_broadcast_int()` and `inline_vector_nary_operation()` to prevent generation of unsupported rotate operation IR patterns.
>
> Thanks.
> Best regards,
> Jie
After more investigation, this bug won't reproduce in jdk repo and can be fixed like this.
diff --git a/src/hotspot/share/opto/vectorIntrinsics.cpp b/src/hotspot/share/opto/vectorIntrinsics.cpp
index 3019cb8..ae4035c 100644
--- a/src/hotspot/share/opto/vectorIntrinsics.cpp
+++ b/src/hotspot/share/opto/vectorIntrinsics.cpp
@@ -536,6 +536,7 @@ bool LibraryCallKit::inline_vector_nary_operation(int n) {
operation->add_req(mask);
operation->add_flag(Node::Flag_is_predicated_vector);
} else {
+ operation = gvn().transform(operation);
operation = new VectorBlendNode(opd1, operation, mask);
}
}
@@ -2237,6 +2238,7 @@ bool LibraryCallKit::inline_vector_broadcast_int() {
operation->add_req(mask);
operation->add_flag(Node::Flag_is_predicated_vector);
} else {
+ operation = gvn().transform(operation);
operation = new VectorBlendNode(opd1, operation, mask);
}
}
-------------
PR: https://git.openjdk.java.net/panama-vector/pull/119
More information about the panama-dev
mailing list