Skip to content


Browse files Browse the repository at this point in the history
8270533: AArch64: size_fits_all_mem_uses should return false if its o…
…utput is a CAS

Backport-of: 6750c34c92b5f28bba4a88ac798b800fce380d32
  • Loading branch information
Alexey Pavlyutkin authored and Yuri Nesterenko committed Nov 9, 2021
1 parent 7176520 commit 43ae179
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hotspot/cpu/aarch64/
Expand Up @@ -2613,6 +2613,13 @@ const RegMask Matcher::method_handle_invoke_SP_save_mask() {
bool size_fits_all_mem_uses(AddPNode* addp, int shift) {
for (DUIterator_Fast imax, i = addp->fast_outs(imax); i < imax; i++) {
Node* u = addp->fast_out(i);
if (u->is_LoadStore()) {
// On AArch64, LoadStoreNodes (i.e. compare and swap
// instructions) only take register indirect as an operand, so
// any attempt to use an AddPNode as an input to a LoadStoreNode
// must fail.
return false;
if (u->is_Mem()) {
int opsize = u->as_Mem()->memory_size();
assert(opsize > 0, "unexpected memory operand size");
Expand Down

1 comment on commit 43ae179

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.