Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit e4c0214

Browse files
committed
[X86][SSE2] Added _mm_move_* tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270046 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent a861f2e commit e4c0214

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

test/CodeGen/X86/sse2-intrinsics-fast-isel.ll

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,6 +1726,37 @@ define <2 x double> @test_mm_min_sd(<2 x double> %a0, <2 x double> %a1) nounwind
17261726
}
17271727
declare <2 x double> @llvm.x86.sse2.min.sd(<2 x double>, <2 x double>) nounwind readnone
17281728

1729+
define <2 x i64> @test_mm_move_epi64(<2 x i64> %a0) nounwind {
1730+
; X32-LABEL: test_mm_move_epi64:
1731+
; X32: # BB#0:
1732+
; X32-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero
1733+
; X32-NEXT: retl
1734+
;
1735+
; X64-LABEL: test_mm_move_epi64:
1736+
; X64: # BB#0:
1737+
; X64-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero
1738+
; X64-NEXT: retq
1739+
%res = shufflevector <2 x i64> %a0, <2 x i64> zeroinitializer, <2 x i32> <i32 0, i32 2>
1740+
ret <2 x i64> %res
1741+
}
1742+
1743+
define <2 x double> @test_mm_move_sd(<2 x double> %a0, <2 x double> %a1) nounwind {
1744+
; X32-LABEL: test_mm_move_sd:
1745+
; X32: # BB#0:
1746+
; X32-NEXT: movsd {{.*#+}} xmm0 = xmm1[0],xmm0[1]
1747+
; X32-NEXT: retl
1748+
;
1749+
; X64-LABEL: test_mm_move_sd:
1750+
; X64: # BB#0:
1751+
; X64-NEXT: movsd {{.*#+}} xmm0 = xmm1[0],xmm0[1]
1752+
; X64-NEXT: retq
1753+
%ext0 = extractelement <2 x double> %a1, i32 0
1754+
%res0 = insertelement <2 x double> undef, double %ext0, i32 0
1755+
%ext1 = extractelement <2 x double> %a0, i32 1
1756+
%res1 = insertelement <2 x double> %res0, double %ext1, i32 1
1757+
ret <2 x double> %res1
1758+
}
1759+
17291760
define i32 @test_mm_movemask_epi8(<2 x i64> %a0) nounwind {
17301761
; X32-LABEL: test_mm_movemask_epi8:
17311762
; X32: # BB#0:

0 commit comments

Comments
 (0)