[llvm] r351764 - [x86] add another test for xor with undefs; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 21 14:12:35 PST 2019
Author: spatel
Date: Mon Jan 21 14:12:35 2019
New Revision: 351764
URL: http://llvm.org/viewvc/llvm-project?rev=351764&view=rev
Log:
[x86] add another test for xor with undefs; NFC
Modified:
llvm/trunk/test/CodeGen/X86/vector-partial-undef.ll
Modified: llvm/trunk/test/CodeGen/X86/vector-partial-undef.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vector-partial-undef.ll?rev=351764&r1=351763&r2=351764&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vector-partial-undef.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vector-partial-undef.ll Mon Jan 21 14:12:35 2019
@@ -23,6 +23,25 @@ define <4 x i64> @xor_insert_insert(<2 x
ret <4 x i64> %r
}
+define <4 x i64> @xor_insert_insert_high_half(<2 x i64> %x, <2 x i64> %y) {
+; SSE-LABEL: xor_insert_insert_high_half:
+; SSE: # %bb.0:
+; SSE-NEXT: xorps %xmm0, %xmm1
+; SSE-NEXT: xorps %xmm0, %xmm0
+; SSE-NEXT: retq
+;
+; AVX-LABEL: xor_insert_insert_high_half:
+; AVX: # %bb.0:
+; AVX-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
+; AVX-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm1
+; AVX-NEXT: vxorps %ymm1, %ymm0, %ymm0
+; AVX-NEXT: retq
+ %xw = shufflevector <2 x i64> %x, <2 x i64> undef, <4 x i32> <i32 undef, i32 undef, i32 0, i32 1>
+ %yw = shufflevector <2 x i64> %y, <2 x i64> undef, <4 x i32> <i32 undef, i32 undef, i32 0, i32 1>
+ %r = xor <4 x i64> %xw, %yw
+ ret <4 x i64> %r
+}
+
; All elements of the add are undefined:
; x[0] , x[1] , x[2] , x[3], u , u , u , u
; + u , u , u , u , 42 , 43 , 44 , 45
More information about the llvm-commits
mailing list