RFR: 8321712: C2: "failed: Multiple uses of register" in C2_MacroAssembler::vminmax_fp
Sandhya Viswanathan
sviswanathan at openjdk.org
Tue Jan 9 00:10:39 UTC 2024
The C2_MacroAssembler::vminmax_fp and evminmax_fp were incorrectly checking for the two USE operand registers to be different and thus resulting in assertion failure.
In x86_64.ad:
instruct maxF_reg(legRegF dst, legRegF a, legRegF b, legRegF tmp, legRegF atmp, legRegF btmp) %{
...
effect(USE a, USE b, TEMP tmp, TEMP atmp, TEMP btmp);
...
__ vminmax_fp(Op_MaxV, T_FLOAT, $dst$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister, Assembler::AVX_128bit);
%}
Changing the assert in vminmax_fp from:
assert_different_registers(a, b, tmp, atmp, btmp);
to:
assert_different_registers(a, tmp, atmp, btmp);
assert_different_registers(b, tmp, atmp, btmp);
fixes the issue.
Similar change done in evminmax_fp.
Please review.
Best Regards,
Sandhya
-------------
Commit messages:
- 8321712: C2: "failed: Multiple uses of register" in C2_MacroAssembler::vminmax_fp
Changes: https://git.openjdk.org/jdk/pull/17315/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17315&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8321712
Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/17315.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17315/head:pull/17315
PR: https://git.openjdk.org/jdk/pull/17315
More information about the hotspot-compiler-dev
mailing list