On Sun, 22 Nov 2026 05:39:11 GMT, Shawn Emery <[email protected]> wrote:

> -Xcomp by itself does not guarantee intrinsic substitution, hence the 1 
> return value here.

@smemery The problem of testing intrinsics was discussed when @ferakocz 
implemented ML_KEM for x86 and aarch64 (I raised the issue on a related aarch64 
[cleanup PR](https://github.com/openjdk/jdk/pull/24026) but the solution was 
implemented as part of the x86 implementation PR by modifying the test 
`Launcher` program).

In that case -Xcomp was proposed as a way to guarantee that the intrinsic was 
called. If it does not offer such a guarantee then I think we have a wider 
problem. Perhaps @ferakocz can confirm what was actually done to force the 
relevant intrinsics to be exercised and why it taken to be correct?

One thing you might consider is passing 
`-XX:CompileCommand=compileony,CallerClass::callerMethod` to the test in order 
to force compilation of the method that invokes the intrinsic. This should 
guarantee a call out to the foreign code from the compiled caller method and 
would also avoid the need for any warmup.

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

PR Comment: https://git.openjdk.org/jdk/pull/33709#issuecomment-7099552768

Reply via email to