Integrated: 8294261: AArch64: Use pReg instead of pRegGov when possible
Ningsheng Jian
njian at openjdk.org
Tue Oct 11 01:09:34 UTC 2022
On Wed, 28 Sep 2022 05:52:40 GMT, Ningsheng Jian <njian at openjdk.org> wrote:
> Currently we allocate SVE predicate register p0-p6 for pRegGov operand, which are used as governing predicates for load/store and arithmetic, and also define pReg operand for all allocatable predicate registers. Since some SVE instructions are fine to use/define p8-p15, e.g. predicate operations, this patch makes the matcher work for mixed use of pRegGov and pReg, and tries to match pReg when possible. If a predicate reg is defined as pReg but used as pRegGov, register allocator will handle that properly.
>
> With p8-p15 being used as non-temp register, we need to save them as well when saving all registers. The code of setting predicate reg slot in OopMap in RegisterSaver::save_live_registers() is also removed, because on safepoint, vector masks have been transformed to vector [1].
>
> Tested on different SVE systems. Also tested with making RA to allocate p8-p15 first for vReg operand, so that a p8-p15 reg has more chance to be allocated, and if an SVE instruction, emitted by ad rule, does not accept p8-p5, assembler will crash.
>
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/vector.cpp#L265
This pull request has now been integrated.
Changeset: 4b17d28a
Author: Ningsheng Jian <njian at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/4b17d28a6d56726d49090bfd05d945e8f688fe53
Stats: 103 lines in 6 files changed: 6 ins; 17 del; 80 mod
8294261: AArch64: Use pReg instead of pRegGov when possible
Reviewed-by: ngasson, xgong
-------------
PR: https://git.openjdk.org/jdk/pull/10461
More information about the hotspot-dev
mailing list