diff options
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/i64-load-store-alignment.ll')
-rw-r--r-- | llvm/test/CodeGen/WebAssembly/i64-load-store-alignment.ll | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/i64-load-store-alignment.ll b/llvm/test/CodeGen/WebAssembly/i64-load-store-alignment.ll index f3b8e15b602..eb303c150ef 100644 --- a/llvm/test/CodeGen/WebAssembly/i64-load-store-alignment.ll +++ b/llvm/test/CodeGen/WebAssembly/i64-load-store-alignment.ll @@ -5,7 +5,9 @@ target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" target triple = "wasm32-unknown-unknown" -; Loads. +;===---------------------------------------------------------------------------- +; Loads +;===---------------------------------------------------------------------------- ; CHECK-LABEL: ldi64_a1: ; CHECK-NEXT: .param i32{{$}} @@ -73,7 +75,9 @@ define i64 @ldi64_a16(i64 *%p) { ret i64 %v } -; Extending loads. +;===---------------------------------------------------------------------------- +; Extending loads +;===---------------------------------------------------------------------------- ; CHECK-LABEL: ldi8_a1: ; CHECK-NEXT: .param i32{{$}} @@ -174,7 +178,9 @@ define i64 @ldi32_a8(i32 *%p) { ret i64 %w } -; Stores. +;===---------------------------------------------------------------------------- +; Stores +;===---------------------------------------------------------------------------- ; CHECK-LABEL: sti64_a1: ; CHECK-NEXT: .param i32, i64{{$}} @@ -234,7 +240,9 @@ define void @sti64_a16(i64 *%p, i64 %v) { ret void } -; Truncating stores. +;===---------------------------------------------------------------------------- +; Truncating stores +;===---------------------------------------------------------------------------- ; CHECK-LABEL: sti8_a1: ; CHECK-NEXT: .param i32, i64{{$}} @@ -326,7 +334,10 @@ define void @sti32_a8(i32 *%p, i64 %w) { ret void } -; Atomics. +;===---------------------------------------------------------------------------- +; Atomic loads +;===---------------------------------------------------------------------------- + ; Wasm atomics have the alignment field, but it must always have the type's ; natural alignment. @@ -341,6 +352,7 @@ define i64 @ldi64_atomic_a8(i64 *%p) { } ; 16 is greater than the default alignment so it is ignored. + ; CHECK-LABEL: ldi64_atomic_a16: ; CHECK-NEXT: .param i32{{$}} ; CHECK-NEXT: .result i64{{$}} @@ -351,6 +363,10 @@ define i64 @ldi64_atomic_a16(i64 *%p) { ret i64 %v } +;===---------------------------------------------------------------------------- +; Atomic stores +;===---------------------------------------------------------------------------- + ; CHECK-LABEL: sti64_atomic_a4: ; CHECK-NEXT: .param i32, i64{{$}} ; CHECK-NEXT: i64.atomic.store 0($0), $1{{$}} @@ -361,6 +377,7 @@ define void @sti64_atomic_a4(i64 *%p, i64 %v) { } ; 16 is greater than the default alignment so it is ignored. + ; CHECK-LABEL: sti64_atomic_a8: ; CHECK-NEXT: .param i32, i64{{$}} ; CHECK-NEXT: i64.atomic.store 0($0), $1{{$}} |