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

Reviewed-by: adinn, ngasson
  • Loading branch information
Andrew Haley committed Sep 8, 2021
1 parent a66629a commit 6750c34
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hotspot/cpu/aarch64/
Expand Up @@ -2642,6 +2642,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 6750c34

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.