2016-10-11 21:55:49 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
|
2009-12-15 07:40:38 +08:00
|
|
|
|
2010-06-18 08:06:03 +08:00
|
|
|
define void @foo(<8 x i32>* %p) nounwind {
|
2016-10-11 21:55:49 +08:00
|
|
|
; CHECK-LABEL: foo:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: # %bb.0:
|
2016-10-11 21:55:49 +08:00
|
|
|
; CHECK-NEXT: movdqa (%rdi), %xmm0
|
|
|
|
; CHECK-NEXT: movdqa 16(%rdi), %xmm1
|
|
|
|
; CHECK-NEXT: pslld $16, %xmm1
|
|
|
|
; CHECK-NEXT: psrad $16, %xmm1
|
|
|
|
; CHECK-NEXT: pslld $16, %xmm0
|
|
|
|
; CHECK-NEXT: psrad $16, %xmm0
|
|
|
|
; CHECK-NEXT: packssdw %xmm1, %xmm0
|
|
|
|
; CHECK-NEXT: movdqa %xmm0, (%rax)
|
|
|
|
; CHECK-NEXT: retq
|
2015-02-28 05:17:42 +08:00
|
|
|
%t = load <8 x i32>, <8 x i32>* %p
|
2010-06-18 08:06:03 +08:00
|
|
|
%cti69 = trunc <8 x i32> %t to <8 x i16> ; <<8 x i16>> [#uses=1]
|
2009-12-15 07:40:38 +08:00
|
|
|
store <8 x i16> %cti69, <8 x i16>* undef
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2010-06-18 08:06:03 +08:00
|
|
|
define void @bar(<4 x i32>* %p) nounwind {
|
2016-10-11 21:55:49 +08:00
|
|
|
; CHECK-LABEL: bar:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: # %bb.0:
|
2016-10-11 21:55:49 +08:00
|
|
|
; CHECK-NEXT: pshuflw {{.*#+}} xmm0 = mem[0,2,2,3,4,5,6,7]
|
|
|
|
; CHECK-NEXT: pshufhw {{.*#+}} xmm0 = xmm0[0,1,2,3,4,6,6,7]
|
|
|
|
; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
|
|
|
|
; CHECK-NEXT: movq %xmm0, (%rax)
|
|
|
|
; CHECK-NEXT: retq
|
2015-02-28 05:17:42 +08:00
|
|
|
%t = load <4 x i32>, <4 x i32>* %p
|
2010-06-18 08:06:03 +08:00
|
|
|
%cti44 = trunc <4 x i32> %t to <4 x i16> ; <<4 x i16>> [#uses=1]
|
2009-12-15 07:40:38 +08:00
|
|
|
store <4 x i16> %cti44, <4 x i16>* undef
|
|
|
|
ret void
|
|
|
|
}
|