[llvm] r351430 - [X86][SSE] Add PR40340 test case
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 17 03:20:23 PST 2019
Author: rksimon
Date: Thu Jan 17 03:20:23 2019
New Revision: 351430
URL: http://llvm.org/viewvc/llvm-project?rev=351430&view=rev
Log:
[X86][SSE] Add PR40340 test case
Modified:
llvm/trunk/test/CodeGen/X86/insertps-combine.ll
Modified: llvm/trunk/test/CodeGen/X86/insertps-combine.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/insertps-combine.ll?rev=351430&r1=351429&r2=351430&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/insertps-combine.ll (original)
+++ llvm/trunk/test/CodeGen/X86/insertps-combine.ll Thu Jan 17 03:20:23 2019
@@ -298,4 +298,23 @@ define float @extract_lane_insertps_6123
ret float %ext
}
+; PR40340
+define <4 x float> @commute_load_insertps(<4 x float>, <4 x float>* nocapture readonly) {
+; SSE-LABEL: commute_load_insertps:
+; SSE: # %bb.0:
+; SSE-NEXT: movaps (%rdi), %xmm1
+; SSE-NEXT: insertps {{.*#+}} xmm1 = zero,xmm0[1],zero,xmm1[3]
+; SSE-NEXT: movaps %xmm1, %xmm0
+; SSE-NEXT: retq
+;
+; AVX-LABEL: commute_load_insertps:
+; AVX: # %bb.0:
+; AVX-NEXT: vmovaps (%rdi), %xmm1
+; AVX-NEXT: vinsertps {{.*#+}} xmm0 = zero,xmm0[1],zero,xmm1[3]
+; AVX-NEXT: retq
+ %3 = load <4 x float>, <4 x float>* %1
+ %4 = tail call <4 x float> @llvm.x86.sse41.insertps(<4 x float> %3, <4 x float> %0, i8 85)
+ ret <4 x float> %4
+}
+
declare <4 x float> @llvm.x86.sse41.insertps(<4 x float>, <4 x float>, i8) nounwind readnone
More information about the llvm-commits
mailing list