[x86] add test for unaligned 32-byte load/store splitting; NFC

llvm-svn: 363852
This commit is contained in:
Sanjay Patel 2019-06-19 18:06:59 +00:00
parent f5d0d2d041
commit 33ef687d94
1 changed files with 19 additions and 2 deletions

View File

@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=corei7-avx | FileCheck %s
define void @wideloads(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwind uwtable noinline ssp {
define void @wideloads(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwind {
; CHECK-LABEL: wideloads:
; CHECK: # %bb.0:
; CHECK-NEXT: vmovaps (%rdi), %xmm0
@ -26,7 +26,7 @@ define void @wideloads(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwi
ret void
}
define void @widestores(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwind uwtable noinline ssp {
define void @widestores(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwind {
; CHECK-LABEL: widestores:
; CHECK: # %bb.0:
; CHECK-NEXT: vmovaps (%rdi), %ymm0
@ -44,3 +44,20 @@ define void @widestores(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounw
ret void
}
define void @widestores_unaligned_load(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwind {
; CHECK-LABEL: widestores_unaligned_load:
; CHECK: # %bb.0:
; CHECK-NEXT: vmovaps (%rdi), %ymm0
; CHECK-NEXT: vmovaps (%rsi), %xmm1
; CHECK-NEXT: vmovaps 16(%rsi), %xmm2
; CHECK-NEXT: vmovaps %ymm0, (%rsi)
; CHECK-NEXT: vmovaps %xmm2, 16(%rdi)
; CHECK-NEXT: vmovaps %xmm1, (%rdi)
; CHECK-NEXT: vzeroupper
; CHECK-NEXT: retq
%v0 = load <8 x float>, <8 x float>* %a, align 32 ; <--- aligned
%v1 = load <8 x float>, <8 x float>* %b, align 16 ; <--- unaligned
store <8 x float> %v0, <8 x float>* %b, align 32 ; <--- aligned
store <8 x float> %v1, <8 x float>* %a, align 16 ; <--- unaligned
ret void
}