1
1
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2
2
; RUN: opt < %s -instcombine -S | FileCheck %s
3
3
4
+ ;
5
+ ; UNDEF Elts
6
+ ;
7
+
8
+ define <2 x i64 > @undef_pmuludq_128 (<4 x i32 > %a0 , <4 x i32 > %a1 ) {
9
+ ; CHECK-LABEL: @undef_pmuludq_128(
10
+ ; CHECK-NEXT: [[TMP1:%.*]] = call <2 x i64> @llvm.x86.sse2.pmulu.dq(<4 x i32> undef, <4 x i32> undef)
11
+ ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
12
+ ;
13
+ %1 = call <2 x i64 > @llvm.x86.sse2.pmulu.dq (<4 x i32 > undef , <4 x i32 > undef )
14
+ ret <2 x i64 > %1
15
+ }
16
+
17
+ define <4 x i64 > @undef_pmuludq_256 (<8 x i32 > %a0 , <8 x i32 > %a1 ) {
18
+ ; CHECK-LABEL: @undef_pmuludq_256(
19
+ ; CHECK-NEXT: [[TMP1:%.*]] = call <4 x i64> @llvm.x86.avx2.pmulu.dq(<8 x i32> undef, <8 x i32> undef)
20
+ ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
21
+ ;
22
+ %1 = call <4 x i64 > @llvm.x86.avx2.pmulu.dq (<8 x i32 > undef , <8 x i32 > undef )
23
+ ret <4 x i64 > %1
24
+ }
25
+
26
+ define <8 x i64 > @undef_pmuludq_512 (<16 x i32 > %a0 , <16 x i32 > %a1 ) {
27
+ ; CHECK-LABEL: @undef_pmuludq_512(
28
+ ; CHECK-NEXT: [[TMP1:%.*]] = call <8 x i64> @llvm.x86.avx512.pmulu.dq.512(<16 x i32> undef, <16 x i32> undef)
29
+ ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
30
+ ;
31
+ %1 = call <8 x i64 > @llvm.x86.avx512.pmulu.dq.512 (<16 x i32 > undef , <16 x i32 > undef )
32
+ ret <8 x i64 > %1
33
+ }
34
+
35
+ define <2 x i64 > @undef_pmuldq_128 (<4 x i32 > %a0 , <4 x i32 > %a1 ) {
36
+ ; CHECK-LABEL: @undef_pmuldq_128(
37
+ ; CHECK-NEXT: [[TMP1:%.*]] = call <2 x i64> @llvm.x86.sse41.pmuldq(<4 x i32> undef, <4 x i32> undef)
38
+ ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
39
+ ;
40
+ %1 = call <2 x i64 > @llvm.x86.sse41.pmuldq (<4 x i32 > undef , <4 x i32 > undef )
41
+ ret <2 x i64 > %1
42
+ }
43
+
44
+ define <4 x i64 > @undef_pmuldq_256 (<8 x i32 > %a0 , <8 x i32 > %a1 ) {
45
+ ; CHECK-LABEL: @undef_pmuldq_256(
46
+ ; CHECK-NEXT: [[TMP1:%.*]] = call <4 x i64> @llvm.x86.avx2.pmul.dq(<8 x i32> undef, <8 x i32> undef)
47
+ ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
48
+ ;
49
+ %1 = call <4 x i64 > @llvm.x86.avx2.pmul.dq (<8 x i32 > undef , <8 x i32 > undef )
50
+ ret <4 x i64 > %1
51
+ }
52
+
53
+ define <8 x i64 > @undef_pmuldq_512 (<16 x i32 > %a0 , <16 x i32 > %a1 ) {
54
+ ; CHECK-LABEL: @undef_pmuldq_512(
55
+ ; CHECK-NEXT: [[TMP1:%.*]] = call <8 x i64> @llvm.x86.avx512.pmul.dq.512(<16 x i32> undef, <16 x i32> undef)
56
+ ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
57
+ ;
58
+ %1 = call <8 x i64 > @llvm.x86.avx512.pmul.dq.512 (<16 x i32 > undef , <16 x i32 > undef )
59
+ ret <8 x i64 > %1
60
+ }
61
+
4
62
;
5
63
; PMULUDQ/PMULDQ - only the even elements (0, 2, 4, 6) of the vXi32 inputs are required.
6
64
;
@@ -55,8 +113,8 @@ define <2 x i64> @test_demanded_elts_pmuldq_128(<4 x i32> %a0, <4 x i32> %a1) {
55
113
ret <2 x i64 > %3
56
114
}
57
115
58
- define <4 x i64 > @test_demanded_elts_pmuluq_256 (<8 x i32 > %a0 , <8 x i32 > %a1 ) {
59
- ; CHECK-LABEL: @test_demanded_elts_pmuluq_256 (
116
+ define <4 x i64 > @test_demanded_elts_pmuldq_256 (<8 x i32 > %a0 , <8 x i32 > %a1 ) {
117
+ ; CHECK-LABEL: @test_demanded_elts_pmuldq_256 (
60
118
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <8 x i32> %a1, <8 x i32> undef, <8 x i32> <i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 7, i32 undef>
61
119
; CHECK-NEXT: [[TMP2:%.*]] = call <4 x i64> @llvm.x86.avx2.pmul.dq(<8 x i32> %a0, <8 x i32> [[TMP1]])
62
120
; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x i64> [[TMP2]], <4 x i64> undef, <4 x i32> <i32 0, i32 0, i32 3, i32 3>
@@ -69,8 +127,8 @@ define <4 x i64> @test_demanded_elts_pmuluq_256(<8 x i32> %a0, <8 x i32> %a1) {
69
127
ret <4 x i64 > %4
70
128
}
71
129
72
- define <8 x i64 > @test_demanded_elts_pmuluq_512 (<16 x i32 > %a0 , <16 x i32 > %a1 ) {
73
- ; CHECK-LABEL: @test_demanded_elts_pmuluq_512 (
130
+ define <8 x i64 > @test_demanded_elts_pmuldq_512 (<16 x i32 > %a0 , <16 x i32 > %a1 ) {
131
+ ; CHECK-LABEL: @test_demanded_elts_pmuldq_512 (
74
132
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <16 x i32> %a1, <16 x i32> undef, <16 x i32> <i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 7, i32 undef, i32 9, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 15, i32 undef>
75
133
; CHECK-NEXT: [[TMP2:%.*]] = call <8 x i64> @llvm.x86.avx512.pmul.dq.512(<16 x i32> %a0, <16 x i32> [[TMP1]])
76
134
; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <8 x i64> [[TMP2]], <8 x i64> undef, <8 x i32> <i32 0, i32 0, i32 3, i32 3, i32 4, i32 4, i32 7, i32 7>
0 commit comments