[llvm] r279527 - [X86][SSE] Demonstrate inability to recognise that (v)cvtpd2dq & (v)cvttpd2dq intrinsics implicitly zeroes the upper half of the xmm
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 23 09:11:22 PDT 2016
Author: rksimon
Date: Tue Aug 23 11:11:21 2016
New Revision: 279527
URL: http://llvm.org/viewvc/llvm-project?rev=279527&view=rev
Log:
[X86][SSE] Demonstrate inability to recognise that (v)cvtpd2dq & (v)cvttpd2dq intrinsics implicitly zeroes the upper half of the xmm
Modified:
llvm/trunk/test/CodeGen/X86/sse2-intrinsics-x86.ll
Modified: llvm/trunk/test/CodeGen/X86/sse2-intrinsics-x86.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse2-intrinsics-x86.ll?rev=279527&r1=279526&r2=279527&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/sse2-intrinsics-x86.ll (original)
+++ llvm/trunk/test/CodeGen/X86/sse2-intrinsics-x86.ll Tue Aug 23 11:11:21 2016
@@ -210,6 +210,25 @@ define <4 x i32> @test_x86_sse2_cvtpd2dq
declare <4 x i32> @llvm.x86.sse2.cvtpd2dq(<2 x double>) nounwind readnone
+define <2 x i64> @test_mm_cvtpd_epi32_zext(<2 x double> %a0) nounwind {
+; SSE-LABEL: test_mm_cvtpd_epi32_zext:
+; SSE: ## BB#0:
+; SSE-NEXT: cvtpd2dq %xmm0, %xmm0
+; SSE-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero
+; SSE-NEXT: retl
+;
+; KNL-LABEL: test_mm_cvtpd_epi32_zext:
+; KNL: ## BB#0:
+; KNL-NEXT: vcvtpd2dq %xmm0, %xmm0
+; KNL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
+; KNL-NEXT: retl
+ %cvt = call <4 x i32> @llvm.x86.sse2.cvtpd2dq(<2 x double> %a0)
+ %res = shufflevector <4 x i32> %cvt, <4 x i32> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 4, i32 5>
+ %bc = bitcast <4 x i32> %res to <2 x i64>
+ ret <2 x i64> %bc
+}
+
+
define <4 x float> @test_x86_sse2_cvtpd2ps(<2 x double> %a0) {
; SSE-LABEL: test_x86_sse2_cvtpd2ps:
; SSE: ## BB#0:
@@ -412,6 +431,25 @@ define <4 x i32> @test_x86_sse2_cvttpd2d
declare <4 x i32> @llvm.x86.sse2.cvttpd2dq(<2 x double>) nounwind readnone
+define <2 x i64> @test_mm_cvttpd_epi32_zext(<2 x double> %a0) nounwind {
+; SSE-LABEL: test_mm_cvttpd_epi32_zext:
+; SSE: ## BB#0:
+; SSE-NEXT: cvttpd2dq %xmm0, %xmm0
+; SSE-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero
+; SSE-NEXT: retl
+;
+; KNL-LABEL: test_mm_cvttpd_epi32_zext:
+; KNL: ## BB#0:
+; KNL-NEXT: vcvttpd2dq %xmm0, %xmm0
+; KNL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
+; KNL-NEXT: retl
+ %cvt = call <4 x i32> @llvm.x86.sse2.cvttpd2dq(<2 x double> %a0)
+ %res = shufflevector <4 x i32> %cvt, <4 x i32> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 4, i32 5>
+ %bc = bitcast <4 x i32> %res to <2 x i64>
+ ret <2 x i64> %bc
+}
+
+
define <4 x i32> @test_x86_sse2_cvttps2dq(<4 x float> %a0) {
; SSE-LABEL: test_x86_sse2_cvttps2dq:
; SSE: ## BB#0:
More information about the llvm-commits
mailing list