From 26c54187c40901643d0cf65a985c98ddcee40bf0 Mon Sep 17 00:00:00 2001
Date: Fri, 19 Apr 2019 17:42:56 +0000
Subject: [PATCH] 8171537: aarch64: compiler/c1/Test6849574.java generates guarantee failure in C1

Bug url: https://bugs.openjdk.java.net/browse/JDK-8171537

---
 hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
index 6e225870e..e536ce649 100644
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
@@ -3199,7 +3199,7 @@ void LIR_Assembler::peephole(LIR_List *lir) {
 }
 
 void LIR_Assembler::atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr dest, LIR_Opr tmp_op) {
-  Address addr = as_Address(src->as_address_ptr(), noreg);
+  Address addr = as_Address(src->as_address_ptr(), as_reg(tmp_op));
   BasicType type = src->type();
   bool is_oop = type == T_OBJECT || type == T_ARRAY;
 
-- 
2.19.0

