diff options
Diffstat (limited to 'test/CodeGen/X86/GlobalISel/memop-vec.ll')
-rw-r--r-- | test/CodeGen/X86/GlobalISel/memop-vec.ll | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/CodeGen/X86/GlobalISel/memop-vec.ll b/test/CodeGen/X86/GlobalISel/memop-vec.ll new file mode 100644 index 000000000000..e218fded4d5f --- /dev/null +++ b/test/CodeGen/X86/GlobalISel/memop-vec.ll @@ -0,0 +1,39 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc -mtriple=x86_64-linux-gnu -mcpu=skx -global-isel < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=SKX +; RUN: llc -mtriple=x86_64-linux-gnu -mcpu=skx -regbankselect-greedy -global-isel < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=SKX + +define <4 x i32> @test_load_v4i32_noalign(<4 x i32> * %p1) { +; ALL-LABEL: test_load_v4i32_noalign: +; ALL: # BB#0: +; ALL-NEXT: vmovups (%rdi), %xmm0 +; ALL-NEXT: retq + %r = load <4 x i32>, <4 x i32>* %p1, align 1 + ret <4 x i32> %r +} + +define <4 x i32> @test_load_v4i32_align(<4 x i32> * %p1) { +; ALL-LABEL: test_load_v4i32_align: +; ALL: # BB#0: +; ALL-NEXT: vmovaps (%rdi), %xmm0 +; ALL-NEXT: retq + %r = load <4 x i32>, <4 x i32>* %p1, align 16 + ret <4 x i32> %r +} + +define void @test_store_v4i32_noalign(<4 x i32> %val, <4 x i32>* %p1) { +; ALL-LABEL: test_store_v4i32_noalign: +; ALL: # BB#0: +; ALL-NEXT: vmovups %xmm0, (%rdi) +; ALL-NEXT: retq + store <4 x i32> %val, <4 x i32>* %p1, align 1 + ret void +} + +define void @test_store_v4i32_align(<4 x i32> %val, <4 x i32>* %p1) { +; ALL-LABEL: test_store_v4i32_align: +; ALL: # BB#0: +; ALL-NEXT: vmovaps %xmm0, (%rdi) +; ALL-NEXT: retq + store <4 x i32> %val, <4 x i32>* %p1, align 16 + ret void +} |