summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorRoger Ferrer Ibanez <rofirrim@gmail.com>2018-08-27 07:08:18 +0000
committerRoger Ferrer Ibanez <rofirrim@gmail.com>2018-08-27 07:08:18 +0000
commitfe282170487a7f021aca0af774091fcdf9a9c41b (patch)
tree2accb9b429d051141db3f42cd1404130f488bb5f /llvm/test/CodeGen
parentbe4a54940e01358103887c1a1271d9797e279af8 (diff)
downloadbcm5719-llvm-fe282170487a7f021aca0af774091fcdf9a9c41b.tar.gz
bcm5719-llvm-fe282170487a7f021aca0af774091fcdf9a9c41b.zip
[RISCV] atomic_store_nn have a different layout to regular store
We cannot directy reuse the patterns of StPat because for some reason the store DAG node and the atomic_store_nn DAG nodes put the ptr and the value in different positions. Currently we attempt to store the address to an address formed by the value. Differential Revision: https://reviews.llvm.org/D51217 llvm-svn: 340722
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/RISCV/atomic-load-store.ll24
1 files changed, 12 insertions, 12 deletions
diff --git a/llvm/test/CodeGen/RISCV/atomic-load-store.ll b/llvm/test/CodeGen/RISCV/atomic-load-store.ll
index 4e4a046ae29..ba2b594c1c7 100644
--- a/llvm/test/CodeGen/RISCV/atomic-load-store.ll
+++ b/llvm/test/CodeGen/RISCV/atomic-load-store.ll
@@ -350,7 +350,7 @@ define void @atomic_store_i8_unordered(i8 *%a, i8 %b) nounwind {
;
; RV32IA-LABEL: atomic_store_i8_unordered:
; RV32IA: # %bb.0:
-; RV32IA-NEXT: sb a0, 0(a1)
+; RV32IA-NEXT: sb a1, 0(a0)
; RV32IA-NEXT: ret
store atomic i8 %b, i8* %a unordered, align 1
ret void
@@ -369,7 +369,7 @@ define void @atomic_store_i8_monotonic(i8 *%a, i8 %b) nounwind {
;
; RV32IA-LABEL: atomic_store_i8_monotonic:
; RV32IA: # %bb.0:
-; RV32IA-NEXT: sb a0, 0(a1)
+; RV32IA-NEXT: sb a1, 0(a0)
; RV32IA-NEXT: ret
store atomic i8 %b, i8* %a monotonic, align 1
ret void
@@ -389,7 +389,7 @@ define void @atomic_store_i8_release(i8 *%a, i8 %b) nounwind {
; RV32IA-LABEL: atomic_store_i8_release:
; RV32IA: # %bb.0:
; RV32IA-NEXT: fence rw, w
-; RV32IA-NEXT: sb a0, 0(a1)
+; RV32IA-NEXT: sb a1, 0(a0)
; RV32IA-NEXT: ret
store atomic i8 %b, i8* %a release, align 1
ret void
@@ -409,7 +409,7 @@ define void @atomic_store_i8_seq_cst(i8 *%a, i8 %b) nounwind {
; RV32IA-LABEL: atomic_store_i8_seq_cst:
; RV32IA: # %bb.0:
; RV32IA-NEXT: fence rw, w
-; RV32IA-NEXT: sb a0, 0(a1)
+; RV32IA-NEXT: sb a1, 0(a0)
; RV32IA-NEXT: ret
store atomic i8 %b, i8* %a seq_cst, align 1
ret void
@@ -428,7 +428,7 @@ define void @atomic_store_i16_unordered(i16 *%a, i16 %b) nounwind {
;
; RV32IA-LABEL: atomic_store_i16_unordered:
; RV32IA: # %bb.0:
-; RV32IA-NEXT: sh a0, 0(a1)
+; RV32IA-NEXT: sh a1, 0(a0)
; RV32IA-NEXT: ret
store atomic i16 %b, i16* %a unordered, align 2
ret void
@@ -447,7 +447,7 @@ define void @atomic_store_i16_monotonic(i16 *%a, i16 %b) nounwind {
;
; RV32IA-LABEL: atomic_store_i16_monotonic:
; RV32IA: # %bb.0:
-; RV32IA-NEXT: sh a0, 0(a1)
+; RV32IA-NEXT: sh a1, 0(a0)
; RV32IA-NEXT: ret
store atomic i16 %b, i16* %a monotonic, align 2
ret void
@@ -467,7 +467,7 @@ define void @atomic_store_i16_release(i16 *%a, i16 %b) nounwind {
; RV32IA-LABEL: atomic_store_i16_release:
; RV32IA: # %bb.0:
; RV32IA-NEXT: fence rw, w
-; RV32IA-NEXT: sh a0, 0(a1)
+; RV32IA-NEXT: sh a1, 0(a0)
; RV32IA-NEXT: ret
store atomic i16 %b, i16* %a release, align 2
ret void
@@ -487,7 +487,7 @@ define void @atomic_store_i16_seq_cst(i16 *%a, i16 %b) nounwind {
; RV32IA-LABEL: atomic_store_i16_seq_cst:
; RV32IA: # %bb.0:
; RV32IA-NEXT: fence rw, w
-; RV32IA-NEXT: sh a0, 0(a1)
+; RV32IA-NEXT: sh a1, 0(a0)
; RV32IA-NEXT: ret
store atomic i16 %b, i16* %a seq_cst, align 2
ret void
@@ -506,7 +506,7 @@ define void @atomic_store_i32_unordered(i32 *%a, i32 %b) nounwind {
;
; RV32IA-LABEL: atomic_store_i32_unordered:
; RV32IA: # %bb.0:
-; RV32IA-NEXT: sw a0, 0(a1)
+; RV32IA-NEXT: sw a1, 0(a0)
; RV32IA-NEXT: ret
store atomic i32 %b, i32* %a unordered, align 4
ret void
@@ -525,7 +525,7 @@ define void @atomic_store_i32_monotonic(i32 *%a, i32 %b) nounwind {
;
; RV32IA-LABEL: atomic_store_i32_monotonic:
; RV32IA: # %bb.0:
-; RV32IA-NEXT: sw a0, 0(a1)
+; RV32IA-NEXT: sw a1, 0(a0)
; RV32IA-NEXT: ret
store atomic i32 %b, i32* %a monotonic, align 4
ret void
@@ -545,7 +545,7 @@ define void @atomic_store_i32_release(i32 *%a, i32 %b) nounwind {
; RV32IA-LABEL: atomic_store_i32_release:
; RV32IA: # %bb.0:
; RV32IA-NEXT: fence rw, w
-; RV32IA-NEXT: sw a0, 0(a1)
+; RV32IA-NEXT: sw a1, 0(a0)
; RV32IA-NEXT: ret
store atomic i32 %b, i32* %a release, align 4
ret void
@@ -565,7 +565,7 @@ define void @atomic_store_i32_seq_cst(i32 *%a, i32 %b) nounwind {
; RV32IA-LABEL: atomic_store_i32_seq_cst:
; RV32IA: # %bb.0:
; RV32IA-NEXT: fence rw, w
-; RV32IA-NEXT: sw a0, 0(a1)
+; RV32IA-NEXT: sw a1, 0(a0)
; RV32IA-NEXT: ret
store atomic i32 %b, i32* %a seq_cst, align 4
ret void
OpenPOWER on IntegriCloud