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

Commit 09dbf88

Browse files
committed
[x86] add partial undef 'and' test; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351840 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 25c5702 commit 09dbf88

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

test/CodeGen/X86/vector-partial-undef.ll

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,28 @@ define <8 x i32> @sub_undef_elts(<4 x i32> %x) {
8383
ret <8 x i32> %arbitrary_shuf
8484
}
8585

86-
; Verify that different types work.
86+
; and undef, C --> 0, so this tests that we are tracking known zero lanes.
87+
88+
define <4 x i64> @and_undef_elts(<2 x i64> %x) {
89+
; SSE-LABEL: and_undef_elts:
90+
; SSE: # %bb.0:
91+
; SSE-NEXT: xorps %xmm0, %xmm0
92+
; SSE-NEXT: xorps %xmm1, %xmm1
93+
; SSE-NEXT: retq
94+
;
95+
; AVX-LABEL: and_undef_elts:
96+
; AVX: # %bb.0:
97+
; AVX-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
98+
; AVX-NEXT: vandps {{.*}}(%rip), %ymm0, %ymm0
99+
; AVX-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[3,0,1,2]
100+
; AVX-NEXT: retq
101+
%extend = shufflevector <2 x i64> %x, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
102+
%bogus_bo = and <4 x i64> %extend, <i64 undef, i64 undef, i64 42, i64 43>
103+
%arbitrary_shuf = shufflevector <4 x i64> %bogus_bo, <4 x i64> undef, <4 x i32> <i32 3, i32 0, i32 1, i32 2>
104+
ret <4 x i64> %arbitrary_shuf
105+
}
106+
107+
; or undef, C --> -1, so this tests that we are tracking known all-ones lanes.
87108

88109
define <4 x i64> @or_undef_elts(<2 x i64> %x) {
89110
; SSE-LABEL: or_undef_elts:

0 commit comments

Comments
 (0)